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
F106084799: D2556.diff
Wed, Dec 25, 3:38 AM
Unknown Object (File)
Mon, Dec 23, 12:19 PM
Unknown Object (File)
Wed, Nov 27, 10:46 AM
Unknown Object (File)
Mon, Nov 25, 6:10 AM
Unknown Object (File)
Nov 11 2024, 10:10 PM
Unknown Object (File)
Nov 11 2024, 7:47 PM
Unknown Object (File)
Nov 11 2024, 6:47 PM
Unknown Object (File)
Oct 7 2024, 12:51 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