[BUG] Socket semaphore corrupted (Unix VM)

ajh18 at cornell.edu ajh18 at cornell.edu
Mon Mar 26 19:53:47 UTC 2001


Socket>>waitForDataUntil: does not wait on the readSemaphore.  Rather,
"readSemaphore waitForTimeoutMSecs:" falls through causing the outer
while loop to continously run until the deadline is reached.  Needless
to say, this takes up much of the CPU.  I do not get this problem with
the Windows VM, only with the Unix VM (in Linux).  To recreate the
problem bring up two images.  In Image2 bring up the Transcript and edit
Socket>>waitForDataUntil: adding (Transcript show: 'waiting '.) as the
first line in the whileTrue: loop.  Then execute the following.

Image1> Socket initializeNetwork.
Image1> Socket new listenOn: 2001.

Image2> Socket initializeNetwork.
Image2> s _ Socket new connectTo: (NetNameResolver addressFromString:
'127.0.0.1') port: 2001.
Image2> s waitForDataUntil: Socket standardDeadline.

You should see 'waiting waiting ...' streaming across your Transcript
until the deadline is reached 45 seconds later.  I suspect this
semaphore problem is also the cause of my first Socket bug report
entitled "[BUG]Socket waits unnecessarily in linux" (March 23, 2001).

Image version: Squeak3.1alpha of 27 February 2001 latest update: #3848
VM version (3.0pre2): Squeak3.0 of 4 February 2001 [latest update:
#3446] for: unix

Since, this bug is platform specific it must be in the unix src.  I
would try to fix it myself but I am no Unix expert.

Thanks,
Anthony





More information about the Squeak-dev mailing list