Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Nov 2003 23:37:34 -0800 (PST)
From:      Don Lewis <truckman@FreeBSD.org>
To:        current@FreeBSD.org
Subject:   vnode lock violation in today's -CURRENT
Message-ID:  <200311180737.hAI7bYeF089805@gw.catspoiler.org>

next in thread | raw e-mail | index | archive | help
I just ran into this while running portupgrade.

VOP_GETATTR: 0xc741e000 is not locked but should be
Debugger("Lock violation.
")
Stopped at      Debugger+0x55:  xchgl   %ebx,in_Debugger.0
db> tr
Debugger(c08bf9aa,c9749c78,c741e000,c08bf9eb,e820c984) at Debugger+0x55
vfs_badlock(c08bf9eb,c9749c78,c741e000,c09590e0,c741e000) at vfs_badlock+0x45
assert_vop_locked(c741e000,c9749c78,e820c9dc,0,e820c9c0) at assert_vop_locked+0x62
getdents_common(c6ede500,e820cd10,1,e820cd40,c0848b70) at getdents_common+0xfa
linux_getdents64(c6ede500,e820cd10,c08d6778,3ee,3) at linux_getdents64+0x20
syscall(2f,2f,2f,5,0) at syscall+0x2c0
Xint0x80_syscall() at Xint0x80_syscall+0x1d
--- syscall (220, Linux ELF, linux_getdents64), eip = 0x805a028, esp = 0xbfbfdc5c, ebp = 0xbfbfdcb8 ---


It looks to me like the call to vn_lock() in getdents_common() needs to
be moved to before the call to VOP_GETATTR().  The malloc() call should
probably be moved as well, which means that the intervening error
handling needs to be tweaked.



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