TCP Sockets are unrealiable

Lex Spoon lex at cc.gatech.edu
Mon Jan 10 19:00:41 UTC 2005


In general, TCP sockets seem to work pretty well in Squeak.  They've
been used heavily over the years.   I use Squeak daily for email (both
POP and SMTP) and for IRC, and have never run into a lockup like you
describe.  Also, all swikis use TCP sockets in Squeak, and at this point
there are probably thousands of swikis around the world.  At various
times, people have indeed stress tested swikis to see if they die or
not.  They seem to do okay, nowadays (bugs have been found in the past,
just not within at least a year that I know of!).  Also, the SuperSwiki
is based on squeak's TCP implementation as well, and is used widely for
all the SqueakLand activities.

Of course, this doesn't mean there aren't remaining problems.  I just
think it's fair to say that, in general, Squeak sockets are robust at
this point.

Is it possible that your listener socket closed, for some reason?  That
would seem to cause your listening loop to go into a busy wait and thus
cause problems.

Is it possible that Squeak has not locked up, but instead that your
workers are simply swamping the CPU?  Be aware that Squeak's schedular
is cooperative at the same priority level.  Thus, all your priority-10
threads will tend to block each other out unless they explicitly yield.

Have you tried hitting alt-period to see where things are hung?  Have
you tried poking around with a ProcessBrowser?

If none of these yield any insight, could you try narrowing down your
example?  For example, what happens if you have your worker threads do
nothing except close the socket?  

Finally, is there a chance you can try running your server on a
different platform?  That would help narrow down where the problem is
occuring.

For what it's worth, your code looks fine in my quick skimming, but I
haven't actually tried running it.


Good luck.  It would be awesome to have an ORB in Squeak, and I don't
see why there would really be any problems with it for someone who knows
CORBA.

-Lex



More information about the Squeak-dev mailing list