]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: debug: protect ha_dump_backtrace() against risks of re-entrance
authorWilly Tarreau <w@1wt.eu>
Fri, 4 Apr 2025 16:11:23 +0000 (18:11 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 17 Apr 2025 14:25:47 +0000 (16:25 +0200)
commitd20e9cad6733d9a525ccfad63ef482d6ea63a676
tree21f50a9c244a80777bcb62036d7319156d3b5ed7
parent2dfb63313b0d2b9d4d636dbd23688d6a20cba2cf
MINOR: debug: protect ha_dump_backtrace() against risks of re-entrance

If a thread is dumping itself (warning, show thread etc) and another one
wants to dump the state of all threads (e.g. panic), it may interrupt the
first one during backtrace() and re-enter it from the signal handler,
possibly triggering a deadlock in the underlying libc. Let's postpone
the debug signal delivery at this point until the call ends in order to
avoid this.
src/debug.c