Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-01
01:47 • Ticket [218459ffff] Bug in Windows sockets status still Closed with 3 other ... artifact: 639fc17e80 user: dgp
2000-10-26
08:22 • Closed ticket [218459ffff]. artifact: 42ac53b55a user: welch
01:00 • New ticket [218459ffff]. artifact: 54bec570a6 user: nobody

Bug in Windows sockets

Closed / Fixed218459ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:00:38
OriginalBugID: 611 Bug
Version: 8.0p2
SubmitDate: '1998-05-21'
LastModified: '1998-06-04'
Severity: MED
Status: Released
Submitter: stanton
ChangedBy: stanton
OS: All Windows
OSVersion: NA
Machine: NA
FixedDate: '2000-10-25'
FixedInVersion: 8.0.3
ClosedDate: '1998-06-04'


In a conversation with Bob Lamoureux of Bridge Information Systems
yesterday, he reported the following bug:

In the Tcl socket code for Windows, there is apparently a call to
ioctl(FIONREAD) to "peek" on the socket to see how many bytes are
ready.  The Microsoft code that implements this function doesn't
properly handle the case where the ready data spans more than one
buffer.  Apparently, it works by reading all of the available input
data, counting the bytes, then pushing all of the data back into
the buffers.  However, it apparently isn't possible to push back more
than one bufferfull of data, so any data beyond the first buffer is
lost.  After the ioctl call Tcl tries to read the data, which hangs
since there isn't enough data there anymore.  It sounds like this
may even hang the system (it hangs low enough in the kernel to make
it hard to interrupt).  Bob tracked it down with the help of
Microsoft engineers, who then said it was a known problem and it's
our fault for trying to port Unix code to Windows (sheesh).

Anyhow, the solution is probably to change the socket code to spin a
thread like pipes and serial lines, so that it isn't necessary to
"peek" on the socket.
welch Closed ticket [218459ffff]. [History diff]2000-10-26 08:22:17
dgp Ticket [218459ffff]: 3 changes [History diff]2001-04-01 01:47:54
Log in (anonymous is fine) to add a comment.