BUG/MEDIUM: h2: always add a stream to the send or fctl list when blocked
authorWilly Tarreau <w@1wt.eu>
Fri, 30 Mar 2018 15:35:38 +0000 (17:35 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 30 Mar 2018 15:43:49 +0000 (17:43 +0200)
commitb2e290acb68fd5b7387ba74d0a601934e3a6f5a0
tree3d4b5816b91f7b1d11cbf2b89505e0994836fd22
parent1a1dd6066fb3b3ea88969d277c6f5030b5b380ab
BUG/MEDIUM: h2: always add a stream to the send or fctl list when blocked

When a stream blocks on a mux buffer full/unallocated or on connection
flow control, a flag among H2_SF_MUX_M* is set, but the stream is not
always added to the connection's list. It's properly done when the
operations are performed from the connection handler but not always when
done from the stream handler. For instance, a simple shutr or shutw may
fail by lack of room. If it's immediately followed by a call to h2_detach(),
the stream remains lying around in no list at all, and prevents the
connection from ending. This problem is actually quite difficult to
trigger and seems to require some large objects and low server-side
timeouts.

This patch covers all identified paths. Some are redundant but since the
code will change and will be simplified in 1.9, it's better to stay on
the safe side here for now. It must be backported to 1.8.
src/mux_h2.c