]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DEBUG: wdt: better detect apparently locked up threads and warn about them
authorWilly Tarreau <w@1wt.eu>
Wed, 6 Nov 2024 10:21:45 +0000 (11:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 6 Nov 2024 17:35:42 +0000 (18:35 +0100)
commit148eb5875fb7e6c46c0a9eac486dcb7b3bca931d
tree689987db7b1670286644781de1f7d18f7a6653c4
parent0950778b3a13fe31ff83223827d6692076cba5e5
DEBUG: wdt: better detect apparently locked up threads and warn about them

In order to help users detect when threads are behaving abnormally, let's
try to emit a warning when one is no longer making any progress. This will
allow to catch faulty situations more accurately, instead of occasionally
triggering just after the long task. It will also let users know that there
is something wrong with their configuration, and inspect the call trace to
figure whether they're using excessively long rules or Lua for example (the
usual warnings about lua-load vs lua-load-per-thread are still reported).

The warning will only be emitted for threads not yet marked as stuck so
as not to interfere with panic dumps and avoid sending a warning just
before a panic. A tainted flag is set when this happens however (0x2000).
include/haproxy/bug.h
src/debug.c
src/wdt.c