From owner-freebsd-current@FreeBSD.ORG Fri Mar 26 14:10:38 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 97D1116A4CE for ; Fri, 26 Mar 2004 14:10:38 -0800 (PST) Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 758C843D48 for ; Fri, 26 Mar 2004 14:10:38 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 29303 invoked from network); 26 Mar 2004 22:10:37 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 26 Mar 2004 22:10:37 -0000 Received: from 10.50.40.205 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id i2QMAFDJ018756; Fri, 26 Mar 2004 17:10:33 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Bruce Evans Date: Fri, 26 Mar 2004 14:06:04 -0500 User-Agent: KMail/1.6 References: <20040325113619.N56656@pcle2.cc.univie.ac.at> <200403251527.27658.jhb@FreeBSD.org> <20040326114225.M39632@gamplex.bde.org> In-Reply-To: <20040326114225.M39632@gamplex.bde.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200403261406.04566.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: freebsd-current@FreeBSD.org cc: current@FreeBSD.org cc: Lukas Ertl Subject: Re: panic: mutex Giant not owned 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: Fri, 26 Mar 2004 22:10:38 -0000 On Thursday 25 March 2004 07:53 pm, Bruce Evans wrote: > On Thu, 25 Mar 2004, John Baldwin wrote: > > On Thursday 25 March 2004 05:39 am, Lukas Ertl wrote: > > > Hi, > > > > > > I was dropped into DDB after a panic and tried to save a coredump with > > > "call doadump", which resulted in a: > > > > > > panic: mutex Giant not owned in /usr/src/sys/cam/cam_xpt.c:3970 > > > > > > Second call to "doadump" succeeded, but savecore(8) couldn't save the > > > core ('bad dump header' or something like this). > > > > Cute. I should fix mtx_assert() to just bail and not panic if panicstr > > is already set. > > Er, the panic is correct. Panic dump code must not use normal locking, > since then it won't work if it hits an unlockable lock. panic() usually > recursively panics earlier, near the sync() in boot(), if it hits an > unlocakable lock. Changing mtx_assert() to not panic if panicstr is > set would be worse for this than for the panic dump part, since sync() > is normal file system code that depends on normal locking for correctness. I misread it at first. mtx_assert() already doesn't recursively panic. The current behavior does seem correct though annoying since you can't just take an arbitrary dump it seems. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org