Will the watchdog reset if the kernel panics?

544 views
Skip to first unread message

Brent

unread,
Sep 11, 2014, 9:15:02 PM9/11/14
to beagl...@googlegroups.com
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.

Brent

unread,
Sep 12, 2014, 12:52:21 AM9/12/14
to beagl...@googlegroups.com
I figured out how to change the watchdog duration.  The example program is here:

And a good description of the available commands is here:

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?

Frank Hunleth

unread,
Sep 12, 2014, 9:29:50 AM9/12/14
to beagl...@googlegroups.com
Hi Brent,

On Fri, Sep 12, 2014 at 12:52 AM, Brent <bren...@hotmail.com> wrote:
>
> 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

>
> On Thursday, September 11, 2014 9:15:02 PM UTC-4, Brent wrote:
>>
>> 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.
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

William Hermans

unread,
Sep 12, 2014, 1:43:42 PM9/12/14
to beagl...@googlegroups.com
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 ?
Reply all
Reply to author
Forward
0 new messages