delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2001/06/18/11:47:11

Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-apps-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/lists.html#faqs>
Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com
Date: Mon, 18 Jun 2001 19:01:12 +0400
From: egor duda <deo AT logos-m DOT ru>
X-Mailer: The Bat! (v1.53 RC/4)
Reply-To: egor duda <deo AT logos-m DOT ru>
Organization: deo
X-Priority: 3 (Normal)
Message-ID: <100357399493.20010618190112@logos-m.ru>
To: "Ralf Habacker" <Ralf DOT Habacker AT saght DOT tessag DOT com>
CC: cygwin-apps AT cygwin DOT com
Subject: Re: accept() failed message on kde 1.1.2 ??
In-Reply-To: <001501c0f802$79fdc0b0$6e032bb7@BRAMSCHE>
References: <001501c0f802$79fdc0b0$6e032bb7 AT BRAMSCHE>
MIME-Version: 1.0

Hi!

Monday, 18 June, 2001 Ralf Habacker Ralf DOT Habacker AT saght DOT tessag DOT com wrote:

RH> Here is a log, but I have much trouble to generate this, because atger
RH> inserting the messages every kde apps hangs. I don*t know if it can help
RH> you.

yes! now i know the reason. i've stripped everything except interesting
part.

RH>  178505 [main] kcmikbd 876 fhandler_socket::create_secret_event: create
RH>  191183 [main] kcmikbd 876 fhandler_socket::create_secret_event: buf=cygwin.local_socket.secret.18194.EFA28C95-197B7E59-205491FC-C6409C4D
RH>  205266 [main] kcmikbd 876 fhandler_socket::create_secret_event: after CreateEvent(): secret_event=540, GetLastError()=0
RH>  219122 [main] kcmikbd 876 fhandler_socket::check_peer_secret_event: buf=cygwin.local_socket.secret.30993.EFA28C95-197B7E59-205491FC-C6409C4D
RH>  233378 [main] kcmikbd 876 fhandler_socket::check_peer_secret_event: after CreateEvent(): ev=544, GetLastError()=183
RH> 36000511 [main] X 1152 fhandler_socket::create_secret_event: create
RH> 36013604 [main] X 1152 fhandler_socket::create_secret_event: buf=cygwin.local_socket.secret.30993.EFA28C95-197B7E59-205491FC-C6409C4D
RH> 36027683 [main] X 1152 fhandler_socket::create_secret_event: after CreateEvent(): secret_event=332, GetLastError()=183
RH> 36041810 [main] X 1152 fhandler_socket::check_peer_secret_event: buf=cygwin.local_socket.secret.18194.EFA28C95-197B7E59-205491FC-C6409C4D
RH>  304967 [main] kcmikbd 876 fhandler_socket::check_peer_secret_event: WFSO  rc=0
RH>  332633 [main] kcmikbd 876 fhandler_socket::close_secret_event: closed
RH> 36100331 [main] X 1152 fhandler_socket::check_peer_secret_event: after CreateEvent(): ev=288, GetLastError()=0
RH> 236150823 [main] X 1152 fhandler_socket::check_peer_secret_event: WFSO rc=258
RH> 236152727 [main] X 1152 cygwin_accept: connect from unauthorized client
RH> _XSERVTransSocketUNIXAccept: accept() failed

so, here's the problem. client application (kcmikbd) calls connect()
this means it creates client-side secret event and signals it, and
then it calls check_peer_secret_event(). As long as server-side secret
event doesn't exist yet, it creates it too, and waits until it's
signaled. Now, server application (X), tries to create server-side
secret event, but it already exists, so it just opens it and signal
it. client sees that server-side event is signalled (that means that
accepting server knows secret cookie and therefore is "legitimate"),
and so connect () returns newly opened socket for application. But
then, application closes this socket immediately, destroying
client-side secret event. but server had not yet opened it. when
server calls check_peer_secret_event () at last, it creates it anew,
and because client have already passed connect() call, nobody would ever
signal this new client-side secret event. so, server waits for some
time and exits as if client was trying to cheat us by opening AF_INET
connection without signalling secret event.

i'd try to figure out some way to fix it.

Egor.            mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019