]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: thread: check stopping thread against local bit and not global one
authorWilly Tarreau <w@1wt.eu>
Mon, 4 Jul 2022 12:07:29 +0000 (14:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 4 Jul 2022 12:09:39 +0000 (14:09 +0200)
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.

src/haproxy.c

index 145c19af98c353a90f344614713d981dd803570b..e8c209e95caeae6ef411198a42d9ea0b4c7f53e9 100644 (file)
@@ -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;
                                }