Red Hat Bugzilla – Bug 490078
"automount" daemon gets blocked uninterruptibly while trying to acquire "i_sem" of monitored directory
Last modified: 2010-05-31 22:53:01 EDT
While this bug doesn't affect autofs version 5 it is a
bug that should be fixed.
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
Created attachment 346800 [details]
Patch to fix deadlock in ->lookup()
Created attachment 346801 [details]
Patch to fix side effect of dropping directory mutex in ->lookup()
During stress testing autofs submount handling using our RHTS autofs
submount-test a race which causes incorrect callbacks to the daemon
was identified. This is a side effect of the patch to fix the deadlock
in ->lookup() of this bug.
It isn't obvious how this is the case but here is my attempt at an
Holding the directory inode mutex when waiting for an expire to
complete causes all lookups within that directory to wait. This
limits the number of processes that can concurrently try to trigger
mount requests. Not holding the mutex when there are many processes
accessing the mount directory means that we sometimes see the case
where a mount successfully completes and the wait queue entry is
removed while we sleep on the wait queue mutex. This leads to
incorrect callbacks to the daemon.
This results in some quite odd (and very misleading) errors in the
log due to internal autofs mounts being mounted multiple times. It
is difficult to check for this in the daemon and should be completely
unnecessary anyway, if the kernel module is doing its job properly.
Moving back to POST to pickup a small fix.
You can download this test kernel from http://people.redhat.com/dzickus/el5
Please do NOT transition this bugzilla state to VERIFIED until our QE team
has sent specific instructions indicating when to do so. However feel free
to provide a comment indicating that this fix has been verified.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.