Bug 487653

Summary: Using a large number of direct mounts causes autofs to hang
Product: Red Hat Enterprise Linux 5 Reporter: Ian Kent <ikent>
Component: autofsAssignee: Ian Kent <ikent>
Status: CLOSED ERRATA QA Contact: BaseOS QE <qe-baseos-auto>
Severity: medium Docs Contact:
Priority: low    
Version: 5.3CC: ikent, jmoyer
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, autofs used the select() function to process direct-mount maps and was therefore limited by the file descriptor limit (by default, 1024). As a consequence, autofs was not able to use direct-mount maps with numbers of entries larger than the limit, and would stop responding when it used up all available file descriptors. Now, autofs uses poll() instead of select() and is therefore no longer limited by the available file descriptors. Freed of this limitation, autofs can use large direct-mount maps.
Story Points: ---
Clone Of:
: 527377 (view as bug list) Environment:
Last Closed: 2009-09-02 11:59:39 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: 527377    

Description Ian Kent 2009-02-27 09:51:05 UTC
Description of problem:
Using a large number of direct mounts causes autofs to hang.

How reproducible:
always

Steps to Reproduce:
1. Create a large direct mount map with:
#!/bin/bash
DIRECT_MAP="auto.direct.many"
DIR="/usr/local/tmp"
rm -f $DIRECT_MAP
mkdir -p $DIR
for i in `seq 1 2025`; do
	if [ ! -d ${DIR}/mnt${i} ]; then
		mkdir ${DIR}/mnt${i}
	fi
	echo "/test/mnt${i} :${DIR}/mnt${i}" >> $DIRECT_MAP
done

2. Configure autofs to use this map and start autofs.
3. Run find /test -maxdepth 2
  
Actual results:
autofs hangs at just less than 1024 mounts.

Expected results:
All 2024 mounts should succeed.

Comment 2 Ian Kent 2009-05-21 02:52:06 UTC
This issue has been fixed in the latest autofs package
autofs-5.0.1-0.rc2.125.

The autofs RHTS test bubzillas/bz487653 can be used to verify
the correction.

Comment 6 Ruediger Landmann 2009-08-31 22:49:08 UTC
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
Previously, autofs used the select() function to process direct-mount maps and was therefore limited by the file descriptor limit (by default, 1024). As a consequence, autofs was not able to use direct-mount maps with numbers of entries larger than the limit, and would stop responding when it used up all available file descriptors. Now, autofs uses poll() instead of select() and is therefore no longer limited by the available file descriptors. Freed of this limitation, autofs can use large direct-mount maps.

Comment 7 errata-xmlrpc 2009-09-02 11:59:39 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/RHBA-2009-1397.html