Skip to content

Commit 5f4fe20

Browse files
committed
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.
1 parent 84dd05e commit 5f4fe20

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doc/configuration.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4398,7 +4398,7 @@ quiet
43984398
warn-blocked-traffic-after <time>
43994399
This allows to adjust the delay after which a stuck task blocking the traffic
44004400
will trigger the emission of a warning on the standard error output. The
4401-
delay is expressed in milliseconds and defaults to 1000 ms. Permitted values
4401+
delay is expressed in milliseconds and defaults to 100 ms. Permitted values
44024402
must be comprised between 1 ms and 1000 ms included. Lower values will
44034403
trigger warnings frequently and higher ones will rarely. The watchdog will
44044404
kill a runaway task that fails to respond twice for one second anyway, so a

src/wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static struct {
4444
} per_thread_wd_ctx[MAX_THREADS];
4545

4646
/* warn about stuck tasks after this delay (ns) */
47-
static unsigned int wdt_warn_blocked_traffic_ns = 1000000000U;
47+
static unsigned int wdt_warn_blocked_traffic_ns = 100000000U;
4848

4949
/* Setup (or ping) the watchdog timer for thread <thr>. Returns non-zero on
5050
* success, zero on failure. It interrupts once per second of CPU time. It

0 commit comments

Comments
 (0)