Bug 490078 - "automount" daemon gets blocked uninterruptibly while trying to acquire "i_sem" of monitored directory
"automount" daemon gets blocked uninterruptibly while trying to acquire "i_se...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.3
All Linux
medium Severity medium
: rc
: ---
Assigned To: Ian Kent
Red Hat Kernel QE team
:
Depends On:
Blocks: 598294
  Show dependency treegraph
 
Reported: 2009-03-13 00:43 EDT by Ian Kent
Modified: 2010-05-31 22:53 EDT (History)
5 users (show)

See Also:
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 04:46:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to fix deadlock in ->lookup() (3.34 KB, patch)
2009-06-07 22:37 EDT, Ian Kent
no flags Details | Diff
Patch to fix side effect of dropping directory mutex in ->lookup() (2.41 KB, patch)
2009-06-07 22:38 EDT, Ian Kent
no flags Details | Diff

  None (edit)
Comment 1 Ian Kent 2009-03-13 00:45:33 EDT
While this bug doesn't affect autofs version 5 it is a
bug that should be fixed.
Comment 2 RHEL Product and Program Management 2009-03-13 00:48:11 EDT
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-07 22:37:12 EDT
Created attachment 346800 [details]
Patch to fix deadlock in ->lookup()
Comment 7 Ian Kent 2009-06-07 22:38:10 EDT
Created attachment 346801 [details]
Patch to fix side effect of dropping directory mutex in ->lookup()
Comment 8 Ian Kent 2009-06-07 22:57:51 EDT
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 14:26:57 EDT
Moving back to POST to pickup a small fix.
Comment 10 Don Zickus 2009-06-11 11:36:55 EDT
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 04:46:31 EDT
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

Note You need to log in before you can comment on or make changes to this bug.