(zfs) panic: lock &arg.lock already initialized

From: Emil Mikulic <emikulic_at_gmail.com>
Date: Thu, 11 Jun 2009 01:16:41 +1000
On doing "zfs destroy" of a snapshot, I got this panic:

Unread portion of the kernel message buffer:
panic: lock &arg.lock already initialized
cpuid = 0
KDB: enter: panic
Physical memory: 4049 MB
Dumping [etc]

(kgdb) where
[...]
#9  0xffffffff80568c5b in panic (fmt=Variable "fmt" is not available.
) at /usr/src/sys/kern/kern_shutdown.c:558
#10 0xffffffff8105754e in dsl_dataset_destroy_sync (arg1=0xffffff0005605c00,
    tag=0xffffff000b68c550, cr=0xffffff0005f79e00, tx=0xffffff0005932680)
    at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:1422
#11 0xffffffff81059ecb in dsl_sync_task_group_sync (dstg=0xffffff000b7b9080,
    tx=0xffffff0005932680)
    at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c:186
#12 0xffffffff810599f3 in dsl_pool_sync (dp=0xffffff0005606800, txg=75028)
    at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c:316
#13 0xffffffff810683c5 in spa_sync (spa=0xffffff0005549000, txg=75028)
    at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c:3988
#14 0xffffffff8107047f in txg_sync_thread (arg=Variable "arg" is not available.
)
    at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c:352
#15 0xffffffff8054179a in fork_exit (
    callout=0xffffffff810701f0 <txg_sync_thread>, arg=0xffffff0005606800,
    frame=0xffffff81297f4c90) at /usr/src/sys/kern/kern_fork.c:828
#16 0xffffffff8081b32e in fork_trampoline ()
    at /usr/src/sys/amd64/amd64/exception.S:552
#17 0x0000000000000000 in ?? ()
#18 0x0000000000000000 in ?? ()
#19 0x0000000000000001 in ?? ()
#20 0x0000000000000000 in ?? ()
[more question marks...]
(kgdb) frame 10
(kgdb) list
1417    static void
1418    dsl_dataset_drain_refs(dsl_dataset_t *ds, void *tag)
1419    {
1420            struct refsarg arg;
1421
1422 ---------> mutex_init(&arg.lock, NULL, MUTEX_DEFAULT, NULL); <-----------
1423            cv_init(&arg.cv, NULL, CV_DEFAULT, NULL);
1424            arg.gone = FALSE;
1425            (void) dmu_buf_update_user(ds->ds_dbuf, ds, &arg, &ds->ds_phys,
1426                dsl_dataset_refs_gone);

I'm running svn r193609 on dual-core amd64, kernel config is GENERIC
minus WITNESS and WITNESS_SKIPSPIN.

Is there any other info I can provide to help debug this?

--Emil
Received on Wed Jun 10 2009 - 13:16:44 UTC

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