Bug 186310 - NFS mount regression from bz 154678
NFS mount regression from bz 154678
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Steve Dickson
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-22 15:33 EST by Neil Horman
Modified: 2007-11-30 17:07 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-28 10:26:47 EST
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 modify port scanning in the kernel to not overlap glibc scan until it has to (583 bytes, patch)
2006-03-22 15:33 EST, Neil Horman
no flags Details | Diff
Update tarfile (415 bytes, application/octet-stream)
2006-03-23 18:02 EST, Steve Dickson
no flags Details

  None (edit)
Description Neil Horman 2006-03-22 15:33:08 EST
Description of problem:
I think that bug 154678 has introduced a regression into the maximum number of
nfs mounts that we can have at the moment

Version-Release number of selected component (if applicable):
RHEL3 U6 forward

How reproducible:
always

Steps to Reproduce:
1.boot a U6 or newer kernel
2.begin mounting 1000 NFS mounts
3.
  
Actual results:
~512 NFS mounts are mounted before EADDRINUSE is returned

1000 NFS mounts are mounted

Additional info:
I think this is an inadvertent error in the xprt_bindresvport function changed
in the kernel as of U6.  By increasing the max port range scan from 800 to 1023
the kernel fully overlapped the port range which the C library uses to scan port
ranges in the userspace version of bindresvport.  Since the mount program uses a
reserved port to initiate mounts to NFS servers, which it obtains via
bindresvport (which only scans ports 512 through 1023), the new kernel behavior
allows all the ports that mount can legitimately use to become allocated for
handling NFS mounts.  The functional offshoot of this is that, while the kernel
could establish a new NFS socket for additional mounts, the mount program in
user space itself cannot find a secure port through  bindresvport to initiate a
mount to a new NFS server.  The net of this is that whereas previous releases
supported 800 NFS mounts, post U6 kernels can only support ~512, depending on
port utilization from other applications.

I've attached a patch to the kernel to correct this.  There are several
alternate methods to fix this I think (have mount not use a reserved port,
change glibc so that bindresvport scans all reserved ports, etc).  But this
solution struck me as having the least impact so late in the RHEL3 release schedule.
Comment 1 Neil Horman 2006-03-22 15:33:09 EST
Created attachment 126505 [details]
patch to modify port scanning in the kernel to not overlap glibc scan until it has to

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