kern/139604: [patch] ichwd watchdog sometimes does not enable
Dmitrij Tejblum
tejblum at yandex-team.ru
Wed Oct 14 15:20:02 UTC 2009
>Number: 139604
>Category: kern
>Synopsis: [patch] ichwd watchdog sometimes does not enable
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Oct 14 15:20:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Dmitrij Tejblum
>Release: 7.2-STABLE
>Organization:
OOO Yandex
>Environment:
>Description:
ichwd process watchdog commands with the following code snippet:
if (timeout != sc->timeout) {
if (!sc->active)
ichwd_tmr_enable(sc);
ichwd_tmr_set(sc, timeout);
}
ichwd_tmr_reload(sc);
I.e., ichwd is not enabled when timeout == sc->timeout
>How-To-Repeat:
Suppose you have ichwd configured and watchdogd running. If you stop watchdogd (/etc/rc.d/watchdogd stop) and then start it back (/etc/rc.d/watchdogd start), ichwd will not be enabled. Do it with sysctl debug.bootverbose=1, then ichwd print debug messages.
>Fix:
Patch attached with submission follows:
--- sys/dev/ichwd/ichwd.c 2009-06-11 22:10:17.000000000 +0400
+++ sys/dev/ichwd/ichwd.c 2009-10-14 16:39:46.000000000 +0400
@@ -316,11 +316,10 @@
cmd &= WD_INTERVAL;
timeout = ((uint64_t)1 << cmd) / ICHWD_TICK;
if (cmd) {
- if (timeout != sc->timeout) {
- if (!sc->active)
- ichwd_tmr_enable(sc);
+ if (!sc->active)
+ ichwd_tmr_enable(sc);
+ if (timeout != sc->timeout)
ichwd_tmr_set(sc, timeout);
- }
ichwd_tmr_reload(sc);
*error = 0;
} else {
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list