statd job starts before service is listening

Bug #610863 reported by Andrew Edmunds
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
nfs-utils (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: nfs-common
nfs-common version: 1:1.2.0-4ubuntu4

On my Lucid system with latest updates, NFS filesystems sometimes fail to mount successfully at boot.

Steps to reproduce:
1. In /etc/fstab, add an entry of the form:
<nfs-server>:<share> <mountpoint> nfs _netdev 0 0
2. Reboot a number of times

Expected results:
The NFS filesystem should be mounted on every boot

Actual results:
Occasionally the NFS mount fails and messages of the following form are logged in /var/log/boot.log:
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mountall: mount <mountpoint> [<pid>] terminated with status 32

After a boot where the NFS mounts fail, the mountall process is still running on login. Running:
kill -USR1 $(pidof mountall)
will then mount the missing filesystems sucessfully.

It is also possible to observe the problem without rebooting as follows.

Steps to reproduce:
Run the following shell loop, after setting $nfs_server, $share and $mntpt to suitable values

i=0
while (( i < 100 ))
do
    stop statd
    start statd
    mount.nfs $nfs_server:$share $mntpt
    umount $mntpt
    (( i++ ))
done

Expected results:
The NFS filesystem should be mounted on every iteration of the loop

Actual results:
Occasionally the NFS mount fails and the following messages are output:

mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified
umount: <mountpoint> not mounted

The symptoms are very similar to this bug back in Karmic:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/445181

---
Architecture: i386
DistroRelease: Ubuntu 10.04
InstallationMedia: Mythbuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100427.1)
NonfreeKernelModules: nvidia
Package: nfs-common 1:1.2.0-4ubuntu4
PackageArchitecture: i386
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_AU.UTF-8
ProcVersionSignature: Ubuntu 2.6.32-23.37-generic-pae 2.6.32.15+drm33.5
Tags: lucid
Uname: Linux 2.6.32-23-generic-pae i686
UserGroups:

Revision history for this message
Andrew Edmunds (andrew-edmunds) wrote :
Revision history for this message
Andrew Edmunds (andrew-edmunds) wrote :
Revision history for this message
Andrew Edmunds (andrew-edmunds) wrote :
Revision history for this message
Andrew Edmunds (andrew-edmunds) wrote :

I did the following to get more verbose logging:

--- etc/default/grub.20100728 2010-07-28 18:15:41.536842847 +1000
+++ etc/default/grub 2010-07-28 21:57:45.144891535 +1000
@@ -6,7 +6,7 @@
 GRUB_HIDDEN_TIMEOUT_QUIET=true
 GRUB_TIMEOUT=10
 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
-GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
+GRUB_CMDLINE_LINUX_DEFAULT="--verbose"
 GRUB_CMDLINE_LINUX=""

 # Uncomment to disable graphical terminal (grub-pc only)

... and ...

--- etc/init/mountall.conf.20100728 2010-04-26 15:46:36.000000000 +1000
+++ etc/init/mountall.conf 2010-07-28 21:58:14.917391034 +1000
@@ -28,7 +28,7 @@
     [ -f /forcefsck ] && force_fsck="--force-fsck"
     [ "$FSCKFIX" = "yes" ] && fsck_fix="--fsck-fix"

- exec mountall --daemon $force_fsck $fsck_fix
+ exec mountall --daemon --verbose $force_fsck $fsck_fix
 end script

 post-stop script

Revision history for this message