watchdogd_flags followed by panic watchdog timeout, after reboot my rc.conf disappear

Stefan Bethke stb at lassitu.de
Mon Sep 4 02:16:43 PDT 2006


[ Please do not crosspost. ]

Am 02.09.2006 um 01:01 schrieb Daniel Dvořák:

> In the /etc/defaults/rc.conf there are not "watchdogd_flags="""  
> option, but
> I tried to wrote it to my /etc/rc.conf in this way:
>
> watchdogd_enable="YES"
> watchdogd_flags="-e ping 10.40.0.72 -s 2 -t 1"

You probably would have wanted "-e 'ping 10.40.0.72 -s2 -t1'".   
Without the single quotes, the command is just ping, which will exit  
with 64 (EX_USAGE), so the command never completes successfully, and  
the kernel watchdog timer is never reset.  Hence the watchdog timeout.

It's a bug in watchdogd that it does not complain about the extra  
arguments.

> I saved my rc.conf without any doubt.
>
> I did so, because I wanted to instruct watchdogd to execute my  
> command,
> common pinging some IP address. I was not satisfied with a trivial  
> file
> system check instead.
>
> After saving the rc.conf file, I restarted watchdogd deamon at once.
>
> ... and ... 2 seconds ... my ssh client was disconnected ...  
> unexpected end
> of ssh session. :)

Most likely, the rc.conf changes had not been committed to disk when  
the watchdog timeout occurred, so they got lost.

The watchdog facility is meant to recover the machine from serious  
problems (like deadlocks, livelocks, or similar).  As such, it will  
not do a proper shutdown, since the machine is probably in a state  
where the shutdown would also hang.  It's a last-ditch effort to get  
the machine to be responsible again, even if there might be damage  
due to the sudden panic/reboot.

If you want to reboot your router when network connectivity is  
problematic, I'd set up a cron job to run ping and invoke shutdown -r  
if it fails instead.


Stefan

-- 
Stefan Bethke <stb at lassitu.de>   Fon +49 170 346 0140




More information about the freebsd-stable mailing list