Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jan 2008 01:12:06 -0600
From:      "Scot Hetzel" <swhetzel@gmail.com>
To:        "Pawel Jakub Dawidek" <pjd@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: panic: System call lstat returning with 1 locks held
Message-ID:  <790a9fff0801172312o18d46a65x3be9c8f752f7845d@mail.gmail.com>
In-Reply-To: <20080117114023.GF8820@garage.freebsd.pl>
References:  <790a9fff0801150552l542a4238ofc12efe5fdb45fc2@mail.gmail.com> <20080115143924.GB57756@deviant.kiev.zoral.com.ua> <790a9fff0801152301l5d50461aw3a253608506368e2@mail.gmail.com> <790a9fff0801161624g459857b8y6217e579337f2f0e@mail.gmail.com> <790a9fff0801161810j5a9953c4j5d2f3f10b3a1baf@mail.gmail.com> <20080117114023.GF8820@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1/17/08, Pawel Jakub Dawidek <pjd@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) @
/usr/src/sys/modules/zfs/../../contrib/opensolaris/uts/common/fs/zfs/dbuf.c:1866
 2nd 0xffffff00017531c0 db->db_mtx (db->db_mtx) @
/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) @
/usr/src/sys/modules/zfs/../../contrib/opensolaris/uts/common/fs/zfs/dbuf.c:1866
 2nd 0xffffff0001a27760 db->db_mtx (db->db_mtx) @
/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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?790a9fff0801172312o18d46a65x3be9c8f752f7845d>