Page MenuHomeFreeBSD

watchdogd: Add -k kenv option to store the process ID.
Needs ReviewPublic

Authored by ray on Mon, May 25, 8:02 AM.
Tags
None
Referenced Files
F158172536: D57231.id.diff
Fri, May 29, 8:53 AM
F158164983: D57231.id178541.diff
Fri, May 29, 6:15 AM
F158140676: D57231.diff
Thu, May 28, 10:28 PM
Unknown Object (File)
Thu, May 28, 11:07 AM
Unknown Object (File)
Tue, May 26, 11:48 AM
Unknown Object (File)
Mon, May 25, 1:36 PM
Unknown Object (File)
Mon, May 25, 1:34 PM
Subscribers

Details

Reviewers
glebius
imp
pjd
jmg
Summary

Storing the PID in the kernel environment provides access to it when operating
on read-only filesystems. Additionally, it prevents issues with stale PID
files left behind if watchdogd is terminated by SIGKILL.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 73416
Build 70299: arc lint + arc unit

Event Timeline

ray requested review of this revision.Mon, May 25, 8:02 AM

To me this looks like a more generic problem rather than just the watchdogd's problem. Should every daemon have this feature? Or should we say that /var/run shall be mdmfs(8) on hosts with read-only root?

I added authors of the pidfile(3) to add people who definitely thought a lot on this problem.

To me this looks like a more generic problem rather than just the watchdogd's problem. Should every daemon have this feature? Or should we say that /var/run shall be mdmfs(8) on hosts with read-only root?

I added authors of the pidfile(3) to add people who definitely thought a lot on this problem.

IMO, it's good workaround for life critical services in the embedded area. But for generic use, instead of pidfile, we have to design proper subsystem.
Embedded devices have no screen to show an issue, so recover through wd's reset may help with many issues.