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

From: Scot Hetzel <swhetzel_at_gmail.com>
Date: Fri, 18 Jan 2008 01:12:06 -0600
On 1/17/08, Pawel Jakub Dawidek <pjd_at_freebsd.org> wrote:
> On Wed, Jan 16, 2008 at 08:10:03PM -0600, Scot Hetzel wrote:
> > The local CVS repository is on a ZFS filesystem.  Is anyone seeing
> > this problem on a UFS filesystem?
>
> WITNESS won't work on ZFS' lock by default. Please add:
>
> CFLAGS+=-DDEBUG
>
> to sys/modules/zfs/Makefile and recompile zfs kernel module. DEBUG
> define tells ZFS not to add NOWITNESS flag at lock initialization time.
>

I rebuilt the zfs module as suggested.

When I reboot, I am now seeing 4 different lock order reversals related to ZFS:

1. This lock order reversal occurs most often:

lock order reversal:
 1st 0xffffff0001b95838 dr->dt.di.dr_mtx (dr->dt.di.dr_mtx) _at_
/usr/src/sys/modules/zfs/../../contrib/opensolaris/uts/common/fs/zfs/dbuf.c:1866
 2nd 0xffffff00017531c0 db->db_mtx (db->db_mtx) _at_
/usr/src/sys/modules/zfs/../../contrib/opensolaris/uts/common/fs/zfs/dbuf.c:1888
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
witness_checkorder() at witness_checkorder+0x606
_sx_xlock() at _sx_xlock+0x52
dbuf_sync_list() at dbuf_sync_list+0x215
dbuf_sync_list() at dbuf_sync_list+0x194
dnode_sync() at dnode_sync+0x385
dmu_objset_sync() at dmu_objset_sync+0x116
dsl_pool_sync() at dsl_pool_sync+0x153
spa_sync() at spa_sync+0x39e
txg_sync_thread() at txg_sync_thread+0x17d
fork_exit() at fork_exit+0x12a
fork_trampoline() at fork_trampoline+0xe
--- trap 0, rip = 0, rsp = 0xffffffffd72a3d30, rbp = 0 ---

2. This lock order reversal is similar to the one above:

lock order reversal:
 1st 0xffffff0001b00d38 dr->dt.di.dr_mtx (dr->dt.di.dr_mtx) _at_
/usr/src/sys/modules/zfs/../../contrib/opensolaris/uts/common/fs/zfs/dbuf.c:1866
 2nd 0xffffff0001a27760 db->db_mtx (db->db_mtx) _at_
/usr/src/sys/modules/zfs/../../contrib/opensolaris/uts/common/fs/zfs/dbuf.c:1837
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
witness_checkorder() at witness_checkorder+0x606
_sx_xlock() at _sx_xlock+0x52
dbuf_sync_list() at dbuf_sync_list+0xaf
dbuf_sync_list() at dbuf_sync_list+0x194
dnode_sync() at dnode_sync+0x385
dmu_objset_sync() at dmu_objset_sync+0x116
dsl_pool_sync() at dsl_pool_sync+0x72
spa_sync() at spa_sync+0x39e
txg_sync_thread() at txg_sync_thread+0x17d
fork_exit() at fork_exit+0x12a
fork_trampoline() at fork_trampoline+0xe
--- trap 0, rip = 0, rsp = 0xffffffffd72a3d30, rbp = 0 ---

3. lock order reversal related to the write syscall

lock order reversal:
1st 0xffffff00269f6500 dn->dn_mtx
Received on Fri Jan 18 2008 - 06:12:08 UTC

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