Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2010-02-22
21:39 • Closed ticket [2953175fff]: Premature EOF on channel with zlib plus 7 other ... artifact: 5f48ddc515 user: ferrieux
21:39 • Ticket [2953175fff]: 4 changes artifact: e21e66c28e user: ferrieux
2010-02-19
01:01 • Ticket [2953175fff]: 4 changes artifact: 3ba5e0e3ee user: ferrieux
2010-02-17
17:27 • Ticket [2953175fff]: 4 changes artifact: 262fafd4ac user: dkf
06:48 • Add attachment testeof.tcl to ticket [2953175fff] artifact: 7ea2abf6ba user: pspjuth
06:48 • Ticket [2953175fff] Premature EOF on channel with zlib status still Open wit... artifact: 13ffda1d15 user: pspjuth
2010-02-16
23:48 • New ticket [2953175fff]. artifact: c7baab6a74 user: pspjuth

Premature EOF on channel with zlib

Closed / Duplicate2953175fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2010-02-16 23:48:13
Looking at intermittent failures in http11-2.6 to http11-2.8, I got
it distilled to the attached test case.

Some combination of:
The server closing the socket before the client starts reading.
Adding zlib by "zlib push".
Gives a premature eof on the channel.

In the script, eof is signalled before all data is received.
If the 500 ms wait is removed, allowing the reader
to start before the server closes, it works.

The failures in http11-2.6 to 8 happens when the httpd
server process is fast enough to close the socket before
the client process starts to read data.
pspjuthplain2010-02-17 06:48:14
File Added - 363217: testeof.tcl
dkfplain2010-02-17 17:27:41
While I quite agree that it is probably a problem with the zlib channel code, I don't know what the problem is. But whatever *is* the problem, it's either in ZlibTransformInput or it's due to some issue with a channel that needs multiple events delivering in order to drain the already-read buffers. Or maybe it is even due to trying to read the header when nothing has been received yet at all. I don't know.
ferrieuxplain2010-02-19 01:01:32
First note that this is kept track of in 2762041.
Then the investigation there shows that the problem arises when a single read/recv() contains both uncompressed and compresses data . Clearly in that case the buffered zlib'd input is not properly passes down the stack.
ferrieuxplain2010-02-22 21:39:19
s/sses/ssed
fscking iPhone hard-to-disable localized spell-checker !
ferrieuxplain2010-02-22 21:39:55
allow_comments - 1
Log in (anonymous is fine) to add a comment.

Attachments: