Bug 656003

Summary: /var busy during shutdown because nfsd threads still lurking around
Product: [Fedora] Fedora Reporter: Ronald Wahl <rwahl>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: jlayton, steved
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-27 23:27:27 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:

Description Ronald Wahl 2010-11-22 20:29:59 UTC
Description of problem:
When rebooting or halting the system /var cannot be unmounted because it is busy. The reason is that the nfsd kernel threads are not terminated synchronously but with a delay. After the last of these threads is gone the message "nfsd: last server has exited, flushing export cache" appears in dmesg and the /var can be unmounted. But it takes some minutes until the last server exits which is too long for the shutdown process.

I tried to manually reproduce it and found that if the network is shut down before the last nfsd thread is gone it will hang. So it looks like a race condition. Probably the stop operation of the nfs start script should enforce that all nfsd threads are gone before returning. E.g. this can be done by calling:

rpc.nfsd 0

which immediately stops all nfsd threads.

Version-Release number of selected component (if applicable):
nfs-utils-1.2.3-1.fc14.x86_64

How reproducible:
Always

Steps to Reproduce:
1. start rpcbind and nfs service
2. stop network
3. shutdown nfs service
4. Verify that all nfsd threads are gone (ps ax|grep nfsd)
  
Actual results:
there are still nfsd threads

Expected results:
no nfsd threads

Additional info:

Comment 1 Ronald Wahl 2010-11-27 23:27:27 UTC
Ah, it looks like this is a dupe of Bug 655726. So it looks like the nfs service is not stopped at all because of some generic code making assumptions that are not always true.

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