Subject: Re: locking problem in nfsio with LOCKDEBUG
To: Frank van der Linden <fvdl@NetBSD.org>
From: Nicolas Joly <njoly@pasteur.fr>
List: current-users
Date: 12/10/2003 13:06:17
On Tue, Dec 09, 2003 at 01:29:52PM +0100, Frank van der Linden wrote:
> On Tue, Dec 09, 2003 at 11:53:37AM +0100, Nicolas Joly wrote:
> > LK_SPIN spinout, excl 1, share 0
> > held by CPU 1
> > last locked at /local/src/NetBSD/src/sys/kern/kern_synch.c:978
> > last unlocked at /local/src/NetBSD/src/sys/kern/kern_lock.c:1364
> > _spinlock_acquire_count() at netbsd:_spinlock_acquire_count+0x7f
> > mi_switch() at netbsd:mi_switch+0x150
> > ltsleep() at netbsd:ltsleep+0x43b
> > nfssvc_iod() at netbsd:nfssvc_iod+0x106
> > start_nfsio() at netbsd:start_nfsio+0x16
> > Stopped in pid 285.1 (nfsio) at netbsd:cpu_Debugger+0x5:
> 
> Can you show the trace of the other CPU? I.e. switch between CPUs
> with "mach cpu 0" and "mach cpu 1" in DDB, and then do a trace
> for each of those. The other CPU must be looping somewhere while
> holding the spinlock.

Ok, just got it again ...

db{0}> mach cpu 0
using cpu 0
db{0}> bt
cpu_Debugger() at netbsd:cpu_Debugger+0x5
acquire() at netbsd:acquire+0x17a
_spinlock_acquire_count() at netbsd:_spinlock_acquire_count+0x7f
mi_switch() at netbsd:mi_switch+0x150
ltsleep() at netbsd:ltsleep+0x43b
nfssvc_iod() at netbsd:nfssvc_iod+0x106
start_nfsio() at netbsd:start_nfsio+0x16

db{0}> mach cpu 1
using cpu 1
db{0}> bt
cpu_switch() at netbsd:cpu_switch+0xc9

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.