Red Hat Bugzilla – Bug 656003
/var busy during shutdown because nfsd threads still lurking around
Last modified: 2010-11-27 18:27:27 EST
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:
which immediately stops all nfsd threads.
Version-Release number of selected component (if applicable):
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)
there are still nfsd threads
no nfsd threads
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 ***