Page MenuHomeFreeBSD

Add a new 'exit timeout' option to watchdogd, used to specify the timeout to leave in effect when the program exits.
AbandonedPublic

Authored by ian on May 15 2015, 6:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 16 2024, 3:29 AM
Unknown Object (File)
Mar 12 2024, 7:44 AM
Unknown Object (File)
Mar 12 2024, 7:34 AM
Unknown Object (File)
Mar 4 2024, 3:15 AM
Unknown Object (File)
Jan 13 2024, 10:18 AM
Unknown Object (File)
Jan 4 2024, 5:24 PM
Unknown Object (File)
Dec 28 2023, 7:37 AM
Unknown Object (File)
Dec 19 2023, 11:03 PM
Subscribers

Details

Reviewers
alfred
Group Reviewers
manpages
Summary

Watchdogd currently disables the watchdog when it exits, such as during rc.shutdown processing. That leaves the system vulnerable to getting hung or deadlocked during the shutdown part of a reboot. For embedded systems it's especially important that the hardware watchdog always be active. It can also be useful for servers that are administered remotely.

The new -x <seconds> option tells watchdogd to program the watchdog with the given timeout just before exiting.

The exit value is also used internally in the "failsafe" handling (which used to just disable the watchdog), on the theory that if you're using this option, "safe" means having the watchdog always running, not disabled.

The default is still to disable the watchdog on exit if -x is not specified.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

ian retitled this revision from to Add a new 'exit timeout' option to watchdogd, used to specify the timeout to leave in effect when the program exits..
ian updated this object.
ian edited the test plan for this revision. (Show Details)
ian added a reviewer: alfred.
ian set the repository for this revision to rS FreeBSD src repository - subversion.

just curious why watchdogd_sig_stop rc.conf knob is not working for you.

In D2556#47276, @emax wrote:

just curious why watchdogd_sig_stop rc.conf knob is not working for you.

The what?

revolution > grep watchdog /etc/defaults/rc.conf
watchdogd_enable="NO" # Start the software watchdog daemon
watchdogd_flags="" # Flags to watchdogd (if enabled)

In D2556#47282, @emax wrote:

Oh. I had no idea that existed.

That would work but requires that the timeout be the same as the running timeout. I like the idea of a short running timeout and a longer one to protect the reboot, especially for the reboot after a software updater has run and there are a zillion buffers to flush to something slow like an sdcard (I've seen that take more than a minute).

Abandoned due to review timeout, but still commited as r286947