Hi. FreeBSD's WITNESS mechanism for detecting lock order reversals reports LOR here:
lock order reversal: 1st 0xc3f7738c zfs:dbuf (zfs:dbuf) @ /zoo/pjd/zfstest/sys/modules/zfs/../../contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c:410 2nd 0xc3fefcc0 zfs:zn (zfs:zn) @ /zoo/pjd/zfstest/sys/modules/zfs/../../contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c:68 KDB: stack backtrace: db_trace_self_wrapper(c05ee0fe) at db_trace_self_wrapper+0x25 kdb_backtrace(0,ffffffff,c065f510,c065f358,c061e82c,...) at kdb_backtrace+0x29 witness_checkorder(c3fefcc0,9,c3c44a6b,44) at witness_checkorder+0x586 _sx_xlock(c3fefcc0,c3c44a6b,44,0,c3fefca8,...) at _sx_xlock+0x6e znode_pageout_func(c3f77350,c3fefca8,e6172a08,c3bd8005,c3f77350,...) at znode_pageout_func+0x10a dbuf_evict_user(c3f77350,0,c3f77848,c3f77848,c3f59c94,...) at dbuf_evict_user+0x4e dbuf_clear(c3f77350,c3bea63b,e6172b18,c3bea64c,c3f77350,...) at dbuf_clear+0x31 dbuf_evict(c3f77350,c0650f70,0,c05ed336,2ab,...) at dbuf_evict+0xe dnode_evict_dbufs(c3f59c94,0,2,0,0,...) at dnode_evict_dbufs+0x24c dnode_sync_free(c3f59c94,c4075900,c3c1c873,0,c37ef000,...) at dnode_sync_free+0xf5 dnode_sync(c3f59c94,0,c3f45000,c4075900,0,...) at dnode_sync+0x36a dmu_objset_sync_dnodes(c3b47000,c3b4713c,c4075900,21c,c375b54c,...) at dmu_objset_sync_dnodes+0x81 dmu_objset_sync(c3b47000,c4075900,e6172c50,c3bf1b2c,c397ac00,...) at dmu_objset_sync+0x50 dsl_dataset_sync(c397ac00,c4075900,0,c397ac00,e6172c54,...) at dsl_dataset_sync+0x14 dsl_pool_sync(c375b400,6,0,c061e82c,c375b4ac,...) at dsl_pool_sync+0x78 spa_sync(c37ef000,6,0,7,0,...) at spa_sync+0x2a2 txg_sync_thread(c375b400,e6172d38) at txg_sync_thread+0x1df fork_exit(c3c037e8,c375b400,e6172d38) at fork_exit+0xac fork_trampoline() at fork_trampoline+0x8 --- trap 0x1, eip = 0, esp = 0xe6172d6c, ebp = 0 --- Bascially it first recorded that db_mtx is locked before z_lock and the backtrace above is from where is it locked in an different order. I think it is harmless, because znode is not visible at this point and can't be referenced, which means deadlock is not possible here, right? If I'm right, sorry for the noice, just wanted to be 100% sure. -- Pawel Jakub Dawidek http://www.wheel.pl pjd at FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/zfs-code/attachments/20061122/8fef67c0/attachment.bin>