From owner-freebsd-current@FreeBSD.ORG Mon Jul 12 02:59:50 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 11B5116A4CE; Mon, 12 Jul 2004 02:59:50 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.12.11/8.12.11) with ESMTP id i6C2xmdI042401; Sun, 11 Jul 2004 22:59:48 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.12.11/8.12.11/Submit) id i6C2xmHQ042400; Sun, 11 Jul 2004 22:59:48 -0400 (EDT) (envelope-from green) Date: Sun, 11 Jul 2004 22:59:47 -0400 From: Brian Fundakowski Feldman To: Robert Watson Message-ID: <20040712025947.GN1626@green.homeunix.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i cc: current@FreeBSD.org Subject: Re: "panic: malloc(M_WAITOK) in interrupt context" while in DDB X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2004 02:59:50 -0000 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@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\