Re: "panic: malloc(M_WAITOK) in interrupt context" while in DDB

From: Brian Fundakowski Feldman <green_at_FreeBSD.org>
Date: Sun, 11 Jul 2004 22:59:47 -0400
On Sun, Jul 11, 2004 at 08:16:37PM -0400, Robert Watson wrote:
> 
> Got the following rather drawn out stack trace while working with DDB on a
> panic earlier this afternoon.  I got a good three panics/traps:
> 
> (1) Breaking to DDB using the serial console to evaluate a hang. (fine)
> 
> (2) Calling panic from DDB to get a dump, which generated a trap because
>     it tried to sync().  (Remind me: why do we do that?)
> 
> (3) Getting a panic because I called panic from that session of DDB
>     because KDB tried to perform an orderly shutdown, resulting in GEOM
>     panicking on trying to generate safe shutdown events by mallocing.
> 
> It sounds like we should really turn off trying to sync() in panic().  It
> sounds like we also should also have a better way of having module
> shutdown take place from the debugger.

I think I've been trying to get people to accept that it's a bad idea
for years now.  Any machine I touch just gets debug.sync_on_panic=0 in
its /etc/sysctl.conf immediately.

-- 
Brian Fundakowski Feldman                           \'[ FreeBSD ]''''''''''\
  <> green_at_FreeBSD.org                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\
Received on Mon Jul 12 2004 - 00:59:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:01 UTC