Bug 815673

Summary: NFS4 mounts hang on clients with many exports to netgroups
Product: Red Hat Enterprise Linux 6 Reporter: Stefan Walter <walteste>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: Rock Lee <xinli>
Severity: high Docs Contact:
Priority: urgent    
Version: 6.2CC: baumanmo, cww, jiali, jwest, kzhang, ndevos, rrajaram, xinli, yanwang
Target Milestone: rcKeywords: Patch, ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: nfs-utils-1.2.3-29 Doc Type: Bug Fix
Doc Text:
Cause: regression due to the commit 0509d3428f523 Consequence: NFS4 mounts hang on clients with many exports to netgroups Fix: Upstream commit b46c0442 mountd: fix export upcall failure in use_ipaddr case Result: nfsv4 mount now work
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 10:55:18 UTC Type: Bug
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: 841668    

Description Stefan Walter 2012-04-24 08:32:48 UTC
Description of problem:

When an NFS server has many exports to netgroups a client may fail to mount a share with NFS4 (the mount command will hang indefinitely).

When I run rpc.mountd with '-d all' and use the reproducer below I get the following output:

rpc.mountd: v4root_create: path '/'
rpc.mountd: v4root_create: path '/export'
rpc.mountd: v4root_create: path '/'
rpc.mountd: v4root_create: path '/export'
rpc.mountd: v4root_create: path '/export/test2'
...
rpc.mountd: v4root_create: path '/export'
rpc.mountd: v4root_create: path '/export/test2'
rpc.mountd: v4root_create: path '/'
rpc.mountd: v4root_create: path '/export'
rpc.mountd: auth_unix_ip: client (nil) 'DEFAULT'
rpc.mountd: nfsd_fh: inbuf '129.132.10.7 1 \x00000000'
rpc.mountd: nfsd_fh: found 0x213d5f0 path /
rpc.mountd: nfsd_export: inbuf '129.132.10.7 /export'

Additionally here is the content of the various pipes when the above mount fails:

# cat /proc/net/rpc/nfsd.fh/content
#domain fsidtype fsid [path]
129.132.10.7 1 0x00000000 /
# cat /proc/net/rpc/nfsd.export/channel 
129.132.10.7 /export
129.132.10.7 /export
# cat /proc/net/rpc/nfsd.export/content 
#path domain(flags)
# /export	129.132.10.7()
/	129.132.10.7(ro,root_squash,sync,no_wdelay,no_subtree_check,v4root,fsid=0,uuid=2e8bd014:febf431f:a2127b34:4f1fcb95)
# cat /proc/net/rpc/nfsd.export/flush 
1335255591

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

nfs-utils-1.2.3-15.el6.x86_64
kernel-2.6.32-220.13.1.el6.x86_64

This happens both with the stock nfs-utils package as well with a modified package that incorporates the patches from BZ 797209 and BZ 812364.


How reproducible:

Always.


Steps to Reproduce:

Requires an up-to-date RHEL 6.2 server and client.

1. Create /export/test1 and /export/test2 on the server

2. Create /etc/exports with the following content:

/export/test1 *(rw,async,no_root_squash,no_subtree_check,fsid=99999)

3. Optionally configure 1000 netgroups named 1 to 1000 and populate them with some host triplets. This is not needed to reproduce the bug though.

4. Restart the nfs service or boot the system.

5. Add 1000 exports to netgroups by running

for i in `seq 1 1000`; do mkdir -p /export/test2/$i ; exportfs -o
rw,async,no_root_squash,no_subtree_check,fsid=19898$i @$i:/export/test2/$i ;
done

6. On the client try to mount /export/test1 from the server with NFS4. This will not succeed.


Additional info:

The problem is probably related to the one of BZ 797209 and BZ 812364 which are for NFS3.

Comment 2 RHEL Program Management 2012-05-06 04:04:14 UTC
Since RHEL 6.3 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 8 yanfu,wang 2012-07-06 02:47:47 UTC
ack it, reproducer could be found in comment #0 and comment #3.

Comment 13 errata-xmlrpc 2013-02-21 10:55:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0468.html