Re: lock order reversal

From: Вадим Денисов <mail_at_vadimdenisov.ru>
Date: Tue, 06 Sep 2011 19:32:43 +0400
Thanks, K. Macy

Ok
Sorry to disturb

K. Macy wrote:
> When WITNESS support was added to lockmgr locks a number of
> longstanding LORs were exposed in the process. I can't comment on
> whether or not they'll be fixed or the warnings will some day be
> silenced.
>
> On Tue, Sep 6, 2011 at 2:58 PM, Vadim Denisov <mail_at_vadimdenisov.ru> wrote:
>   
>> I install current on last week
>> I have some messages in dmesg -a:
>> lock order reversal:
>>  1st 0xc81ba278 ufs (ufs) _at_ /usr/src/sys/ufs/ffs/ffs_snapshot.c:425
>>  2nd 0xe0f566d0 bufwait (bufwait) _at_ /usr/src/sys/kern/vfs_bio.c:2658
>>  3rd 0xc7d89168 ufs (ufs) _at_ /usr/src/sys/ufs/ffs/ffs_snapshot.c:546
>> KDB: stack backtrace:
>> db_trace_self_wrapper(c0c353ac,616e735f,6f687370,3a632e74,a363435,...) at
>> db_trace_self_wrapper+0x26
>> kdb_backtrace(c088dd7b,c0c38d9c,c7535098,c75385d0,ef9e1404,...) at
>> kdb_backtrace+0x2a
>> _witness_debugger(c0c38d9c,c7d89168,c0c2816c,c75385d0,c0c56442,...) at
>> _witness_debugger+0x25
>> witness_checkorder(c7d89168,9,c0c56442,222,0,...) at
>> witness_checkorder+0x839
>> __lockmgr_args(c7d89168,80100,c7d89188,0,0,...) at __lockmgr_args+0x824
>> ffs_lock(ef9e152c,c0ecca08,c7dc1c30,80100,c7d89110,...) at ffs_lock+0x8a
>> VOP_LOCK1_APV(c0d3c680,ef9e152c,ef9e154c,c0d4caa0,c7d89110,...) at
>> VOP_LOCK1_APV+0xb5
>> _vn_lock(c7d89110,80100,c0c56442,222,c755ce80,...) at _vn_lock+0x5e
>> ffs_snapshot(c7beba20,c7b753e0,c0c59850,1a2,0,...) at ffs_snapshot+0x14fc
>> ffs_mount(c7beba20,c7bf5d00,ff,394,c7dc1c30,...) at ffs_mount+0x1c13
>> vfs_donmount(c7dc1b80,211000,c7787780,c7787780,c7dbb588,...) at
>> vfs_donmount+0x1219
>> nmount(c7dc1b80,ef9e1cec,c087a16c,ef9e1d80,0,...) at nmount+0x84
>> syscallenter(c7dc1b80,ef9e1ce4,ef9e1d1c,c0acbf86,c0d90c80,...) at
>> syscallenter+0x263
>> syscall(ef9e1d28) at syscall+0x34
>> Xint0x80_syscall() at Xint0x80_syscall+0x21
>> --- syscall (378, FreeBSD ELF32, nmount), eip = 0x280fb61b, esp =
>> 0xbfbfea9c, ebp = 0xbfbfede8 ---
>> lock order reversal:
>>  1st 0xe0f566d0 bufwait (bufwait) _at_ /usr/src/sys/kern/vfs_bio.c:2658
>>  2nd 0xc7563c9c snaplk (snaplk) _at_ /usr/src/sys/ufs/ffs/ffs_snapshot.c:818
>> KDB: stack backtrace:
>> db_trace_self_wrapper(c0c353ac,662f7366,735f7366,7370616e,2e746f68,...) at
>> db_trace_self_wrapper+0x26
>> kdb_backtrace(c088dd7b,c0c38d83,c7535098,c7538978,ef9e1404,...) at
>> kdb_backtrace+0x2a
>> _witness_debugger(c0c38d83,c7563c9c,c0c564a4,c7538978,c0c56442,...) at
>> _witness_debugger+0x25
>> witness_checkorder(c7563c9c,9,c0c56442,332,c81ba298,...) at
>> witness_checkorder+0x839
>> __lockmgr_args(c7563c9c,80400,c81ba298,0,0,...) at __lockmgr_args+0x824
>> ffs_lock(ef9e152c,e0ef5790,100000,80400,c81ba220,...) at ffs_lock+0x8a
>> VOP_LOCK1_APV(c0d3c680,ef9e152c,e0ef57ec,c0d4caa0,c81ba220,...) at
>> VOP_LOCK1_APV+0xb5
>> _vn_lock(c81ba220,80400,c0c56442,332,0,...) at _vn_lock+0x5e
>> ffs_snapshot(c7beba20,c7b753e0,c0c59850,1a2,0,...) at ffs_snapshot+0x298e
>> ffs_mount(c7beba20,c7bf5d00,ff,394,c7dc1c30,...) at ffs_mount+0x1c13
>> vfs_donmount(c7dc1b80,211000,c7787780,c7787780,c7dbb588,...) at
>> vfs_donmount+0x1219
>> nmount(c7dc1b80,ef9e1cec,c087a16c,ef9e1d80,0,...) at nmount+0x84
>> syscallenter(c7dc1b80,ef9e1ce4,ef9e1d1c,c0acbf86,c0d90c80,...) at
>> syscallenter+0x263
>> syscall(ef9e1d28) at syscall+0x34
>> Xint0x80_syscall() at Xint0x80_syscall+0x21
>> --- syscall (378, FreeBSD ELF32, nmount), eip = 0x280fb61b, esp =
>> 0xbfbfea9c, ebp = 0xbfbfede8 ---
>> lock order reversal:
>>  1st 0xc7563c9c snaplk (snaplk) _at_ /usr/src/sys/kern/vfs_vnops.c:307
>>  2nd 0xc81ba278 ufs (ufs) _at_ /usr/src/sys/ufs/ffs/ffs_snapshot.c:1620
>> KDB: stack backtrace:
>> db_trace_self_wrapper(c0c353ac,616e735f,6f687370,3a632e74,30323631,...) at
>> db_trace_self_wrapper+0x26
>> kdb_backtrace(c088dd7b,c0c38d83,c7538978,c75385d0,ef9e16c8,...) at
>> kdb_backtrace+0x2a
>> _witness_debugger(c0c38d83,c81ba278,c0c2816c,c75385d0,c0c56442,...) at
>> _witness_debugger+0x25
>> witness_checkorder(c81ba278,9,c0c56442,654,0,...) at
>> witness_checkorder+0x839
>> __lockmgr_args(c81ba278,80000,0,0,0,...) at __lockmgr_args+0x824
>> ffs_snapremove(c81ba220,8,c0c3e10a,5e8,c7535098,...) at ffs_snapremove+0x11f
>> ffs_truncate(c81ba220,0,0,c00,0,...) at ffs_truncate+0x577
>> ufs_inactive(ef9e1a9c,c81ba298,c81ba220,c81ba298,ef9e1ab4,...) at
>> ufs_inactive+0x1f8
>> VOP_INACTIVE_APV(c0d3c680,ef9e1a9c,c0c40a67,94e,c0d4ca60,...) at
>> VOP_INACTIVE_APV+0xa5
>> vinactive(c0d3c680,ef9e1ad0,c0c40a67,8a5,0,...) at vinactive+0x8e
>> vputx(ef9e1b38,c08febda,c81ba220,ef9e1b14,c0c41f00,...) at vputx+0x2f8
>> vput(c81ba220,ef9e1b14,c0c41f00,133,0,...) at vput+0x10
>> vn_close(c81ba220,1,c755ce00,c7dc1b80,0,...) at vn_close+0x19a
>> vn_closefile(c7c300a8,c7dc1b80,c0c2706c,0,c7c300a8,...) at vn_closefile+0xe4
>> _fdrop(c7c300a8,c7dc1b80,0,ef9e1bfc,0,c0ecc9d8,c7dc1c30,c0d28da0,c0ecc9d8,c0c2af54,c7dc1b80,c7b05d2c,4ce,ef9e1c0c,c085d087,c7b05d2c,8,c0c2af54,c7c300a8)
>> at _fdrop+0x43
>> closef(c7c300a8,c7dc1b80,4ce,ef9e1c30,c7b05d2c,...) at closef+0x2b0
>> kern_close(c7dc1b80,4,ef9e1c7c,c0897ff3,c7dc1b80,...) at kern_close+0x139
>> close(c7dc1b80,ef9e1cec,ef9e1d28,c0c3767a,0,...) at close+0x1a
>> syscallenter(c7dc1b80,ef9e1ce4,ef9e1ce4,0,c0d819f0,...) at
>> syscallenter+0x263
>> syscall(ef9e1d28) at syscall+0x34
>> Xint0x80_syscall() at Xint0x80_syscall+0x21
>> --- syscall (6, FreeBSD ELF32, close), eip = 0x281a3283, esp = 0xbfbfea9c,
>> ebp = 0xbfbfede8 ---
>> Sep  5 12:38:10  su: denisov to root on /dev/pts/0
>> lock order reversal:
>>  1st 0xe10fbc60 bufwait (bufwait) _at_ /usr/src/sys/kern/vfs_bio.c:2658
>>  2nd 0xc7c5d600 dirhash (dirhash) _at_ /usr/src/sys/ufs/ufs/ufs_dirhash.c:284
>> KDB: stack backtrace:
>> db_trace_self_wrapper(c0c353ac,7366752f,7366752f,7269645f,68736168,...) at
>> db_trace_self_wrapper+0x26
>> kdb_backtrace(c088dd7b,c0c38d83,c7535098,c7538638,efac7a24,...) at
>> kdb_backtrace+0x2a
>> _witness_debugger(c0c38d83,c7c5d600,c0c5a792,c7538638,c0c5a417,...) at
>> _witness_debugger+0x25
>> witness_checkorder(c7c5d600,9,c0c5a417,11c,0,...) at
>> witness_checkorder+0x839
>> _sx_xlock(c7c5d600,0,c0c5a417,11c,e7880018,...) at _sx_xlock+0x85
>> ufsdirhash_acquire(0,e,c7800800,e10fbc00,e7880018,...) at
>> ufsdirhash_acquire+0x35
>> ufsdirhash_remove(c854c9f8,e7880018,18,efac7ab4,efac7ab0,...) at
>> ufsdirhash_remove+0x14
>> ufs_dirremove(c8536cc0,c8582910,500800c,0,c8536cc0,...) at
>> ufs_dirremove+0x143
>> ufs_remove(efac7c00,0,0,0,c8545550,...) at ufs_remove+0x6e
>> VOP_REMOVE_APV(c0d3c680,efac7c00,c8545550,efac7b78,4,...) at
>> VOP_REMOVE_APV+0xa5
>> kern_unlinkat(c7f94000,ffffff9c,284209b8,0,0,...) at kern_unlinkat+0x258
>> kern_unlink(c7f94000,284209b8,0,efac7c7c,c0897ff3,...) at kern_unlink+0x2f
>> unlink(c7f94000,efac7cec,efac7d28,c0c3767a,0,...) at unlink+0x22
>> syscallenter(c7f94000,efac7ce4,efac7ce4,0,74b,...) at syscallenter+0x263
>> syscall(efac7d28) at syscall+0x34
>> Xint0x80_syscall() at Xint0x80_syscall+0x21
>> --- syscall (10, FreeBSD ELF32, unlink), eip = 0x2817384f, esp = 0xbfbfe9bc,
>> ebp = 0xbfbfe9e8 ---
>>
>> It's seriously problem? May be I must send PR?
>>
>> Vadim Denisov
>> _______________________________________________
>> freebsd-current_at_freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-current
>> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
>>
>>     
Received on Tue Sep 06 2011 - 13:32:34 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:17 UTC