NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: PR/38141 CVS commit: src/sys
> Log Message:
> PR kern/38141 lookup/vfs_busy acquire rwlock recursively
>
> Until the code paths are fixed properly, put in place an ugly workaround
> to make it safe to recursively acquire a read lock on a mount.
unfortunately, recursive lock was not necessary to triger
a deadlock. i saw the following while running "build.sh -j128".
(well, the actual deadlock i saw had 10 or more vnodes involved.
the following is a simplified version for explanation.)
LWP1 in vn_open()
1. lock a directory vnode which is VV_ROOT.
LWP2 in lookup()
1. vfs_busy(RW_READER)
2. call VFS_ROOT, which tries to lock the VV_ROOT vnode which
is already locked by LWP1. => block
LWP3 (syncer) in sync_fsync()
1. vfs_trybusy(RW_WRITER) => block
now, LWP1 again:
2. call VOP_CREATE -> getnewvnode -> vfs_busy(RW_READER) => block
YAMAMOTO Takashi
Home |
Main Index |
Thread Index |
Old Index