RPi - watchdogd not working anymore (since r273154+)

Andreas Schwarz freebsd.asc at strcmp.org
Wed Dec 10 05:29:36 UTC 2014


On 09.12.14, Ian Lepore wrote:

Hi Ian,

> watchdogd requests a timeout of approximately 128 seconds.  It used to
> pet the dog once per second, and recently it was changed to only do so
> once every 10 seconds for efficiency.
>
> The rpi watchdog hardware is unable to set a timeout longer than 15
> seconds, but a bug in the driver let the value wrap around then get
> bitmasked such that the request for a 128 second timeout was actually
> getting handled as a 9 second timeout.  The 9 second thing worked when
> we were petting the dog once a second, but now fails at once every 10
> seconds.
>
> I've got a fix for the wrapping problem, but all it will do is make the
> timer not get set at all if you ask for 128 seconds (that's what the
> interface for watchdogs requires, don't set the timer if can't be at
> least as long as requested).
>
> To fix your problem you'll need to set watchdogd_flags="-s 4 -t 8" in
> your rc.conf.  That will make the timeout 8 seconds and pet the dog
> every 4 seconds.  You don't have too many options for the timeout value
> (-t) because of the goofy way the timeout is represented in the kernel.
> The only choices that work on rpi are 1,2,4,8 seconds.  If you ask for 9
> it gets represented as a value that translates to 17.5 seconds and rpi
> can't do it.

Thank you for your copious explanation. I understand the problem and
was able to run the watchdog again. In general, it's a litte bit unsatisfying, 
that we have a (limited) watchdog hardware which will not fit the requirements 
of the freebsd watchdog implementation (which normally should cover all 
the watchdog hardware).

best regards,
Andreas



More information about the freebsd-arm mailing list