mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* How to compile kernel so it automatically reboots upon a crash instead of generating stack trace and then hang.
@ 2008-03-12  4:52 Prakhar Krishna
  2008-03-12  5:04 ` Jan Engelhardt
  2008-03-12  8:53 ` Sebastien Dugue
  0 siblings, 2 replies; 5+ messages in thread
From: Prakhar Krishna @ 2008-03-12  4:52 UTC (permalink / raw)
  To: linux-kernel

[I did search the mailing lists archives and the Web but did not find an answer,
 apololgies if this is duplicate question]

i need my linux box to automatically reboot if it ever runs into a
kernel panic/crash etc.
For my production evvironment, it is not desired that kernel generate the stack
trace and then wait there. We want it to reboot and comeback up again.

if this has already been answered (i seriously think it should have
been), please
direct me to the answer else any details would be helpful.

I am not subscribed so please CC me on the reply.

thanks
PK

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to compile kernel so it automatically reboots upon a crash instead of generating stack trace and then hang.
  2008-03-12  4:52 How to compile kernel so it automatically reboots upon a crash instead of generating stack trace and then hang Prakhar Krishna
@ 2008-03-12  5:04 ` Jan Engelhardt
  2008-03-12 10:40   ` Bart Van Assche
  2008-03-12  8:53 ` Sebastien Dugue
  1 sibling, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2008-03-12  5:04 UTC (permalink / raw)
  To: Prakhar Krishna; +Cc: linux-kernel


On Mar 11 2008 23:52, Prakhar Krishna wrote:
>
>[I did search the mailing lists archives and the Web but did not find an answer,
> apololgies if this is duplicate question]
>
>i need my linux box to automatically reboot if it ever runs into a
>kernel panic/crash etc.

panic=<timeout> boot parameter, as per 
Documentation/kernel-parameters.txt.

>For my production evvironment, it is not desired that kernel generate the stack
>trace and then wait there. We want it to reboot and comeback up again.

Kernel panic is not the only problem one can run into; there are
also deadlocks-after-oops situations, in which case some sort of
watchdog is best for triggering reboots.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to compile kernel so it automatically reboots upon a crash instead of generating stack trace and then hang.
  2008-03-12  4:52 How to compile kernel so it automatically reboots upon a crash instead of generating stack trace and then hang Prakhar Krishna
  2008-03-12  5:04 ` Jan Engelhardt
@ 2008-03-12  8:53 ` Sebastien Dugue
  1 sibling, 0 replies; 5+ messages in thread
From: Sebastien Dugue @ 2008-03-12  8:53 UTC (permalink / raw)
  To: Prakhar Krishna; +Cc: linux-kernel


  Hi Prakhar,

On Tue, 11 Mar 2008 23:52:00 -0500 "Prakhar Krishna" <prakhar2@gmail.com> wrote:

> [I did search the mailing lists archives and the Web but did not find an answer,
>  apololgies if this is duplicate question]
> 
> i need my linux box to automatically reboot if it ever runs into a
> kernel panic/crash etc.
> For my production evvironment, it is not desired that kernel generate the stack
> trace and then wait there. We want it to reboot and comeback up again.
> 
> if this has already been answered (i seriously think it should have
> been), please
> direct me to the answer else any details would be helpful.
> 

  This screams 'hardware watchdog' to me, as there are situations when the kernel
is completely hung.

  Sebastien.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to compile kernel so it automatically reboots upon a crash instead of generating stack trace and then hang.
  2008-03-12  5:04 ` Jan Engelhardt
@ 2008-03-12 10:40   ` Bart Van Assche
  2008-03-13 12:07     ` Prakhar Krishna
  0 siblings, 1 reply; 5+ messages in thread
From: Bart Van Assche @ 2008-03-12 10:40 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Prakhar Krishna, linux-kernel

On Wed, Mar 12, 2008 at 6:04 AM, Jan Engelhardt <jengelh@computergmbh.de> wrote:
>
>  On Mar 11 2008 23:52, Prakhar Krishna wrote:
>  >
>  >[I did search the mailing lists archives and the Web but did not find an answer,
>  > apololgies if this is duplicate question]
>  >
>  >i need my linux box to automatically reboot if it ever runs into a
>  >kernel panic/crash etc.
>
>  panic=<timeout> boot parameter, as per
>  Documentation/kernel-parameters.txt.

The best solution in this case is a hardware watchdog. Hardware
watchdogs are present on some server motherboards, most embedded x86
CPU boards and also in PowerPC CPU's. The Linux kernel supports some
hardware watchdogs, see also Device Drivers/Watchdog Timer Support in
the Linux kernel config.

The nmi_watchdog=<timeout> parameter might be interesting too. See
also Documentation/nmi_watchdog.txt.

Bart.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to compile kernel so it automatically reboots upon a crash instead of generating stack trace and then hang.
  2008-03-12 10:40   ` Bart Van Assche
@ 2008-03-13 12:07     ` Prakhar Krishna
  0 siblings, 0 replies; 5+ messages in thread
From: Prakhar Krishna @ 2008-03-13 12:07 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: Jan Engelhardt, linux-kernel

thanks everyone for the information.

can it be presumed that boot option panic=<x> would always reboot the machine
upon a crash/null pointer dereference if it is not stuck in a
deadlock? also, is there any
place in kernel where, if desired, the panic time can be hardcoded and compiled
for my specific test kernel.

intention is to look for a way to make a regular PC with linux OS
behave close to a
customized hardware appliance through software only mechanism. that
way it becomes
much easier to send just software to the users, which they can load on any
PC without requiring them to have additional hardware inserted into it.

please CC me on replies.

thanks
PK

On Wed, Mar 12, 2008 at 5:40 AM, Bart Van Assche
<bart.vanassche@gmail.com> wrote:
> On Wed, Mar 12, 2008 at 6:04 AM, Jan Engelhardt <jengelh@computergmbh.de> wrote:
> >
> >  On Mar 11 2008 23:52, Prakhar Krishna wrote:
> >  >
> >  >[I did search the mailing lists archives and the Web but did not find an answer,
> >  > apololgies if this is duplicate question]
> >  >
> >  >i need my linux box to automatically reboot if it ever runs into a
> >  >kernel panic/crash etc.
> >
> >  panic=<timeout> boot parameter, as per
> >  Documentation/kernel-parameters.txt.
>
> The best solution in this case is a hardware watchdog. Hardware
> watchdogs are present on some server motherboards, most embedded x86
> CPU boards and also in PowerPC CPU's. The Linux kernel supports some
> hardware watchdogs, see also Device Drivers/Watchdog Timer Support in
> the Linux kernel config.
>
> The nmi_watchdog=<timeout> parameter might be interesting too. See
> also Documentation/nmi_watchdog.txt.
>
> Bart.
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-03-13 12:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-12  4:52 How to compile kernel so it automatically reboots upon a crash instead of generating stack trace and then hang Prakhar Krishna
2008-03-12  5:04 ` Jan Engelhardt
2008-03-12 10:40   ` Bart Van Assche
2008-03-13 12:07     ` Prakhar Krishna
2008-03-12  8:53 ` Sebastien Dugue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®