statd job starts before service is listening
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>
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:/
---
Architecture: i386
DistroRelease: Ubuntu 10.04
InstallationMedia: Mythbuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100427.1)
NonfreeKernelMo
Package: nfs-common 1:1.2.0-4ubuntu4
PackageArchitec
ProcEnviron:
SHELL=/bin/bash
LANG=en_AU.UTF-8
ProcVersionSign
Tags: lucid
Uname: Linux 2.6.32-
UserGroups:
affects: | mountall (Ubuntu) → nfs-utils (Ubuntu) |
summary: |
- mountall races with statd startup + Race condition in statd.conf |
tags: | added: patch |
description: | updated |
summary: |
- Race condition in statd.conf + statd job starts before service is listening |
Changed in nfs-utils (Ubuntu): | |
status: | New → Confirmed |
I did the following to get more verbose logging:
--- etc/default/ grub.20100728 2010-07-28 18:15:41.536842847 +1000 TIMEOUT_ QUIET=true OR=`lsb_ release -i -s 2> /dev/null || echo Debian` LINUX_DEFAULT= "quiet splash" LINUX_DEFAULT= "--verbose" LINUX=" "
+++ etc/default/grub 2010-07-28 21:57:45.144891535 +1000
@@ -6,7 +6,7 @@
GRUB_HIDDEN_
GRUB_TIMEOUT=10
GRUB_DISTRIBUT
-GRUB_CMDLINE_
+GRUB_CMDLINE_
GRUB_CMDLINE_
# Uncomment to disable graphical terminal (grub-pc only)
... and ...
--- etc/init/ mountall. conf.20100728 2010-04-26 15:46:36.000000000 +1000 mountall. conf 2010-07-28 21:58:14.917391034 +1000 "--force- fsck" "--fsck- fix"
+++ etc/init/
@@ -28,7 +28,7 @@
[ -f /forcefsck ] && force_fsck=
[ "$FSCKFIX" = "yes" ] && fsck_fix=
- exec mountall --daemon $force_fsck $fsck_fix
+ exec mountall --daemon --verbose $force_fsck $fsck_fix
end script
post-stop script