accept() failed message on kde 1.1.2 ??

egor duda
Mon Jun 18 08:07:00 GMT 2001


Monday, 18 June, 2001 Ralf Habacker 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

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.   ICQ 5165414 FidoNet 2:5020/496.19

More information about the Cygwin-apps mailing list