]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MAJOR: stream_interface: certain workloads could cause get stuck
authorWilly Tarreau <w@1wt.eu>
Mon, 19 Nov 2012 15:43:14 +0000 (16:43 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 19 Nov 2012 16:11:00 +0000 (17:11 +0100)
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.

src/stream_interface.c

index c84763274bc658740d29182e31cdcb643f100403..07f9c3dab2651ce563f637d128fbbc2eec3cb38a 100644 (file)
@@ -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);
        }