bugThe GNU Hurd - Bugs: bug #15301, Please fix -H init option for...

 
 

bug #15301: Please fix -H init option for preventing gnumach from automatically rebooting on panic

Submitter:  Samuel Thibault <sthibaul>
Submitted:  Mon 26 Dec 2005 10:53:31 PM UTC
   
 
Category:  GNU Mach Severity:  2 - Minor
Priority:  5 - Normal Item Group:  None
Status:  In Progress Privacy:  Public
Assigned to:  tschwinge Originator Name:  Robert Millan
Open/Closed:  Open Reproducibility:  Every Time
Size (loc):  Low <30 Planned Release:  GNU Mach 1.4
Effort:  0.00
Wiki-like text discussion box: 


* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 30 Dec 2005 01:04:57 PM UTC, comment #1: 

I hope this patch works...

Soeren D. Schulze <sdschulze>
Mon 26 Dec 2005 10:53:31 PM UTC, original submission:  

From http://bugs.debian.org/184624

From: Robert Millan <rmh@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: reboots unexpectedly after panic
Date: Thu, 13 Mar 2003 20:10:25 +0100

Package: gnumach
Version: 1:20020421-1 (not installed)
Severity: normal

I was running an highly resource consumption process when Mach paniced. The
reason is probably related to bug #82600

But the problem i'm reporting is that Mach unexpectedly rebooted the machine
after panicing. The error message i could read was something similar to:

  panic: kalloc: memory exhausted in zalloc

(it's not exact, as i didn't have time to write it down. there was a number
i ommited and maybe the "zalloc/kalloc" order was reversed)

Mach should realy stop after a panic and let the user read the message,
instead of rebooting.

just in case it helps, my system has 128 MB of RAM and 512 MB of swap.

From: Michael Banck <mbanck@debian.org>
To: Robert Millan <rmh@debian.org>, -email is unavailable-
Subject: Re: Bug #184624: reboots unexpectedly after panic
Date: Mon, 1 Mar 2004 14:53:43 +0100

On Thu, Mar 13, 2003 at 08:10:25PM +0100, Robert Millan wrote:

> I was running an highly resource consumption process when Mach
> paniced. The reason is probably related to bug #82600
>
> But the problem i'm reporting is that Mach unexpectedly rebooted the
> machine after panicing. The error message i could read was something
> similar to:
>
>   panic: kalloc: memory exhausted in zalloc
>
> (it's not exact, as i didn't have time to write it down. there was a
> number i ommited and maybe the "zalloc/kalloc" order was reversed)
>
> Mach should realy stop after a panic and let the user read the
> message, instead of rebooting.


I was just reading the FAQ on http://www.gnu.org/software/hurd/faq.en.html
and noticed this:

--8<--
5.5.  When GNU/Hurd crashes, GNU Mach automatically reboots. Is there
anyway I can make it pause so I can write down the error?

{MB} Pass the `-H' option to init (add it to the boot command line), and
`init' will tell Mach to enter the kernel debugger instead to rebooting
it. At the debugger prompt (`db>'), you can type `reboot' any time to
reboot the system.
--8<--


Maybe that helps in your case?


Michael

From: Robert Millan <zeratul2@wanadoo.es>
To: Michael Banck <mbanck@debian.org>
Cc: -email is unavailable-
Subject: Re: Bug #184624: reboots unexpectedly after panic
Date: Tue, 2 Mar 2004 00:24:12 +0100

On Mon, Mar 01, 2004 at 02:53:43PM +0100, Michael Banck wrote:

> I was just reading the FAQ on http://www.gnu.org/software/hurd/faq.en.html
> and noticed this:
>
> --8<--
> 5.5.  When GNU/Hurd crashes, GNU Mach automatically reboots. Is there
> anyway I can make it pause so I can write down the error?
>
> {MB} Pass the `-H' option to init (add it to the boot command line), and
> `init' will tell Mach to enter the kernel debugger instead to rebooting
> it. At the debugger prompt (`db>'), you can type `reboot' any time to
> reboot the system.
> --8<--
>
>
> Maybe that helps in your case?


I'm not working on GNU/Hurd currently, but I think the default behaviour
instead of reboot should either be halt or enter the debugger.

--
Robert Millan

From: "M. Gerards" <metgerards@student.han.nl>
To: 184624@bugs.debian.org, Robert Millan <zeratul2@wanadoo.es>
Cc: Michael Banck <mbanck@debian.org>
Subject: Re: Bug #184624: reboots unexpectedly after panic
Date: Tue,  2 Mar 2004 11:43:06 +0100

Quoting Robert Millan <zeratul2@wanadoo.es>:

> > {MB} Pass the `-H' option to init (add it to the boot command line), and
> > `init' will tell Mach to enter the kernel debugger instead to rebooting
> > it. At the debugger prompt (`db>'), you can type `reboot' any time to
> > reboot the system.
> > --8<--
> >
> >
> > Maybe that helps in your case?
>
> I'm not working on GNU/Hurd currently, but I think the default behaviour
> instead of reboot should either be halt or enter the debugger.


The `-H' option does not work anymore (please correct me if I am wrong).
This used to work with serverboot, I think there is something wrong with the
bootscript or how Mach or ext2fs.static passes the argument to init.

It is easy to change GNU Mach so it just stops (for (;;); or perhaps just
halting the system) instead of rebooting.  This might be useful when GNU Mach
crashes and you want to report it.

I already have the "for (;;);" hack in my tree.  Perhaps I can even change GNU
Mach so this becomes the default behaviour and you can use an argument to switch
to the old behavior.

Does someone think such patch would be useful?

--
Marco


From: Robert Millan <zeratul2@wanadoo.es>
To: "M. Gerards" <metgerards@student.han.nl>
Cc: 184624@bugs.debian.org, Michael Banck <mbanck@debian.org>
Subject: Re: Bug #184624: reboots unexpectedly after panic
Date: Tue, 2 Mar 2004 14:09:10 +0100

On Tue, Mar 02, 2004 at 11:43:06AM +0100, M. Gerards wrote:

> [...]
>
> I already have the "for (;;);" hack in my tree.  Perhaps I can even change GNU
> Mach so this becomes the default behaviour and you can use an argument to switch
> to the old behavior.
>
> Does someone think such patch would be useful?


I do (although I prefer while(1) ;)

--
Robert Millan

"[..] but the delight and pride of Aule is in the deed of making, and in the
thing made, and neither in possession nor in his own mastery; wherefore he
gives and hoards not, and is free from care, passing ever on to some new work."

 -- J.R.R.T., Ainulindale (Silmarillion)

From: "Alfred M. Szmidt" <ams@kemisten.nu>
To: Robert Millan <zeratul2@wanadoo.es>, -email is unavailable-
Cc: mbanck@debian.org, debian-bugs-dist@lists.debian.org,
        184624@bugs.debian.org, -email is unavailable-
Subject: Re: Bug #184624: reboots unexpectedly after panic
Date: Tue, 2 Mar 2004 15:51:02 +0100 (MET)

   I'm not working on GNU/Hurd currently, but I think the default
   behaviour instead of reboot should either be halt or enter the
   debugger.

The default behaviour shouldn't be a halt.  It is a bitch if you have
Mach crash on you remotley and it is never brought back up.  It is
simple to hack Mach so that it doesn't reboot, add a for-ever loop in
kern/debug.c:panic() or some such.

From: "Alfred M. Szmidt" <ams@kemisten.nu>
To: "M. Gerards" <metgerards@student.han.nl>, -email is unavailable-
Cc: 184624@bugs.debian.org, zeratul2@wanadoo.es,
        debian-bugs-dist@lists.debian.org, mbanck@debian.org, -email is unavailable-
Subject: Re: Bug #184624: reboots unexpectedly after panic
Date: Tue, 2 Mar 2004 16:48:40 +0100 (MET)

   Perhaps I can even change GNU Mach so this becomes the default
   behaviour and you can use an argument to switch to the old
   behavior.

Please don't.  A option that makes GNU Mach halt is ok, the default
should be "quick reboot".

   Does someone think such patch would be useful?

Yes.  But only if the current behaviour is left as default.


From: Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
To: "M. Gerards" <metgerards@student.han.nl>,
        -email is unavailable-
Cc: Robert Millan <zeratul2@wanadoo.es>,
        Michael Banck <mbanck@debian.org>
Subject: Re: Bug #184624: reboots unexpectedly after panic
Date: Tue, 02 Mar 2004 17:27:17 +0100

At Tue,  2 Mar 2004 11:43:06 +0100,
marco_g wrote:

>
> Quoting Robert Millan <zeratul2@wanadoo.es>:
>
> > > {MB} Pass the `-H' option to init (add it to the boot command line), and
> > > `init' will tell Mach to enter the kernel debugger instead to rebooting
> > > it. At the debugger prompt (`db>'), you can type `reboot' any time to
> > > reboot the system.
> > > --8<--
> > >
> > >
> > > Maybe that helps in your case?
> >
> > I'm not working on GNU/Hurd currently, but I think the default behaviour
> > instead of reboot should either be halt or enter the debugger.
>
> The `-H' option does not work anymore (please correct me if I am wrong).
> This used to work with serverboot, I think there is something wrong with the
> bootscript or how Mach or ext2fs.static passes the argument to init.


If you can fix that, this would be useful.

> It is easy to change GNU Mach so it just stops (for (;;); or perhaps just
> halting the system) instead of rebooting.  This might be useful when GNU Mach
> crashes and you want to report it.
>
> I already have the "for (;;);" hack in my tree.  Perhaps I can even change GNU
> Mach so this becomes the default behaviour and you can use an argument to switch
> to the old behavior.


The default behaviour is reboot, because otherwise if it is a server
or remote, you are screwed up if it hangs.  It's the right thing to
do.  If you are developing, this is not so convenient of course.  Then
you can either use -H or I think gnumach-dbg enters the debugger by default.

However.  Note that if you are running X or the new console, you won't
see anything.  No kernel message, and also not the debugger.  How
useful is that?

Thanks,
Marcus



From: Jeroen Dekkers <jeroen@dekkers.cx>
To: Robert Millan <zeratul2@wanadoo.es>, -email is unavailable-
Cc: metgerards@student.han.nl, -email is unavailable-
Subject: Re: Bug #184624: reboots unexpectedly after panic
Date: Tue, 2 Mar 2004 20:03:57 +0100

On Tue, Mar 02, 2004 at 02:09:10PM +0100, Robert Millan wrote:

> On Tue, Mar 02, 2004 at 11:43:06AM +0100, M. Gerards wrote:
> > [...]
> >
> > I already have the "for (;;);" hack in my tree.  Perhaps I can even change GNU
> > Mach so this becomes the default behaviour and you can use an argument to switch
> > to the old behavior.
> >
> > Does someone think such patch would be useful?
>
> I do (although I prefer while(1) ;)


I prefer getchar() (at least this was the hack I used on OSKit-Mach,
in GNU Mach 1.3 the function probably has a different name) so it
still reboots when you press a key. We could show a "Press any key"
message too.

--
Jeroen Dekkers

From: Robert Millan <zeratul2@wanadoo.es>
To: "Alfred M. Szmidt" <ams@kemisten.nu>
Cc: -email is unavailable-
Subject: Re: Bug #184624: reboots unexpectedly after panic
Date: Tue, 2 Mar 2004 23:37:28 +0100

On Tue, Mar 02, 2004 at 04:48:40PM +0100, Alfred M. Szmidt wrote:

>    Perhaps I can even change GNU Mach so this becomes the default
>    behaviour and you can use an argument to switch to the old
>    behavior.
>
> Please don't.  A option that makes GNU Mach halt is ok, the default
> should be "quick reboot".
>
>    Does someone think such patch would be useful?
>
> Yes.  But only if the current behaviour is left as default.


Why not sleep for, say, 10 seconds then reboot?

--
Robert Millan

From: Marco Gerards <metgerards@student.han.nl>
To: Robert Millan <zeratul2@wanadoo.es>
Cc: 184624@bugs.debian.org, "Alfred M. Szmidt" <ams@kemisten.nu>
Subject: Re: Bug #184624: reboots unexpectedly after panic
Date: Wed, 03 Mar 2004 18:10:17 +0100

Robert Millan <zeratul2@wanadoo.es> writes:

>> Please don't.  A option that makes GNU Mach halt is ok, the default
>> should be "quick reboot".
>>
>>    Does someone think such patch would be useful?
>>
>> Yes.  But only if the current behaviour is left as default.
>
> Why not sleep for, say, 10 seconds then reboot?


That is what happens now.

--
Marco


Samuel Thibault <sthibaul>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #2289:  halt-patch.diff added by sdschulze (1KiB - text/x-patch - Patch to fix -H on the command line of Mach)

 

Depends on the following items: None found

Items that depend on this one

Digest:
   task dependencies.

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 10 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-11-16 tschwinge Dependencies- task #6111 is dependent
2006-05-04 tschwinge Assigned toNone tschwinge
2006-05-04 tschwinge Assigned toams None
    Planned ReleaseNone GNU Mach 1.4
2005-12-30 ams Severity3 - Normal 2 - Minor
    StatusNone In Progress
    Assigned toNone ams
    Originator Name Robert Millan
    Size (loc)None Low <30
2005-12-30 sdschulze Attached File- Added halt-patch.diff, #3230

Back to the top

Powered by Savane 3.14-8eb0.
Corresponding source code