Patrik Nordebo patrik@nordebo.com wrote:
Is there a way to find all uses of a primitive?
CompiledMethod allInstances select: [:m | m primitive = primNum] thenCollect: [:m | m who].
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.
-Anthony
ajh18@cornell.edu is widely believed to have written:
Patrik Nordebo patrik@nordebo.com wrote:
Is there a way to find all uses of a primitive?
CompiledMethod allInstances select: [:m | m primitive = primNum] thenCollect: [:m | m who].
Actually Smalltalk browseAllSelect:[:cm| cm primitive = primNum] will open a browser on all methods that return true as the block result.
tim
On Thu, Mar 29, 2001 at 10:11:25AM -0500, ajh18@cornell.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]); } }
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@cornell.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]); }
}
squeak-dev@lists.squeakfoundation.org