[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNU Mach, kern/debug.c, panic() (was: weirdo panic)

From: Thomas Schwinge
Subject: GNU Mach, kern/debug.c, panic() (was: weirdo panic)
Date: Thu, 24 Feb 2005 15:41:00 +0100
User-agent: Mutt/

I wrote:
>    How can I tell GNU Mach _not_ to reboot the system on this ...

Recompiling GNU Mach with '--enable-kdb' was enough (and most probably
more helpful).

On Wed, Feb 23, 2005 at 01:01:05PM +0100, Alfred M. Szmidt wrote:
> Hack panic() and add a for-ever loop.

panic() already has a delay loop that should wait for 1000s (using
delay()) before rebooting.

        /* Give the user time to see the message */
          int i = 1000;         /* seconds */
          while (i--)
            delay (1000000);    /* microseconds */

#if     MACH_KDB
        halt_all_cpus (1);

/* Someone with time should write code to set cpuspeed automagically */
int cpuspeed = 4;
#define DELAY(n)        { register int N = cpuspeed * (n); while (--N > 0); }

'cpuspeed = 4' seems to be way too low.
A quick test showed that 'delay (1000000)' would take something around
one second for 'cpuspeed = 700' on my system (AthlonXP something).

Fri Apr 24 13:19:40 1998  Thomas Bushnell n/BSG  <thomas@melange.gnu.org>

        * kern/debug.c (panic): Increase "seconds" in delay to 1000; machines
        are faster now.

Machines are still getting faster...

Wed Feb 12 16:22:07 1997  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

        * kernel/kern/debug.c (panic): Insert a delay loop.  Do a reboot
        instead of a mere halt.

Rebooting instead of halting the system enabling the user to write down
the error message implies (at least to me) that reports of kernel
crashes are not valuable.  Correct?  Perhaps they are only void if
gnumach is stripped?
If they are valuable I'd suggest to use 'halt_all_cpus (0);' instead of
'halt_all_cpus (1);' in kern/debug.c to halt the system in panic().

At least the delay loop really should be a delay loop.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]