BUG/MAJOR: fix freezes during compression
authorWilly Tarreau <w@1wt.eu>
Sat, 25 Jan 2014 01:26:39 +0000 (02:26 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 25 Jan 2014 21:28:22 +0000 (22:28 +0100)
commit4afd70aeaba5ca2952e60f978701c7f98dc438ae
treebfcb8529505a8f0f5c8b2da93c77e0e1ef8ce8eb
parentd153b3b09615d850dbced3ff6362b3117182821d
BUG/MAJOR: fix freezes during compression

Recent commit d7ad9f5 ("MAJOR: channel: add a new flag CF_WAKE_WRITE to
notify the task of writes") introduced this new CF_WAKE_WRITE flag that
an analyser which requires some free space to write must set if it wants
to be notified.

Unfortunately, some places were missing. More specifically, the
compression engine can rarely be stuck by a lack of output space,
especially when dealing with non-compressible data. It then has to
stop until some pending data are flushed and for this it must set
the CF_WAKE_WRITE flag. But these cases were missed by the commit
above.

Fortunately, this change was introduced very recently and never
released, so the impact was limited.

Huge thanks to Sander Klein who first reported this issue and who kindly
and patiently provided lots of traces and test data that made it possible
to reproduce, analyze, then fix this issue.
src/proto_http.c