kernel-packages team mailing list archive
-
kernel-packages team
-
Mailing list archive
-
Message #38365
[Bug 1118447] Re: Race condition with network and NFS mounts causes boottime hang
A cleaner way of mounting the nfs shares than Josep provided is
something like what I have below. It looks for whether the nfs server
responds to a ping rather than the default route and will retry 3 times
with a 3 second timeout each time. It also checks all nfs mount points
listed in /etc/fstab which largely restores the functionality of that
file.
In any case this is a work around and it seems that fixing the original
bug would be preferable to continued effort in this direction.
cat /etc/fstab | sed 's/#.*//' | grep nfs | while read LINE
do
HOST=`echo "$LINE" | cut -f1 -d:`
DIR=`echo "$LINE" | awk '{print $2}'`
if ! mount -l -t nfs | awk '{print $3}' | grep -q "^$DIR$"
then
echo -n "Mounting '$DIR'"
COUNT=0
STOP=0
while [ $STOP -eq 0 -a $COUNT -lt 3 ]
do
if ping -qAc 3 $HOST > /dev/null
then
mount $DIR
STOP=1
echo " done."
else
# no sleep needed here because ping will take 3 seconds to fail anyway
COUNT=$( expr $COUNT + 1 )
echo -n "."
fi
done
if [ $STOP -eq 0 ]
then
echo " failed. $HOST not responding."
fi
else
echo "$DIR already mounted"
fi
done
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1118447
Title:
Race condition with network and NFS mounts causes boottime hang
Status in “linux” package in Ubuntu:
Confirmed
Status in “nfs-utils” package in Ubuntu:
Incomplete
Bug description:
I seem to experience a race condition during boot of my ubuntu 12.04 server: In approx. one of seven boots, the server hangs during bootup.
This is what I see on the screen:
After the line
* Starting configure network device
there is a short delay of about 1 second, then messages continue. I
see
* Starting Mount network filesystems [ OK ]
* Starting set sysctls from /etc/sysctl.conf [ OK ]
* Starting configure network device [ OK ]
* Stopping Mount network filesystems [ OK ]
* Stopping set sysctls from /etc/sysctl.conf [ OK ]
* Starting Block the mounting event for NFS filesytems until statd is running [ OK ]
* Stopping Block the mounting event for NFS filesytems until statd is running [ OK ]
* Starting Block the mounting event for NFS filesytems until statd is running [ OK ]
* Stopping Block the mounting event for NFS filesytems until statd is running [ OK ]
The last messages repeats several times, and then the boot process hangs.
In 6/7 of cases, I wait for a minute, and after that bootup continues.
But in approx 1/7 cases, the system hangs at this point forever. The
machine does not respond to CTRL-ALT-DEL, I have to reboot it using
SysRq-Keys.
WORKAROUND: Setting the NFS entries in fstab to "noauto" completely removes the problem:
There is no timeout during boot, and no lockup any more. The machine boote smoothly with the NFS-shares unmounted. After the machine is up, we can manually mount the NFS-shares without a problem.
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: linux-image-3.2.0-37-generic 3.2.0-37.58
ProcVersionSignature: Ubuntu 3.2.0-37.58-generic 3.2.35
Uname: Linux 3.2.0-37-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
AplayDevices: aplay: device_list:252: keine Soundkarten gefunden ...
ApportVersion: 2.0.1-0ubuntu17.1
Architecture: amd64
ArecordDevices: arecord: device_list:252: keine Soundkarten gefunden ...
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/by-path', '/dev/snd/controlC1', '/dev/snd/hwC1D0', '/dev/snd/pcmC1D3p', '/dev/snd/controlC0', '/dev/snd/hwC0D0', '/dev/snd/pcmC0D0c', '/dev/snd/pcmC0D0p', '/dev/snd/pcmC0D1p', '/dev/snd/pcmC0D2c', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
CurrentDmesg: [ 85.200104] lxcbr0: no IPv6 routers present
Date: Thu Feb 7 15:50:40 2013
HibernationDevice: RESUME=UUID=6c172536-57cc-4deb-867a-0718d572f23e
IwConfig:
lo no wireless extensions.
eth0 no wireless extensions.
lxcbr0 no wireless extensions.
MachineType: To be filled by O.E.M. To be filled by O.E.M.
MarkForUpload: True
ProcEnviron:
LANGUAGE=de:en
TERM=xterm
PATH=(custom, no user)
LANG=de_DE.UTF-8
SHELL=/bin/bash
ProcFB: 0 radeondrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-37-generic root=/dev/mapper/lvmvg-root ro debug splash vt.handoff=7
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: Es läuft kein PulseAudio-Dienst oder nicht als Sessiondienst.
RelatedPackageVersions:
linux-restricted-modules-3.2.0-37-generic N/A
linux-backports-modules-3.2.0-37-generic N/A
linux-firmware 1.79.1
RfKill:
SourcePackage: linux
UpgradeStatus: Upgraded to precise on 2012-04-28 (285 days ago)
dmi.bios.date: 07/04/2012
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0302
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: M5A97 EVO R2.0
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: To Be Filled By O.E.M.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0302:bd07/04/2012:svnTobefilledbyO.E.M.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnASUSTeKCOMPUTERINC.:rnM5A97EVOR2.0:rvrRev1.xx:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
dmi.product.name: To be filled by O.E.M.
dmi.product.version: To be filled by O.E.M.
dmi.sys.vendor: To be filled by O.E.M.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1118447/+subscriptions