]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: wdt: don't trigger the watchdog when p is unitialized
authorWilliam Lallemand <wlallemand@haproxy.org>
Fri, 13 May 2022 09:03:39 +0000 (11:03 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 13 May 2022 09:28:08 +0000 (11:28 +0200)
commitae053b30da4db588f7fabe09e5f85cbebdc421ad
tree6ec2643d19810a5e50b522a0072a31f9da258d16
parent60cfe8b823f6af8f67b1be5e2f957464f4540b02
BUG/MEDIUM: wdt: don't trigger the watchdog when p is unitialized

In wdt_handler(), does not try to trigger the watchdog if the
prev_cpu_time wasn't initialized.

This prevents an unexpected trigger of the watchdog when it wasn't
initialized yet. This case could happen in the master just after loading
the configuration. This would show a trace where the <diff> value is equal
to the <now> value in the trace, and the <poll> value would be 0.

For example:

    Thread 1 is about to kill the process.
    *>Thread 1 : id=0x0 act=1 glob=1 wq=0 rq=0 tl=0 tlsz=0 rqsz=0
                  stuck=1 prof=0 harmless=0 wantrdv=0
                  cpu_ns: poll=0 now=6005541706 diff=6005541706
                  curr_task=0

Thanks to Christian Ruppert for repporting the problem.

Could be backported in every stable versions.
src/wdt.c