watchdogd stat location

Oleksandr Rybalko ray at ddteam.net
Fri Sep 27 19:19:31 UTC 2019


пт, 27 вер. 2019 о 19:22 Warner Losh <imp at bsdimp.com> пише:

> On Fri, Sep 27, 2019 at 9:36 AM mike tancsa <mike at sentex.net> wrote:
>
> > We sometimes run into an issue where our embedded devices that boot off
> > a read only SD card, hang with a controller error.  Its not clear if
> > this is a BIOS/firmware/SDCard or driver bug issue. Its pretty
> > infrequent, but annoying enough that I started to dig to see why the box
> > is not rebooting via the hardware watchdog.   It seems to fail to reboot
> > the box as the stat that it does on the filesystem is off the md backed
> > /etc which is not impacted.  I know I could run an external program, but
> > would it be safer to change the default directory where the stat is done
> > to something that is generally not mounted via ramdisk ?
> >
> > eg.
> >
> >
> >  diff -u watchdogd.c.orig watchdogd.c
> > --- watchdogd.c.orig    2019-09-27 10:51:04.273113000 -0400
> > +++ watchdogd.c 2019-09-27 10:51:23.592200000 -0400
> > @@ -365,7 +365,7 @@
> >                 if (test_cmd != NULL)
> >                         failed = system(test_cmd);
> >                 else
> > -                       failed = stat("/etc", &sb);
> > +                       failed = stat("/boot", &sb);
> >
> >                 error = watchdog_getuptime(&ts_end);
> >                 if (error) {
> >
>
> I think this is good.
>
> Warner
> _______________________________________________
> freebsd-embedded at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-embedded
> To unsubscribe, send any mail to "freebsd-embedded-unsubscribe at freebsd.org
> "
>

Why not just stat "/".

I think embedded devices may have monolithic kernel w/o any loadable
modules and book config.

-- 
WBW
-------
Rybalko Aleksandr <ray at ddteam.net>


More information about the freebsd-embedded mailing list