[BUG] Network data loss.

Johan Fabry johan.fabry at vub.ac.be
Mon Aug 28 15:55:57 UTC 2000


Hi,

While stress-testing my implementation of a squeak-only RPC, I
encountered some network data loss, when connecting multiple clients to
1 server.

The one sentence bug report goes like this:
When sending from a connected socket on clientside, to a socket in a
connectionqueue on server, sometimes the data gets lost, when multiple
clients connect.

I've included an attatchment which can be used to reproduce the bug.
I'll explain what goes wrong, referring to the code in the attatchment.

I included some of the guts of my ORB, and split it up into two objects:
a ServerObj, and a ClientObj.

The ClientObj opens a SimpleClientSocket to the server, sends some data
through this socket, waits for a reply on the socket, and then prints
this reply ("Ok!").

The Server keeps a connectionQueue, and periodcally polls it for an
incoming connection. When a connection is detected, a separate thread
reads the data and sends a reply ("Ok!").

To reproduce the bug:

Start one server on one machine (ServerObject new listen)
Start two or more clients on (an)other machine(s) (ClientObject new
loadNetwork)

The bug is that sometimes the client sends data, but never gets a reply.
This is because, apparently, the server never recieves the data. Also,
clientside, even though socket DataAvailable returns true, when reading
data from the socket no data is read. This can be seen by the 'W'
printouts on the transcript. 

I'm running this in 2.7, I have not tried it in 2.8 yet (waiting for a
Unix VM release which is considered 'stable')

--
"You are more than the sum       Johan Fabry - Johan.Fabry at vub.ac.be
 of what you consume.            Vrije Universiteit Brussel
 Desire is not an occupation."   Programming Technology Lab, Room 10F709
  -- KMFDM                       Pleinlaan 2, 1050 Brussels, Belgium
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NetworkTest.st
Type: application/octet-stream
Size: 2992 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000828/d4af0ad2/NetworkTest.obj


More information about the Squeak-dev mailing list