BUG/MEDIUM: mux-h1: Disable the splicing when nothing is received
When nothing is received when xprt->rcv_pipe() is called, and if the pipe is
empty, the mux rcv_buf() callback is called. Because the splicing is enabled,
nothing is performed and the H1 connection is woken up. Unfortunately, the H1
connection will do the same with the H1 stream. Thus, while nothing is received,
a ping-pong loop between the H1 connection and a H1 stream will consume all the
CPU. To avoid this loop, the splicing is disabled in this case. This way, the H1
connection will try to read data and it will wake up the H1 stream only if it
reads something.
This bug was previously fixed by the commit a1dde23 ("BUG/MEDIUM: mux-h1:
Subscribe rather than waking up in h1_rcv_buf()"). But it was reverted because
it relies on not-backported changes on the connection layer.
This patch must be backported to 2.0.
(cherry picked from commit 01bb09d71601285b0f79b1b7ee79be9b14e2a6a0)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed