From: Willy Tarreau Date: Mon, 4 Jul 2022 12:07:29 +0000 (+0200) Subject: BUG/MEDIUM: thread: check stopping thread against local bit and not global one X-Git-Tag: v2.7-dev2~111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24cfc9f76e5cb45c2e5d923b51aba0660ac3e1e3;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: thread: check stopping thread against local bit and not global one Commit ef422ced9 ("MEDIUM: thread: make stopping_threads per-group and add stopping_tgroups") moved the stopping_threads mask to per-group, but one test in the loop preserved its global value instead, resulting in stopping threads never sleeping on stop and eating 100% CPU until all were stopped. No backport is needed. --- diff --git a/src/haproxy.c b/src/haproxy.c index 145c19af98..e8c209e95c 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2818,7 +2818,7 @@ void run_poll_loop() if (stopping) { /* stop muxes before acknowledging stopping */ - if (!(tg_ctx->stopping_threads & tid_bit)) { + if (!(tg_ctx->stopping_threads & ti->ltid_bit)) { task_wakeup(mux_stopping_data[tid].task, TASK_WOKEN_OTHER); wake = 1; }