Re: panic: knlist not locked, but should be

From: Robert Noland <rnoland_at_FreeBSD.org>
Date: Tue, 09 Jun 2009 09:58:42 -0500
On Tue, 2009-06-09 at 17:51 +0400, Yuri Pankov wrote:
> On Tue, Jun 09, 2009 at 09:37:37AM -0400, John Baldwin wrote:
> > On Tuesday 09 June 2009 7:05:40 am Yuri Pankov wrote:
> > > Hi,
> > > 
> > > I'm getting the following panic when running Firefox+nspluginwrapper
> > > (which crashes a lot, but paniced the box only two times, if it's even
> > > related). -CURRENT/amd64 20080607.
> > > 
> > > Unread portion of the kernel message buffer:
> > > panic: knlist not locked, but should be
> > > cpuid = 0
> > > KDB: stack backtrace:
> > > db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
> > > panic() at panic+0x182
> > > knote() at knote+0xea
> > > VOP_WRITE_APV() at VOP_WRITE_APV+0x152
> > > vn_rdwr() at vn_rdwr+0x21d
> > > vn_rdwr_inchunks() at vn_rdwr_inchunks+0xc2
> > > elf32_coredump() at elf32_coredump+0x109
> > > sigexit() at sigexit+0x810
> > > postsig() at postsig+0x32f
> > > ast() at ast+0x3ac
> > > doreti_ast() at doreti_ast+0x1f
> > 
> > Are you using ZFS?
> > 
> > -- 
> > John Baldwin
> 
> Yes, sorry for not mentioning it.
> 

Ok, with guidance from jhb_at_ I applied the following patch, which
resolves the panic.  I do still get a LOR though.  He suggested that ps_at_
is probably the right place for this to go, cc'ed.  In my case, I have a
desktop image downloaded to the desktop which is causing issues for
tracker-extract.  When tracker-extract explodes it triggers the panic.

Index: contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
===================================================================
--- contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c  (revision
193531)
+++ contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c  (working copy)
_at__at_ -573,7 +573,7 _at__at_
        vfsp->mnt_flag |= MNT_LOCAL;
        vfsp->mnt_kern_flag |= MNTK_MPSAFE;
        vfsp->mnt_kern_flag |= MNTK_LOOKUP_SHARED;
-       vfsp->mnt_kern_flag |= MNTK_SHARED_WRITES;
+//     vfsp->mnt_kern_flag |= MNTK_SHARED_WRITES;
 
        if (error = dsl_prop_get_integer(osname, "readonly", &readonly,
NULL))
                goto out;


lock order reversal:
 1st 0xffffff00490c0848 filedesc structure (filedesc structure)
_at_ /usr/src/sys/kern/kern_descrip.c:1088
 2nd 0xffffff00523339d0 zfs (zfs) _at_ /usr/src/sys/kern/vfs_subr.c:4091
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
_witness_debugger() at _witness_debugger+0x2e
witness_checkorder() at witness_checkorder+0x81e
__lockmgr_args() at __lockmgr_args+0xc2a
vop_stdlock() at vop_stdlock+0x39
VOP_LOCK1_APV() at VOP_LOCK1_APV+0xbf
_vn_lock() at _vn_lock+0x47
knlist_remove_kq() at knlist_remove_kq+0x73
knote_fdclose() at knote_fdclose+0x177
kern_close() at kern_close+0xe9
syscall() at syscall+0x1dd
Xfast_syscall() at Xfast_syscall+0xd0
--- syscall (6, FreeBSD ELF64, close), rip = 0x800e4242c, rsp =
0x7fffffffe548, rbp = 0x80107ecd0 ---

robert.

> Yuri
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
-- 
Robert Noland <rnoland_at_FreeBSD.org>
FreeBSD

Received on Tue Jun 09 2009 - 12:58:50 UTC

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