DEBUG: wdt: set the default blocked task delay to 100 ms

The warn-blocked-traffic-after can be significantly lowered. In any
case, in order to be usable it must be well below the limit to have a
chance to emit exploitable traces before the watchdog finally fires.
Even configured at 1ms it looks very difficult to trigger it on a
laptop doing SSL and compression, so applying a 100-fold factor to
cover for large configs and small machines sounds sane for 3.1. In any
case, even at 100ms, the service degradation becomes quite visible.
This commit is contained in:
Willy Tarreau 2024-11-06 17:51:57 +01:00
parent 84dd05e7d8
commit 5f4fe20116
2 changed files with 2 additions and 2 deletions

View File

@ -4398,7 +4398,7 @@ quiet
warn-blocked-traffic-after <time> warn-blocked-traffic-after <time>
This allows to adjust the delay after which a stuck task blocking the traffic This allows to adjust the delay after which a stuck task blocking the traffic
will trigger the emission of a warning on the standard error output. The will trigger the emission of a warning on the standard error output. The
delay is expressed in milliseconds and defaults to 1000 ms. Permitted values delay is expressed in milliseconds and defaults to 100 ms. Permitted values
must be comprised between 1 ms and 1000 ms included. Lower values will must be comprised between 1 ms and 1000 ms included. Lower values will
trigger warnings frequently and higher ones will rarely. The watchdog will trigger warnings frequently and higher ones will rarely. The watchdog will
kill a runaway task that fails to respond twice for one second anyway, so a kill a runaway task that fails to respond twice for one second anyway, so a

View File

@ -44,7 +44,7 @@ static struct {
} per_thread_wd_ctx[MAX_THREADS]; } per_thread_wd_ctx[MAX_THREADS];
/* warn about stuck tasks after this delay (ns) */ /* warn about stuck tasks after this delay (ns) */
static unsigned int wdt_warn_blocked_traffic_ns = 1000000000U; static unsigned int wdt_warn_blocked_traffic_ns = 100000000U;
/* Setup (or ping) the watchdog timer for thread <thr>. Returns non-zero on /* Setup (or ping) the watchdog timer for thread <thr>. Returns non-zero on
* success, zero on failure. It interrupts once per second of CPU time. It * success, zero on failure. It interrupts once per second of CPU time. It