Bug 798251 - Running 'exportfs' for exports to netgroups on running server causes NFS3 clients to hang
Summary: Running 'exportfs' for exports to netgroups on running server causes NFS3 cli...
Keywords:
Status: CLOSED DUPLICATE of bug 797209
Alias: None
Product: Fedora
Classification: Fedora
Component: nfs-utils
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Steve Dickson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-28 12:36 UTC by Stefan Walter
Modified: 2012-11-08 16:07 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-11-08 16:07:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Stefan Walter 2012-02-28 12:36:36 UTC
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
hang.

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

kernel-PAE-3.3.0-0.rc4.git1.4.fc17.i686
nfs-utils-1.2.5-12.fc17.i686

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.

How reproducible:

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

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

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
   and SELinux.

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 \
   rw,async,no_root_squash,no_subtree_check,fsid=99999$i \
   @x$i:/export/test2/$i ; done

Actual results:

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.

Expected results:

Access to the mounted NFS3 share should not hang.

Additional info:

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
more quickly.

Comment 1 Stefan Walter 2012-03-01 09:48:33 UTC
I found the bug. An analysis and two suggestions to fix it can be found in
BZ797209.

Comment 2 Steve Dickson 2012-11-08 16:07:18 UTC

*** This bug has been marked as a duplicate of bug 797209 ***


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