Menu

#4547 Premature EOF on channel with zlib

obsolete: 8.6b1.1
closed-duplicate
57. zlib (24)
5
2010-02-22
2010-02-16
No

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.

Discussion

  • Peter Spjuth

    Peter Spjuth - 2010-02-16
     
  • Donal K. Fellows

    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.

     
  • Alexandre Ferrieux

    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.

     
  • Alexandre Ferrieux

    s/sses/ssed
    fscking iPhone hard-to-disable localized spell-checker !

     
  • Alexandre Ferrieux

    • status: open --> closed-duplicate