Bug 186310

Summary: NFS mount regression from bz 154678
Product: Red Hat Enterprise Linux 3 Reporter: Neil Horman <nhorman>
Component: kernelAssignee: Steve Dickson <steved>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: jakub, petrides, staubach, tao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-28 15:26:47 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:
Attachments:
Description Flags
patch to modify port scanning in the kernel to not overlap glibc scan until it has to
none
Update tarfile none

Description Neil Horman 2006-03-22 20:33:08 UTC
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 20:33:09 UTC
Created attachment 126505 [details]
patch to modify port scanning in the kernel to not overlap glibc scan until it has to