Red Hat Bugzilla – Bug 798251
Running 'exportfs' for exports to netgroups on running server causes NFS3 clients to hang
Last modified: 2012-11-08 11:07:18 EST
Description of problem:
When NFS exports to netgroups are added via 'exportfs' on an already running
NFS server this may cause clients that already have mounted NFS3 shares to
Version-Release number of selected component (if applicable):
Actually the bug persists through F13 to F17 and EL 6.0 to 6.2 (these are
the versions I tried). As NFS clients I have tried EL5, EL6 and F16 but I
believe any NFS3 client will hang.
Always with the reproducer below on F13 to F17 or EL6 with any update level.
Steps to Reproduce:
1. Setup host 'server' as NFS server. Permanently disable the firewall
and SELinux. Enable nfsd debug output ('sysctl -w sunrpc.nfsd_debug=32767').
2. On 'server' add the following export to /etc/exports
3. On 'server' change /etc/nsswitch.conf to look up netgroups in files and
populate /etc/negroups by running
for i in `seq 1 1000`;do echo "x$i (host.example.com,,)";done >/etc/netgroup
4. Create the directories /export/test1 and /export/test2 on 'server', then
restart the nfs-server service, reboot or run 'exportfs -r'.
5. Setup host 'client' as NFS3 client. Permanently disable the firewall
6. On 'client' mount the exported directory to '/mnt' with NFS3:
mount -o rw,nfsvers=3 server:/export/test1 /mnt
7. On 'client' run the following line as root and observe the output:
cd /mnt ; while (true); do date;ls >/dev/null;touch x;sleep 1; done
8. On 'server' run the following line as root:
for i in `seq 1 1000`; do mkdir -p /export/test2/$i ; exportfs -o \
@x$i:/export/test2/$i ; done
A few seconds after executing step 8 the output on 'client' will stop. Accesses
to /mnt will hang on 'client'. On 'server' the following lines will appear
in the output of 'dmesg':
[...] nfsd: Dropping request; may be revisited later
When restarting the nfs-server service or running 'exportfs -r' the client
recovers almost immediately.
Access to the mounted NFS3 share should not hang.
I filed BZ797209 for the same bug in EL 6.2 two days ago. This bug is critical
for a deployed NFS server cluster at our site. Since it is also present in
bleeding-edge F17 I hope this bug gets more attention and therefore is resolved
I found the bug. An analysis and two suggestions to fix it can be found in
*** This bug has been marked as a duplicate of bug 797209 ***