Discussion:
lock order reversal
(too old to reply)
Jon Brawn
2018-02-26 05:18:45 UTC
Permalink
Wotcha!

So, I’ve been using FreeBSD 12-CURRENT at various svn releases for a while now, and I get quite a few “lock order reversal” dumps. The one I’ve got on my screen at the moment is for ufs / bufwait / ufs:

***@brax:/usr/src/stand # lock order reversal:
1st 0xfffffd0003ec17e8 ufs (ufs) @ /usr/src/sys/kern/vfs_subr.c:2602
2nd 0xffff0000410efa20 bufwait (bufwait) @ /usr/src/sys/ufs/ffs/ffs_vnops.c:282
3rd 0xfffffd00b83ca7e8 ufs (ufs) @ /usr/src/sys/kern/vfs_subr.c:2602
stack backtrace:
#0 0xffff0000003b59d4 at witness_debugger+0x64
#1 0xffff00000032bd34 at __lockmgr_args+0x6ac
#2 0xffff0000005c6af0 at ffs_lock+0x88
#3 0xffff000000679eb0 at VOP_LOCK1_APV+0xac
#4 0xffff000000426fa8 at _vn_lock+0x64
#5 0xffff000000417550 at vget+0x78
#6 0xffff000000409fdc at vfs_hash_get+0xec
#7 0xffff0000005c2b94 at ffs_vgetf+0x44
#8 0xffff0000005b96a8 at softdep_sync_buf+0x9f4
#9 0xffff0000005c7834 at ffs_syncvnode+0x26c
#10 0xffff0000005a1b5c at ffs_truncate+0x6b0
#11 0xffff0000005ce3cc at ufs_direnter+0x778
#12 0xffff0000005d64bc at ufs_makeinode+0x4b8
#13 0xffff0000005d2b90 at ufs_create+0x38
#14 0xffff000000677168 at VOP_CREATE_APV+0xac
#15 0xffff00000042691c at vn_open_cred+0x264
#16 0xffff00000041fc84 at kern_openat+0x208
#17 0xffff00000064b59c at do_el0_sync+0x8bc

Is there something I should be doing to help debug these?

Jon.
Andriy Gapon
2018-02-26 06:42:14 UTC
Permalink
Post by Jon Brawn
Wotcha!
#0 0xffff0000003b59d4 at witness_debugger+0x64
#1 0xffff00000032bd34 at __lockmgr_args+0x6ac
#2 0xffff0000005c6af0 at ffs_lock+0x88
#3 0xffff000000679eb0 at VOP_LOCK1_APV+0xac
#4 0xffff000000426fa8 at _vn_lock+0x64
#5 0xffff000000417550 at vget+0x78
#6 0xffff000000409fdc at vfs_hash_get+0xec
#7 0xffff0000005c2b94 at ffs_vgetf+0x44
#8 0xffff0000005b96a8 at softdep_sync_buf+0x9f4
#9 0xffff0000005c7834 at ffs_syncvnode+0x26c
#10 0xffff0000005a1b5c at ffs_truncate+0x6b0
#11 0xffff0000005ce3cc at ufs_direnter+0x778
#12 0xffff0000005d64bc at ufs_makeinode+0x4b8
#13 0xffff0000005d2b90 at ufs_create+0x38
#14 0xffff000000677168 at VOP_CREATE_APV+0xac
#15 0xffff00000042691c at vn_open_cred+0x264
#16 0xffff00000041fc84 at kern_openat+0x208
#17 0xffff00000064b59c at do_el0_sync+0x8bc
Is there something I should be doing to help debug these?
IMO, no. Please ignore LORs involving "bufwait", "filedesc structure", "syncer"
unless you experience any real problem (like a lock up).
--
Andriy Gapon
Chris H
2018-02-26 09:44:52 UTC
Permalink
Post by Andriy Gapon
Post by Jon Brawn
Wotcha!
So, I’ve been using FreeBSD 12-CURRENT at various svn releases for a while
now, and I get quite a few “lock order reversal” dumps. The one I’ve got
/usr/src/sys/ufs/ffs/ffs_vnops.c:282
#0 0xffff0000003b59d4 at witness_debugger+0x64
#1 0xffff00000032bd34 at __lockmgr_args+0x6ac
#2 0xffff0000005c6af0 at ffs_lock+0x88
#3 0xffff000000679eb0 at VOP_LOCK1_APV+0xac
#4 0xffff000000426fa8 at _vn_lock+0x64
#5 0xffff000000417550 at vget+0x78
#6 0xffff000000409fdc at vfs_hash_get+0xec
#7 0xffff0000005c2b94 at ffs_vgetf+0x44
#8 0xffff0000005b96a8 at softdep_sync_buf+0x9f4
#9 0xffff0000005c7834 at ffs_syncvnode+0x26c
#10 0xffff0000005a1b5c at ffs_truncate+0x6b0
#11 0xffff0000005ce3cc at ufs_direnter+0x778
#12 0xffff0000005d64bc at ufs_makeinode+0x4b8
#13 0xffff0000005d2b90 at ufs_create+0x38
#14 0xffff000000677168 at VOP_CREATE_APV+0xac
#15 0xffff00000042691c at vn_open_cred+0x264
#16 0xffff00000041fc84 at kern_openat+0x208
#17 0xffff00000064b59c at do_el0_sync+0x8bc
Is there something I should be doing to help debug these?
IMO, no. Please ignore LORs involving "bufwait", "filedesc structure",
"syncer"
unless you experience any real problem (like a lock up).
Or build a kernel without WITNESS (and FULL_BUF_TRACKING?) :-)

--Chris
Post by Andriy Gapon
--
Andriy Gapon
_______________________________________________
https://lists.freebsd.org/mailman/listinfo/freebsd-current
Continue reading on narkive:
Loading...