]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: debug: fix possible hang when multiple threads dump at once
authorWilly Tarreau <w@1wt.eu>
Wed, 13 Jul 2022 06:59:39 +0000 (08:59 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 13 Jul 2022 07:03:02 +0000 (09:03 +0200)
commit672972604f1407e221a52d96b77d1a7a01063baf
treeb4f6a8e9b8b52749bb745fb88ef6e7408780dfaf
parenta5b507521130784fa301a0257e0274b5a496ac9d
BUG/MEDIUM: debug: fix possible hang when multiple threads dump at once

A bug in the thread dumper was introduced by commit 00c27b50c ("MEDIUM:
debug: make the thread dumper not rely on a thread mask anymore"). If
two or more threads try to trigger a thread dump exactly at the same
time, the second one may loop indefinitely trying to set the value to 1
while the other ones will wait for it to finish dumping before leaving.
This is a consequence of a logic change using thread numbers instead of
a thread mask, as threads do not need to see all other ones there anymore.

No backport is needed, this is only for 2.7.
src/debug.c