Will the real sqUnixSocket.c step forward?

John M McIntosh johnmci at smalltalkconsulting.com
Sat May 4 07:59:40 UTC 2002


To ian and the list

>There are two issues here.
>
>#1 is the problem you're seeing in FreeBSD (and I'm _not_ seeing in
>NetBSD), which is the ECONNABORTED on the server socket.  This should not
>happen.  It's not even listed as a possible error from connect(), listen()
>or accept().  (The only thing I can think of is:
>   - the server listens
>   - the client connects
>   - the client disconnects abruptly before the connect completes
>   - the server tries to accept
>so I'll run a test or two to this effect.  If this is the problem then
>it's caused by the browser's behaviour -- and my failure to reproduce this
>is possibly because I'm using a browser [Opera] that's too "well-behaved".
>If this is the problem then I'll fix it directly in the support code, so
>that ECONNABORTED does not abort the listening socket.

What you believe the man pages?

in /usr/src/sys/net/netinet/tcp_usrreq.c

tcp_usr_accept(

..
if (so->so_state & SS_ISDISCONNECTED)
   error = ECONNABORTED
...

The notes I've seen imply the socket can get disconnected somewhere 
between the connect, and the accept. So a somewhat new FREEBSD 
behavior is to throw the ECONNABORTED.

Ah the OpenBSD code is quite different, unable to understand how it 
terminates early quite yet.

Well I didn't check, but does it imply the waitforconnection will 
terminate right away or do we wait for the timeout? Then again I 
didn't notice any pauses so is that ECONNABORTED connection just 
ignored? (yes I think)

>... I've updated the Unix socket code to
>implement the first for now, but I'm happy to go with the second solution
>if/when somebody decides that the error code is important.
>
>With any luck we can close the whole socket saga once and for all
>now.
>
>Ian

I'll await your code. Sometime in the next 24 hours I'll review all 
the signaling to understand how/what/where

-- 
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================



More information about the Squeak-dev mailing list