Date: Fri, 27 Sep 2019 22:19:16 +0300 From: Oleksandr Rybalko <ray@ddteam.net> To: Warner Losh <imp@bsdimp.com> Cc: mike tancsa <mike@sentex.net>, freebsd-embedded <freebsd-embedded@freebsd.org> Subject: Re: watchdogd stat location Message-ID: <CAJ1Oi8FsG=nEBXdd0CS3U2zZSgh=SMcBO0ieY-KT5b1iDVFmJg@mail.gmail.com> In-Reply-To: <CANCZdfp6bym5b6eFXFH0MxjYsAX%2B1Bi9fGXgp7sFM206zmsveQ@mail.gmail.com> References: <5eba25eb-9ba4-0c93-27c8-e834491298ad@sentex.net> <CANCZdfp6bym5b6eFXFH0MxjYsAX%2B1Bi9fGXgp7sFM206zmsveQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
=D0=BF=D1=82, 27 =D0=B2=D0=B5=D1=80. 2019 =D0=BE 19:22 Warner Losh <imp@bsd= imp.com> =D0=BF=D0=B8=D1=88=D0=B5: > On Fri, Sep 27, 2019 at 9:36 AM mike tancsa <mike@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 bo= x > > is not rebooting via the hardware watchdog. It seems to fail to reboo= t > > 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, bu= t > > would it be safer to change the default directory where the stat is don= e > > 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 !=3D NULL) > > failed =3D system(test_cmd); > > else > > - failed =3D stat("/etc", &sb); > > + failed =3D stat("/boot", &sb); > > > > error =3D watchdog_getuptime(&ts_end); > > if (error) { > > > > I think this is good. > > Warner > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@freebsd.or= g > " > Why not just stat "/". I think embedded devices may have monolithic kernel w/o any loadable modules and book config. --=20 WBW ------- Rybalko Aleksandr <ray@ddteam.net>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ1Oi8FsG=nEBXdd0CS3U2zZSgh=SMcBO0ieY-KT5b1iDVFmJg>