From: Christopher Faulet Date: Fri, 24 Jul 2020 14:31:14 +0000 (+0200) Subject: BUG/MEDIUM: mux-h1: Wakeup the H1C in h1_rcv_buf() if more data are expected X-Git-Tag: v2.1.8~11 X-Git-Url: http://git.haproxy.org/?a=commitdiff_plain;h=7da9bcc55dd23f155aad4f1376977c5d3f944d7d;p=haproxy-2.1.git BUG/MEDIUM: mux-h1: Wakeup the H1C in h1_rcv_buf() if more data are expected After the input processing, in h1_rcv_buf(), if more data are expected and the H1C is not subscribed on receives, we now wake up the H1C to try to read more data ASAP. This reverts commit a1dde23e. Depending on how data are received, subscribing on receives at this stage may freeze the H1 connection because a read event is missing. This bug seems to no exist in the 2.2 because of changes on the connection subscriptions. But we must be careful because I don't really know why the read event is missed. Moreover, the bug fixed by the commit a1dde23e will be fixed another way in the next commit. This patch should fix the issue #774. It must be backported to 2.0. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index d2f266a..0fe0475 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -2646,7 +2646,7 @@ static size_t h1_rcv_buf(struct conn_stream *cs, struct buffer *buf, size_t coun TRACE_STATE("disable splicing", H1_EV_STRM_RECV, h1c->conn, h1s); } if (h1m->state != H1_MSG_DONE && !(h1c->wait_event.events & SUB_RETRY_RECV)) - h1c->conn->xprt->subscribe(h1c->conn, h1c->conn->xprt_ctx, SUB_RETRY_RECV, &h1c->wait_event); + tasklet_wakeup(h1c->wait_event.tasklet); } TRACE_LEAVE(H1_EV_STRM_RECV, h1c->conn, h1s,, (size_t[]){ret}); return ret;