From owner-freebsd-stable@FreeBSD.ORG Sun Aug 3 13:49:00 2008 Return-Path: Delivered-To: stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFE98106567B for ; Sun, 3 Aug 2008 13:49:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id C78098FC12 for ; Sun, 3 Aug 2008 13:49:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 2C26946B5B; Sun, 3 Aug 2008 09:49:00 -0400 (EDT) Date: Sun, 3 Aug 2008 14:49:00 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Ulrich Spoerlein In-Reply-To: <20080803075744.GA1555@roadrunner.spoerlein.net> Message-ID: References: <20080803075744.GA1555@roadrunner.spoerlein.net> User-Agent: Alpine 1.10 (BSF 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: stable@FreeBSD.org Subject: Re: ddb(4) scripts not working in RELENG_7? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Aug 2008 13:49:01 -0000 On Sun, 3 Aug 2008, Ulrich Spoerlein wrote: > I was testing a patch and getting a panic (page fault while in kernel mode) > in RELENG_7 running multiuser mode, but no scripts were automagically run, > although I configured ddb_enable=YES in rc.conf. > > It simply dropped me to the interactive ddb(4) prompt, nothing more. Do you > have any idea what I could be missing? Dear Ulrich: I have been using DDB scripts on 7-STABLE without any problems, but I'm not sure I've tried it with a page fault, just regular panics. Could you try entering the debugger via "sysctl debug.kdb.panic=1", which forces a panic, and see if your scripts run then? Perhaps there's some inconsistency in how we're entering the debugger. If things still appear not to be happening, try setting up a kdb.enter.default script and see if that works? The ddb(4) command provids a slightly more user-friendly way of accessing the scripts from userspace -- you can just do "ddb scripts" to list them. FWIW, using the exactly scripts you have below, I produced a textdump without any problems on 7-STABLE. > Btw, you might wanna update the ddb(8) manpage's History section, as the > feature seems to first appear in 7.1 :) Indeed. I'll update that, thanks! Robert N M Watson Computer Laboratory University of Cambridge > > % egrep "ddb|dump" /etc/rc.conf > dumpdev="/dev/ad0s3" > ddb_enable="YES" > % sysctl debug.ddb.scripting.scripts > debug.ddb.scripting.scripts: lockinfo=show locks; show alllocks; show lockedvnods > kdb.enter.panic=textdump set; capture on; run lockinfo; show pcpu; bt; ps; alltrace; capture off; call doadump; reset > kdb.enter.witness=run lockinfo > > > Cheers, > Ulrich Spoerlein > -- > It is better to remain silent and be thought a fool, > than to speak, and remove all doubt. >