From: Christopher Faulet Date: Mon, 20 Feb 2023 13:43:49 +0000 (+0100) Subject: DEBUG: stream: Add a BUG_ON to never exit process_stream with an expired task X-Git-Tag: v2.8-dev5~155 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a62201df5a45f39be67f33d0ba4fc22fb3ce73b0;p=thirdparty%2Fhaproxy.git DEBUG: stream: Add a BUG_ON to never exit process_stream with an expired task We must never exit for the stream processing function with an expired task. Otherwise, we are pretty sure this will ends with a spinning loop. It is really better to abort as far as possible and with the original buggy state. This will ease the debug sessions. --- diff --git a/src/stream.c b/src/stream.c index e6beded879..3a9784ef53 100644 --- a/src/stream.c +++ b/src/stream.c @@ -2579,6 +2579,8 @@ struct task *process_stream(struct task *t, void *context, unsigned int state) t->expire = tick_first(t->expire, s->conn_exp); + BUG_ON(tick_is_expired(t->expire, now_ms)); + s->pending_events &= ~(TASK_WOKEN_TIMER | TASK_WOKEN_RES); stream_release_buffers(s);