Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 490078

Summary: "automount" daemon gets blocked uninterruptibly while trying to acquire "i_sem" of monitored directory
Product: Red Hat Enterprise Linux 5 Reporter: Ian Kent <ikent>
Component: kernelAssignee: Ian Kent <ikent>
Status: CLOSED ERRATA QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.3CC: dzickus, ikent, sprabhu, tao, uobergfe
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 477017
: 598294 (view as bug list) Environment:
Last Closed: 2009-09-02 08:46:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 598294    
Attachments:
Description Flags
Patch to fix deadlock in ->lookup()
none
Patch to fix side effect of dropping directory mutex in ->lookup() none

Comment 1 Ian Kent 2009-03-13 04:45:33 UTC
While this bug doesn't affect autofs version 5 it is a
bug that should be fixed.

Comment 2 RHEL Program Management 2009-03-13 04:48:11 UTC
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
release.

Comment 6 Ian Kent 2009-06-08 02:37:12 UTC
Created attachment 346800 [details]
Patch to fix deadlock in ->lookup()

Comment 7 Ian Kent 2009-06-08 02:38:10 UTC
Created attachment 346801 [details]
Patch to fix side effect of dropping directory mutex in ->lookup()

Comment 8 Ian Kent 2009-06-08 02:57:51 UTC
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
explanation.

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.

Ian

Comment 9 Don Zickus 2009-06-09 18:26:57 UTC
Moving back to POST to pickup a small fix.

Comment 10 Don Zickus 2009-06-11 15:36:55 UTC
in kernel-2.6.18-153.el5
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.

Comment 13 errata-xmlrpc 2009-09-02 08:46:31 UTC
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.

http://rhn.redhat.com/errata/RHSA-2009-1243.html