Fwd: panic: System call lstat returning with 1 locks held

From: Attilio Rao <attilio_at_freebsd.org>
Date: Wed, 16 Jan 2008 20:04:14 +0100
---------- Forwarded message ----------
From: Attilio Rao <attilio_at_freebsd.org>
Date: 16-gen-2008 18.35
Subject: Re: panic: System call lstat returning with 1 locks held
To: John Baldwin <jhb_at_freebsd.org>


2008/1/16, John Baldwin <jhb_at_freebsd.org>:
> On Wednesday 16 January 2008 04:55:46 am Kris Kennaway wrote:
> > Scot Hetzel wrote:
> > > On 1/15/08, Kostik Belousov <kostikbel_at_gmail.com> wrote:
> > >> On Tue, Jan 15, 2008 at 07:52:12AM -0600, Scot Hetzel wrote:
> > >>> When I boot a Jan 13th or Jan 15th kernel, and then run
> > >>> /usr/local/etc/cvsup/update.sh to update the local CVS repository, I
> > >>> get the following panic:
> > >>>
> > >>> panic: System call lstat returning with 1 locks held
> > >>> cpuid = 0
> > >>> KDB: enter: panic
> > >>> [thread ; pid 1240 tid 10031]
> > >>> stopped at kdb_enter+0x3d: movq $0,0x41b048(%rip)
> > >>> db> show alllocks
> > >>> db> show locks
> > >>> db> bt
> > >>> tracing pid 1240 tid 10031 td 0xffffff001c1ad360
> > >>> kdb_enter() at kdb_enter+0x3d
> > >>> panic() at panic+0x176
> > >>> syscalls() at syscalls+0x66d
> > >>> Xfast_syscalls() at Xfast_syscalls+0xab
> > >>> --- syscall (0, FreeBSD ELF64, nosys), rip = 0x8009e87ec, rsp=
> > >>> 0x72ec50, rbp = 0x72ed28 ---
> > >>>
> > >> I think this could be related to the recent vn_lock()/VOP_LOCK() KPI changes.
> > >> Please, add DEBUG_VFS_LOCKS to the kernel config, and do the
> > >>         show lockedvnods
> > >> from the ddb prompt when the panic occurs. The witness does not track
> > >> the lockmgr locks.
> > >>
> > > I added DEBUG_VFS_LOCKS to the kernel config file, rebuilt and
> > > installed the kernel.  After rebooting the system, I started the cvsup
> > > update for my local mirror, when the panic occured I received a
> > > similar panic to the one above.  When I used 'show lockedvnods' the
> > > only thing that was displayed was 'Locked vnodes' and that was it.
> > >
> > > I'm going to try a binary search to see if I can narrow the problem down.
> >
> > Do you also have witness enabled?
>
> It could be that lockmgr_disown() doesn't update curthread->td_locks which is
> checked by INVARIANTS.  Not sure if it needs to update td_locks, but it might.

It does really.
Should we monitor all lockmgr-side movements on td_lock?

Thanks,
Attilio


--
Peace can only be achieved by understanding - A. Einstein


-- 
Peace can only be achieved by understanding - A. Einstein
Received on Wed Jan 16 2008 - 18:29:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:26 UTC