# lock order reversal on VirtualBox



## Azarien (Sep 9, 2011)

I get errors such as this when FreeBSD 9 BETA 2 is running on Virtual BOX:

```
lock order reversal:
 1st 0xc3d93058 ufs (ufs) @ /usr/src/sys/kern/vfs_lookup.c:530
 2nd 0xcd583bbc bufwait (bufwait) @ /usr/src/sys/ufs/ffs/ffs_vnops.c:260
 3rd 0xc3e978d8 ufs (ufs) @ /usr/src/sys/kern/vfs_subr.c:2134
KDB: stack backtrace:
db_trace_self_wrapper(c0efdd0c,632e7262,3331323a,6f000a34,632e7370,...) at db_trace_self_wrapper+0x26
kdb_backtrace(c0a415fb,c0f16fc,c3565370,c3568df0,c339a3d8,...) at kdb_backtrace+0x2a
_witness_debugger(c0f016fc,c3e978d8,c0ef0968,c3568df0,c0f093c1,...) at _witness_debugger+0x25
witness_checkorder(c3e978d8,9,c0f093c1,856,0,...) at witness_checkorder+0x839
__lockmgr_args(c3e978d8,80100,c3e978f8,0,0,...) at __lockmgr_args+0x824
ffs_lock(c339a500,c0a52dcb,c0f0873e,80100,c3e97880,...) at ffs_lock+0x8a
VOP_LOCK1_APV(c1047760,c339a500,c38b7c30,c1057e00,c3e97880,...) at VOP_LOCK1_APV+0xb5
_vn_lock(c3e97880,80100,c0f093c1,856,4,...) at _vn_lock+0x5e
vget(c3e97880,80100,c38b7b80,50,0,...) at vget+0xb9
vfs_hash_get(c3904ca8,122a7b,80000,c38b7b80,c339a644,...) at vfs_hash_get+0xe6
ffs_vgetf(c3904ca8,122a7b,80000,c339a644,1,...) at ffs_vgetf+0x49
softdep_sync_buf(c3d93000,cd583b5c,1,106,0,...) at softdep-sync_buf+0x4a3
ffs_syncvnode(c3d93000,1,c10b0b9c,4,c0ef83c7,...) at ffs_syncvnode+0x24c
ffs_truncate(c3d93000,400,0,880,c39e4100,...) at ffs_truncate+0x7a3
ufs_direnter(c3d93000,c3e97880,c339a9d8,c339ab68,cd5d6b7c,...) at ufs_direnter+0x921
ufs_mkdir(c339abf8,c339ac0c,0,0,c339ab90,...) at ufs_mkdir+0x8ef
VOP_MKDIR_APV(c1047760,c339abf8,c339ab68,c339ab90,0,...) at VOP_MKDIR_APV+0xa5
kern_mkdirat(c38b7b80,ffffff9c,28404030,0,1c0,...) at kern_mkdirat+0x2a1
kern_mkdir(c38b7b80,28404030,0,1c0,c339ac7c,...) at kern_mkdir+0x2e
mkdir(c38b7b80,c339acec,c339ad28,c0efffda,0,...) at mkdir+0x29
sysvallenter(c38b7b80,c339ace4,c339ace4,0,0,...) at syscallenter+0x263
syscall(c339ad28) at syscall+0x34
Xint0x80_syscall() at Xint0x80_syscall+0x21
--- syscall (136, FreeBSD ELF32, mkdir), eip = 0x281742e3, esp = 0xbfbfe26c, ebp = 0xbfbfe718 ---
```


----------



## Azarien (Sep 9, 2011)

note that it was transcribed by hand so may have typos (sysvallenter/syscallenter)


----------

