Will the watchdog reset if the kernel panics?

Does anyone know that if the watchdog timer is enabled, will a kernel panic still allow the watchdog to reset? Since it’s not an external watchdog, I wasn’t sure what would happen.

I’ve seen some cases where the kernel will panic and completely “brick” my device until it is manually rebooted. I haven’t had a chance to debug why the kernel panics at what seems like random times, so I need to do some investigation. However, my band-aid to the problem would be to enable the watchdog timer so that it will automatically reboot. I would just try it, but I’m having a hard time reproducing a kernel panic.

Also, on a side note, how do you change the default duration of 60 seconds? It seems like this info would be all over the internet, but I haven’t found anywhere that talks about this.

I figured out how to change the watchdog duration. The example program is here:
http://embeddedfreak.wordpress.com/2010/08/23/howto-use-linux-watchdog/

And a good description of the available commands is here:
https://github.com/shengchao/beaglebone-angstrom-xenomai/blob/master/Documentation/watchdog/watchdog-api.txt

However, my first question regarding the kernel panic still remains. Also, if I do get a kernel panic, how do I record the error message/code so that I can debug it later?

Hi Brent,

I figured out how to change the watchdog duration. The example program is here:
http://embeddedfreak.wordpress.com/2010/08/23/howto-use-linux-watchdog/

And a good description of the available commands is here:
https://github.com/shengchao/beaglebone-angstrom-xenomai/blob/master/Documentation/watchdog/watchdog-api.txt

However, my first question regarding the kernel panic still remains. Also, if I do get a kernel panic, how do I record the error message/code so that I can debug it later?

Regarding rebooting on a panic, take a look at sysctl(8) and
kernel.panic. You may also be interested in kernel.panic_on_oops:

https://github.com/torvalds/linux/blob/master/Documentation/sysctl/kernel.txt#L520

I don't know of an easy way to record the information dumped from the panic.

Frank

I don’t know of an easy way to record the information dumped from the panic.

Best way would be to use the Serial Debug interface. Either that, or some complex remote debug / logging system. Just a quick thought though. Perhaps moving all log files to an NFS share ?