[BUG] windows sockets and no data
Julian Fitzell
julian at beta4.com
Fri Mar 14 01:39:33 UTC 2003
So there have been reports before about problems with Windows sockets.
In particular, there is the case of the delay needed in the Postgresql
client code but I've encountered it again today work on Avi's JDBC bridge.
I've traced it a bit further but the problem goes deeper than I know how
to follow (into the VM it seems - not surprisingly since the problem
only happens on Windows).
The call path of interest is:
SocketStream#next
SocketStream#pvtGetData
Socket#getDataQuicker
Socket#waitForDataUntil:
The problem seems to be that Socket#waitForDataUntil: returns true well
before the dealine *even though there is no data*. #getDataQuicker then
returns an empty string, #pvtGetData appends that to the BufferStream in
inStream and #next tries to extract the next character from the
BufferStream, which is still empty.
The wait timeout is supposed to be 10 seconds and this is in the order
of milliseconds.
Presumably Socket#primSocketReceiveDataAvailable: is returning true when
it shouldn't be but this is where it gets fuzzy for me. I haven't yet
put any effort into figuring out how all the VM generation stuff happens
and probably won't have time any time soon.
Hopefully this is useful to someone else with the knowledge to actually
fix the problem... If anyone has any further suggestions so I can help
track this down further, please let me know.
Julian
--
julian at beta4.com
Beta4 Productions (http://www.beta4.com)
More information about the Squeak-dev
mailing list
|