ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> squeak
squeak
Re: [BUG] Socket assumes connection in Linux
by Stephan Rudlof other posts by this author
Mar 31 2001 11:59PM messages near this date
Re: [BUG] Socket assumes connection in Linux | Re: [BUG][FIX][VM][UNIX] Socket assumes connection in Linux
Patrick,

could you post this patch marked (prefix of subject) as
	[BUG][FIX][VM][UNIX]
again?

Preferable with the patch file attached (in addition to the description in the
body).

This enhances the probability to attract the attention it needs to have
(Ian?)...

Greetings,

Stephan

Patrik Nordebo wrote:
>  
>  On Thu, Mar 29, 2001 at 10:11:25AM -0500, ajh18@[...].edu wrote:
>  > Patrik, thanks for looking at this socket problem.  If you have a chance
>  > please look at the socket semaphore corruption problem also.  I posted a
>  > bug report about this on March 26 and its entitled "[BUG] Socket
>  > semaphore corrupted (Unix VM)".  I wish I could help but I am not
>  > familiar with platform specifics.  Smalltalk has happily sheltered me
>  > from those details for many years.
>  
>  This problem appears to be a VM problem, because AFAICT, the Unix
>  socket implementation never signals the semaphore, but it still
>  remains at 1.
>  
>  BTW, Squeak is constantly segfaulting for me if I quit it after having
>  opened a socket. It seems to me that this should be happening to
>  everyone running Squeak on Linux/Unix, but I haven't seen anyone
>  mention it. I missed it while I was writing my fix because I was tired
>  and I wasn't looking for it.
>  
>  This happens because when the asynchronous I/O system shuts down it
>  first sets the pointer to the private socket structure to 0, then
>  tries to close the socket in the private socket structure. This should
>  never ever work. Reversing the order of these two operations appears to
>  cure the problem.
>  
>  Patch:
>  --- sqUnixSocket_orig.c Wed Mar 28 05:58:18 2001
>  +++ sqUnixSocket.c      Sat Mar 31 07:20:39 2001
>  @@ -502,8 +502,8 @@
>     for (i= 0; i < lastSocket+1; i++)
>       if (sockets[i])
>         {
>  -       aioDisable(sockets[i]);
>          close(sockets[i]->s);
>  +       aioDisable(sockets[i]);
>         }
>   }

-- 
Stephan Rudlof (sr@evolgo.de)
   "Genius doesn't work on an assembly line basis.
    You can't simply say, 'Today I will be brilliant.'"
    -- Kirk, "The Ultimate Computer", stardate 4731.3
Thread:

Stephan Rudlof
Patrik Nordebo
Bert Freudenberg
Patrik Nordebo
Torge Husfeldt
Tim Rowledge

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved