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.
>