Date: Thu, 3 Oct 1996 23:47:42 +1000 From: Bruce Evans <bde@zeta.org.au> To: dfr@render.com, julian@freefall.freebsd.org Cc: current@freefall.freebsd.org Subject: Re: HELP!! kernel deadlock found.. Message-ID: <199610031347.XAA16899@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>It looks as if N+2 is attempting to perform a pathname lookup while it has
>a locked vnode.
I usually "solve" ufslk2 hangs by rebooting. There was one longstanding
reproducible one that seems to be fixed now. The following script is
supposed to exercise a bug in rename() for ufs, but the system usually
used to hang on ufslk2. I saw the bug once and hangs many times in 20+
hours of testing. Today I've seen the bug twice and no hangs in 4 hours
of testing.
---
#!/bin/sh
a=/tmp/foo.now
b=/tmp/foo.prev
while true
do
for n in 1 2 3 4 5 6 7 8 9 0
do
(mv $a $b ; touch $a) &
done
wait
done
---
>> if anyone knows how to examine an arbitrary process stacktrace
>> I'd like to hear about it.......
The proc struct contains a pointer to the pcb and the pcb contains the
call-saved registers for savectx() including %esp and %ebp. %ebp is
actually for savectx()'s caller.
BTW, what should happen if the pcb (or other data that you're looking
at) is paged out? Interrupts are disabled, so disk i/o may not work.
I'm fixing ddb so that interrupts are always disabled, and gdb-remote
should probably keep them disabled too. I think pagefaults should be
fatal if interrupts are disabled (or spl >= splbio). The debugger's
setjmp handler will make them non fatal (just like when you attempt
to access an unmappable address).
>I wanted to do this with DDB once and I think I was stumped by the kernel
>stack being in the u-area which is mapped to the same place for each
>process. Since the process I wanted to backtrace was not curproc, I
>couldn't see its stack :-(.
There should be a ddb function for this. ddb functions are now easy to
add :-).
Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610031347.XAA16899>
