From: Willy Tarreau Date: Mon, 19 Nov 2012 15:43:14 +0000 (+0100) Subject: BUG/MAJOR: stream_interface: certain workloads could cause get stuck X-Git-Tag: v1.5-dev13~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f7c6a18;p=thirdparty%2Fhaproxy.git BUG/MAJOR: stream_interface: certain workloads could cause get stuck Some very specifically scheduled workloads could sometimes get stuck when data receive was disabled due to buffer full then re-enabled due to a full send(). A conn_data_want_recv() had to be set again in this specific case. This bug was introduced with connection rework and polling changes in dev12. --- diff --git a/src/stream_interface.c b/src/stream_interface.c index c84763274b..07f9c3dab2 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -578,6 +578,8 @@ static int si_conn_wake_cb(struct connection *conn) } else if ((si->ib->flags & (CF_SHUTR|CF_READ_PARTIAL|CF_DONT_READ|CF_READ_NOEXP)) == CF_READ_PARTIAL && !channel_full(si->ib)) { + /* we must re-enable reading if si_chk_snd() has freed some space */ + __conn_data_want_recv(conn); if (tick_isset(si->ib->rex)) si->ib->rex = tick_add_ifset(now_ms, si->ib->rto); }