Lucid mountall can cause unexpected hangs

Bug #510415 reported by Steve Langasek on 2010-01-21
74
This bug affects 14 people
Affects Status Importance Assigned to Milestone
Release Notes for Ubuntu
Undecided
Unassigned
Ubuntu
Undecided
Unassigned
Nominated for Lucid by Florian Schröck
Nominated for Maverick by Florian Schröck

Bug Description

[filed on behalf of Stefan Bader]

The policy of mountall was changed recently to wait for all local filesystems
present in /etc/fstab on boot. This was done to fix problems with the async
boot which happened otherwise.
Unfortunately this causes entries like the folowing (which was used to have
special mount options for certain removable disks/USB sticks) to leave the
system boot hanging forever:

LABEL=xxx /mnt ext3 defaults,user,noatime 0 0

This should at least be documented in the release notes, though probably some
more should be done. Here a collection of thoughts:

1) The current behaviour does not give any indication about the reason of the
hang and leave the user clueless about the problem. Would it be possible to
print a message like "Waiting for xxx to become available for mounting", maybe
after a certain timeout?

2) At least some case might be prevented when update-manager could check for
entries in /etc/fstab which are currently not mounted or present and add the
"nobootwait" option to those entries.

3) To recover from this I resorted to the following steps, which are a bit
scary:
  * Press ESC to exit from plymouth, then wait until the system seems to be
    hanging. Then press SYSRQ-I which kills all currently running tasks.
  * [boot drops into a maintenance shell]
  * In some case I had to use "reset" to bring the terminal into a sane state.
  * Then edit /etc/fstab
  * Leave and reboot with CTRL-D
Question: Would it not be better to have a boot option to either drop to
maintenance (with only / mounted) or limit the time that mountall will wait.
Those could then be documented as workarounds.

Changed in ubuntu-release-notes:
status: New → Confirmed
Duane Hinnen (duanedesign) wrote :

I was able to boot into the old kernel that the upgrade left and edit my fstab.

Here was my entry in /etc/fstab that caused Lucid to hang on boot.
/dev/sdc1 /media/usb vfat defaults 0 0

Adding a 'nobootwait' option fixes the problem.
/dev/sdc1 /media/usb vfat defaults,nobootwait 0 0

As the OP says there was no hint as to what the problem was. Luckily I know my way around Ubuntu fairly well and was able to get enough info to lead me here. I am afraid there will be many that might not be able to so easily find this bug report. So i agree with providing users with a little more accessible information on this problem.

Steve Langasek (vorlon) wrote :

In fact, this is fixed now in lucid with mountall and plymouth. When mountall is waiting for a disk to be available, a message is displayed, with the option to skip the disk. No need to put this in the release notes now.

Changed in ubuntu-release-notes:
status: Confirmed → Invalid
Nicolas Briche (nbriche) wrote :

An option is good.

What does it mean for remote reboots, where there's no-one in front of the console to hit that option? Or, say, headless servers? Is there a timeout on waiting?

Placing "nobootwait" as a mount option into fstab will avoid waiting at all. Not
sure about timeout and one comment to the message: its there, but quite a few
people not really realize that "[SM]" means they can press 'S'kip or 'M'
(whatever that means).

Vaibhav Vaidya (ampfp) wrote :

This problem still exists. I had a line with usbfs mount point for /proc/bus/usb. mountall displays that /proc/bus/usb doesn't exist after upgrade to lucid beta 1 from karmic, but stops boot there!
Under unknown conditions though, the boot proceeds. Say 1 in 20 times. At present I'm booted into such a system. So I happened upon this error and added nobootwait to all my fstab entries except / and /proc, and disabled the usbfs entry. Hopefully the next reboot will be successful! I vote to reopen this error.

Steve Langasek (vorlon) wrote :

Vaibhav,

You should file a separate bug report against mountall about your specific issue with /proc/bus/usb, and post your exact fstab entry; there's no reason to think this should be a release notes item as opposed to a simple bug in mountall that we should fix.

(Does mountall not give you any option to stop waiting for /proc/bus/usb when this error happens?)

DouglasPhillips (doug-sbscomp) wrote :

Steve,

I had the same problem with /proc/bus/usb on my upgrade from Karmic => Lucid Beta 2 (done last night). I'll file a bug against mountall separately, but I can tell you that there is no message or option to stop waiting. In fact, there's no mention of /proc/bus/usb at all - it just hangs.

The first indication I had that /proc/bus/usb was involved was by using the SysRq magic key to drop to a maintenance terminal and run (per another post I found) mountall, which then gave a slew of errors about /proc/bus/usb and proceeded to boot.

Thanks
-Doug

Sergio Callegari (callegar) wrote :

This is not a bug about release notes.

This is a scary bug about mountall.

Upgrading to Lucid made my system completely unusable.

Cannot be booted into Linux because some webdav fs gets waited for forever.
Cannot be booted into windows because the kubuntu installer does not put it into the grub2 menu (but this is another story).

But IMHO the real problem is the complete lack of timeouts/means in the boot process to get a shell to fix things
Uselessness of the VTs during the boot process is another issue (why do we have 7 VTs if there cannot be a login prompt in neither of them?)

Please don't make the boot faster by removing these things. One would not make a car lighter by removing the seatbelts.

Ralf Kistner (ralf-kistner) wrote :

This bug also made my system unusable, after an upgrade to Lucid (the final version, not beta or RC).

I had the option to skip /proc/bus/usb, but the boot process still hanged afterwards. Even recovery mode did not work - I had to boot from a live cd to fix it.

I'm not sure if the actual hang was caused by the /proc/bus/usb usb line, or by the smbfs share in my fstab.

Steve Langasek (vorlon) wrote :

On Fri, Apr 30, 2010 at 11:22:05PM -0000, sergio.callegari wrote:
> This is not a bug about release notes.

Yes, it is.

> This is a scary bug about mountall.

No, it's not. If you are having problems with mountall, please file a new
bug report against the mountall package.

> Cannot be booted into Linux because some webdav fs gets waited for forever.

And when waiting, the screen should display a prompt to let you skip the
mount or enter a maintenance shell (if you have 'splash' enabled), and, with
or without the prompt, you should be able to press 'S' or 'M' to get the
same effect.

> Cannot be booted into windows because the kubuntu installer does not put it
> into the grub2 menu (but this is another story).

Please file a bug on the ubiquity package about this if you haven't already.
For most users, dual-booting appears to work correctly with both Kubuntu and
Ubuntu.

> But IMHO the real problem is the complete lack of timeouts/means in the
> boot process to get a shell to fix things

As above, there are means to access a recovery shell if a filesystem fails
to mount. If there are bugs, well, then there are bugs - but not bugs that
the developers have seen yet, so please report them and provide more
information so we can try to reproduce the problem.

> Please don't make the boot faster by removing these things.

We did not.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

Steve Langasek (vorlon) wrote :

On Sat, May 01, 2010 at 11:50:26AM -0000, Ralf Kistner wrote:
> This bug also made my system unusable, after an upgrade to Lucid (the
> final version, not beta or RC).

> I had the option to skip /proc/bus/usb, but the boot process still
> hanged afterwards. Even recovery mode did not work - I had to boot from
> a live cd to fix it.

> I'm not sure if the actual hang was caused by the /proc/bus/usb usb
> line, or by the smbfs share in my fstab.

What appears on your screen at the time of the hang (given that you say
skipping /proc/bus/usb worked, but didn't let the boot finish)? How did you
fix this from the live CD?

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

The problem here is typical of the last two Ubuntu releases. You broke functionality without proper deprecation. The behavior of a missing drive at boot should not keep the machine from coming up, as this has NEVER been a behavior prior to this release. This is not a release note problem, frankly the mount flag is BACKWARDS by default. The default behavior should have been the prior behavior, and the installer should have added a 'bootwait' flag to fstab by default for all items set up at install, or anything the upgrader determined required it (say root, user, et al).

At this point we should be making noise about changing the default behavior, etc, etc. with big warnings added to fstab about making 'bootwait' the default in future releases. Frankly I don't see why it should be a default at all. It would seem to me you would only want to flag those items that you need to wait for.

It's like the argument I had with the guy maintaining the 'tail' command. He changed the cli syntax to make it conform to GNU standards. I told him he was an idiot. You don't break 30 years worth of shell scripts just so you can conform to a new standard. Totally absurd.

Overall the release is pretty good if you want to run a desktop. If it's a server you may want to stick to 9.04.

Martin Mueller (ubuntu2-mat77) wrote :

I fully agree: I updated my headless server via SSH (server is in a datacenter) and then rebooted.
The box then did not restart and I had to walk into the datacenter, plug in a terminal to see the message "disks did not mount; ignore or wait?"

I suggest that either the releasenotes should include big warnings that all disks in fstab MUST be present on install or else the installer should ask whether to add nobootwait to existing volumes.

i just spent about 1 hour trying to fix my machine because of this SH** :(

i reinstalled windows and formated the partition - which was listed in /etc/fstab with the UUID and because of the reformat the UUID changed

the boot process hang - no indication why
i even recovered the whole ubuntu partition from my backup - of course without success
not even the recovery mode was working! i expected at least this
not even when i booted with "init=/bin/bash" - the system froze (hard reset necessary)

BY ACCIDENT i pressed "m" while it was hanging again - this changed the screen to a message, saying not everything could be mounted and dropped me in the maintenance shell ?!??

please fix this behavior - this is the opposite of "user friendly"

Steve Langasek (vorlon) wrote :

Florian,

I'm sorry that you had the problems you did recovering your system after changing a partition UUID, but that doesn't appear to be related to this bug report. Mountall was fixed well before the lucid release to provide progress information on the screen about unmountable filesystems; if that doesn't work for you, then you've found a new bug. Please file a new bug report against the mountall package.

Changed in ubuntu:
status: New → Invalid
Yaniv Aknin (yaniv-aknin) wrote :

I agree with some of the voices raised here. I just edited fstab, screwing up the device name of an unimportant data partition, and now I'm left with a non-booting server and no clear indication of what went wrong (well, until I found this).

I think perhaps other than the root partition, a flag like 'forcebootwait' should trigger this behaviour, and the default should be as 'nobootwait' is now.

This isn't a horrific bug (no data loss, a quick visit to the console will fix) - but it's a nasty one in areas where everyone is a little jumpy (booting, storage).

Keep up the otherwise good work.

Ketil Malde (ketil-ii) wrote :

Well, guess what, this happened to me, too. After having added my new phone to fstab (as a user mount), the system just hung in the middle of the boot process. Fsck found my root, /dev/sda2 to be clean, and then...nothing. No message about any key shortcuts, no message about waiting for anything. Interesting that this has apparently been reported again and again for the last nine months - I've come to expect better.

I agree it's not about release notes, this is fairly blatant misbehavior which should be fixed. Is there another bug I can add my voice to here? The "duplicate" seems to encourage commenting here instead...pretty strange, since that bug is "New" and this one is "Invalid"...

Frank de Bruijn (grizzler) wrote :

Indeed. This is not user friendly behaviour. I have had the splash screen truned off for as long as I can remember, because that is supposed to give me MORE information if things go wrong. This idiotic change actually does the opposite. Totally unacceptable.

no!chance (ralf-fehlau) wrote :

There is a serious error in mountall, I think. The upgrade from hardy to lucid works fine on the first look. But after editing /etc/fstab my system hangs without an error message. The only change was a little bit formatting for a better overview on the mount options. When I found this thread, I tried to copy the old fstab from my hardy backup image and my system boots, but without using the swap device (did the upgrade to lucid change the uuid for swap?). When I try to correct the UUID for my swap device, the system will not boot at all. After mounting / and /boot, nothing more happens. The only way to boot up is not using swap space. :-(

no!chance (ralf-fehlau) wrote :
ElroyLiddington (elroy) wrote :
Download full text (3.3 KiB)

I think I have the same bug/issue.

Problem: On boot quite often * it just hangs at the blue kubuntu splash screen with dots moving.
Just sits there. Has not crashed, because a Ctrl-Alt-Delete does an ordered shutdown and restart.
No other prompts/etc on screen - just splash screen - cannot swap to other consoles.
Does not do it on every boot.

* The machine used to run 24/7, so cannot pinpoint when it first started happening.
Running Kubuntu 10.04 - was not doing this when it was first installed (a long time ago), but cannot be sure I did not alter fstab to create this problem.

Machine has 6GB RAM, so if SWAP is disabled/non-functional I might not have noticed...interesting how this was NOT brought to my attention by the machine - maybe have small terminal window in splash screen where minor/major errors on boot can be noted, but still have it looking ṕretty´?

Fstab:

==================================================================
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda3 during installation
UUID=79d19e27-a9ec-47b7-b8c6-6e5502fd4b6f / ext3 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=90ccb876-b0fb-4185-a625-1ebe6a3c2205 /boot ext4 defaults 0 2
# /home was on /dev/md0 during installation
UUID=5c588f6f-e333-480a-90e4-46c755d1674b /home ext3 defaults 0 2
# swap was on /dev/sda2 during installation
UUID=24138457-46ef-49ef-848b-0ba4ee5d317b none swap sw 0 0
# swap was on /dev/sdb1 during installation
UUID=9efda2c6-3df9-4206-8b60-f656077dd799 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
==================================================================

Mountall:

==================================================================
swapon: /dev/disk/by-uuid/24138457-46ef-49ef-848b-0ba4ee5d317b: swapon failed: Device or resource busy
mountall: swapon /dev/disk/by-uuid/24138457-46ef-49ef-848b-0ba4ee5d317b [13054] terminated with status 255
mountall: Problem activating swap: /dev/disk/by-uuid/24138457-46ef-49ef-848b-0ba4ee5d317b
swapon: /dev/disk/by-uuid/9efda2c6-3df9-4206-8b60-f656077dd799: swapon failed: Device or resource busy
mountall: swapon /dev/disk/by-uuid/9efda2c6-3df9-4206-8b60-f656077dd799 [13058] terminated with status 255
mountall: Problem activating swap: /dev/disk/by-uuid/9efda2c6-3df9-4206-8b60-f656077dd799
==================================================================

Blkid:
==================================================================
/dev/sda1: LABEL="BOOT" UUID="90ccb876-b0fb-4185-a625-1ebe6a3c2205" TYPE="ext4"
/dev/sda2: UUID="24138457-46ef-49ef-848b-0ba4ee5d317b" TYPE="swap"
/dev/sda3: UUID="79d19e27-a9ec-47b7-b8c6-6e5502fd4b6f" TYPE="ext3"
/dev/sdb1: UUID="9efda2c6-3df9-4206-8b60-f656077dd799" TYPE="swap"
/dev/sdb5: UUID="84038a4e-7bdd-d632-59c4-7b6bc0f30829" TYPE="linux_raid_member"
/dev/sdc1: UUID="3359f207-afa6-4711-876f-9833633b265b" TYPE="swap"
/dev/sdc5: UUID="84038a4e...

Read more...

ElroyLiddington (elroy) wrote :

OK.
Just did some testing:

Warm-reboots - seems to start OK.

Cold-boot hangs * at splash screen - tried pressing ´m´ and ´S´ - nothing happens.
Cannot change to other consoles - hitting Ctrl-Alt-Del initiates restart and suddenly i can access other console again (but not login as no time during shutdown).

Will try to get rid of splash screen so i can see boot process to make sure itś not another issue.

* Kubuntu splash screen does NOT have moving dots - just all solid blue ones

ElroyLiddington (elroy) wrote :

Just found this:

´plymouth-log-viewer´ - as any user in terminal

==================================================================
fsck from util-linux-ng 2.17.2
udevd[412]: BUS= will be removed in a future udev version, please use SUBSYSTEM= to match the event device, or SUBSYSTEMS= to match a parent device, in /etc/udev/rules.d/52-nut-usbups.rules:6

fsck from util-linux-ng 2.17.2
/dev/sda3: clean, 368269/2154496 files, 3261249/8610560 blocks
BOOT: clean, 237/33600 files, 30279/134144 blocks
fsck from util-linux-ng 2.17.2
/dev/md0: clean, 91248/19267584 files, 29354502/77068272 blocks
 * Starting AppArmor profiles [80G Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
[74G[ OK ]
Loading the saved-state of the serial devices...
/dev/ttyS0 at 0x03f8 (irq = 4) is a 16550A
 * Setting sensors limits
==================================================================

Steve Langasek (vorlon) wrote :

Elroy,

> I think I have the same bug/issue.

This bug has been closed as *invalid*. It is not a productive use of your time to follow up to this bug report. I recommend you look in one of the support forums for advice - e.g., ubuntuforums.org or askubuntu.com.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers