Partitions not unmounted correctly

Bug #484307 reported by Alfred Krohmer
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
usplash
New
Undecided
Unassigned
usplash (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

When booting, usplash is interrupted and the screen is switched to a text TTY. A few seconds later I receive the following messages ("Home" is /dev/sda6, mounted on /home, and "Backup" is /dev/sda9, mounted on /backup):

fsck from util-linux-ng 2.16
Home: recovering journal
Home: clean, .../... files .../... blocks
...
fsck from util-linux-ng 2.16
Backup: recovering journal
Backup: clean, .../... files .../... blocks

... followed by GDM (switching to the TTY with Ctrl+F8 shows other normal boot messages). This happens on every boot (but not from the beginning, it started a few weeks ago). dmesg doesn't complain about any file system errors. I think the reason for this problem is that some partitions aren't waited enough for to be unmounted during halt/reboot (I have a shutdown time of about 3 seconds).

Corresponding lines from /etc/fstab:
UUID=fdc1faee-e625-4bf9-a176-5dca8b26a606 /home ext4 defaults 0 2
UUID=d16ccb31-bbff-4b91-931b-94993de1171f /backup ext4 defaults 0 2

devkid@desktop:~$ lsb_release -d
Description: Ubuntu 9.10
devkid@desktop:~$ uname -a
Linux desktop 2.6.31-15-generic #50-Ubuntu SMP Tue Nov 10 14:53:52 UTC 2009 x86_64 GNU/Linux

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

If you are using Ubuntu, please file a bug in the Ubuntu bug tracker rather than on the upstream project.

affects: upstart → null
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

I don't think there's an actual filesystem checking issue here, I think you're just being confused by the text being briefly visible as the X server is started.

Changed in usplash (Ubuntu):
status: New → Invalid
status: Invalid → Confirmed
Changed in null:
status: New → Invalid
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

(usplash bug should be the open one - since the text transition is the real issue)

Revision history for this message
Alfred Krohmer (devkid) wrote :

How can I move this bug to this project? If I use "Also affects project" the name "ubuntu" isn't accepted, what name do I have to put in there?

Revision history for this message
Alfred Krohmer (devkid) wrote :

Just forget about my previous post. I think it's a file system issue since the message says that it tries to recover the journal?!

Revision history for this message
pct (pct085) wrote :

I'm having what is probably the same problem as the original poster. I have two machines doing this after an upgrade to Lucid (10.04). There was no problem under karmic. On each I have around 6 file systems to mount. They are a mixture of non-raid normal partition ext3 file systems and RAID 1 ext3 file systems. On boot there will always be some "recovering journal" messages but it will happen on different combinations of file systems each boot.

To try and work out if it was a boot or previous shutdown problem, I shut down, booted from the live CD and ran dumpe2fs on all the filesystems. I then rebooted and stored the boot.log

In the output to dumpe2fs, some of the file systems had the following line:
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file

A typical boot.log is attached.

Revision history for this message
pct (pct085) wrote :

Sorry, here's the attachment.

Revision history for this message
pct (pct085) wrote :

By the way, perhaps usplash is effected by this but it isn't the core of the problem. The problem appears to be file systems that are not umounted properly on the previous shutdown.

Revision history for this message
pct (pct085) wrote :

I suspect the fault lies in upstart somewhere.

affects: usplash (Ubuntu) → upstart (Ubuntu)
Changed in upstart (Ubuntu):
status: Confirmed → New
Revision history for this message
pct (pct085) wrote :

For further information, the screen output on a "shutdown -H now" gives the following (srooy, I'm typing it out from a dead screen)

acpid: exiting

init: tty4 main process (1398) killed by TERM
... for tty5,2,3,6,1 and cron
 * Stopping MTA
 * Stopping MD monitoring service mdadm --monitor
nxsensor is disabled in '/usr/NX/etc/node.cfg'
init: avahi-daemon main process (1460) terminated with status 255
modem-manager: Caught signal 15, shutting down...
init: Disconnect from system bus
NX> ..... (a number of NX debug)
 * Stopping internet superserver inetd
Stopping Linux Video Disk Recorder: vdr - seems not to be running.
 * Will now halt
[ 144.272829] System halted.

Revision history for this message
pct (pct085) wrote :

Sorry, didn't mean to change this

affects: upstart (Ubuntu) → usplash (Ubuntu)
Changed in usplash (Ubuntu):
status: New → Confirmed
Revision history for this message
pct (pct085) wrote :
Download full text (4.0 KiB)

Ok, I'll take some of my comments back. The problem lies in the init scripts and the sequence numbers / priorities on the link. On my upgraded systems, /etc/rc0.d looks like this:
lrwxrwxrwx 1 root root 26 2010-04-13 12:51 K01clamav-freshclam -> ../init.d/clamav-freshclam
lrwxrwxrwx 1 root root 16 2010-04-13 12:51 K01dhcdbd -> ../init.d/dhcdbd
lrwxrwxrwx 1 root root 16 2010-05-20 15:21 K01distcc -> ../init.d/distcc
lrwxrwxrwx 1 root root 14 2010-04-13 12:51 K01ferm -> ../init.d/ferm
lrwxrwxrwx 1 root root 17 2010-04-13 12:51 K01hddtemp -> ../init.d/hddtemp
lrwxrwxrwx 1 root root 20 2010-04-13 12:51 K01kerneloops -> ../init.d/kerneloops
lrwxrwxrwx 1 root root 21 2010-04-13 12:51 K01laptop-mode -> ../init.d/laptop-mode
lrwxrwxrwx 1 root root 15 2010-04-13 12:51 K01mdadm -> ../init.d/mdadm
lrwxrwxrwx 1 root root 27 2010-04-13 12:51 K01nfs-kernel-server -> ../init.d/nfs-kernel-server
lrwxrwxrwx 1 root root 18 2009-10-07 10:37 K01nxsensor -> ../init.d/nxsensor
lrwxrwxrwx 1 root root 18 2009-10-07 10:37 K01nxserver -> ../init.d/nxserver
lrwxrwxrwx 1 root root 23 2010-04-13 12:51 K01openbsd-inetd -> ../init.d/openbsd-inetd
lrwxrwxrwx 1 root root 17 2010-04-13 12:51 K01openvpn -> ../init.d/openvpn
lrwxrwxrwx 1 root root 17 2010-04-13 12:51 K01postfix -> ../init.d/postfix
lrwxrwxrwx 1 root root 14 2010-04-13 12:51 K01vtun -> ../init.d/vtun
lrwxrwxrwx 1 root root 17 2010-04-13 12:51 K01winbind -> ../init.d/winbind
lrwxrwxrwx 1 root root 13 2010-05-20 15:01 K01xdm -> ../init.d/xdm
lrwxrwxrwx 1 root root 15 2010-04-13 12:51 K02mysql -> ../init.d/mysql
lrwxrwxrwx 1 root root 19 2010-04-13 12:51 K03mysql-ndb -> ../init.d/mysql-ndb
lrwxrwxrwx 1 root root 23 2010-04-13 12:51 K04mysql-ndb-mgm -> ../init.d/mysql-ndb-mgm
lrwxrwxrwx 1 root root 17 2010-05-20 15:21 K08apache2 -> ../init.d/apache2
-rw-r--r-- 1 root root 353 2009-09-08 04:58 README
lrwxrwxrwx 1 root root 14 2010-04-13 12:51 S01halt -> ../init.d/halt
lrwxrwxrwx 1 root root 20 2010-05-20 15:01 S01networking -> ../init.d/networking
lrwxrwxrwx 1 root root 18 2010-04-13 12:51 S01sendsigs -> ../init.d/sendsigs
lrwxrwxrwx 1 root root 18 2010-04-13 12:51 S01umountfs -> ../init.d/umountfs
lrwxrwxrwx 1 root root 22 2010-04-13 12:51 S01umountnfs.sh -> ../init.d/umountnfs.sh
lrwxrwxrwx 1 root root 20 2010-04-13 12:51 S01umountroot -> ../init.d/umountroot
lrwxrwxrwx 1 root root 29 2010-04-13 12:51 S01unattended-upgrades -> ../init.d/unattended-upgrades
lrwxrwxrwx 1 root root 17 2010-05-20 15:01 S02urandom -> ../init.d/urandom
lrwxrwxrwx 1 root root 22 2010-04-13 12:51 S02wpa-ifupdown -> ../init.d/wpa-ifupdown
lrwxrwxrwx 1 root root 26 2010-05-20 15:01 S04cryptdisks-early -> ../init.d/cryptdisks-early
lrwxrwxrwx 1 root root 20 2010-05-20 15:01 S06cryptdisks -> ../init.d/cryptdisks

On a fresh install it looks like this:
lrwxrwxrwx 1 root root 24 2010-05-20 21:30 K08vmware-tools -> /etc/init.d/vmware-tools
lrwxrwxrwx 1 root root 19 2010-05-20 21:14 K74bluetooth -> ../init.d/bluetooth
-rw-r--r-- 1 root root 353 2009-09-07 11:58 README
lrwxrwxrwx 1 root root 29 2010-05-20 21:14 S10unattended-upgrades -> ../init.d/unattended-upgrades
lrwxrwxrwx 1 root root 22 2010-05-20 21:14 S...

Read more...

Revision history for this message
pct (pct085) wrote :

My last update for the day.

After fixing the sequence numbers, the shutdown at least took longer and stopped some services. However it seems the rc scripts are run in parallel with upstart finishing other services. In particular the rc scripts shut down the network before autofs (/automount/autofs5) hung around which in turn blocked umount of most local file systems. Meanwhile the rc scripts executed the halt. I'm new to all this so perhaps I misunderstand. But it seems that the rc scripts are started when upstart is still cleaning up other services and there is a strong chance the machine will execute halt before everything is finished.

I'm hoping I'm wrong and someone can explain how this works.

Revision history for this message
Oliver Siegmar (osiegmar) wrote :

I noticed that the installation of VMware-Tools (VMware-Tools-4.0.0-236512 for ESX 4.0 in my case) causes that the sequence numbers of rc0 and rc6 changes. Before the installation halt is linked with S90halt, after the installation it is S01halt.

Revision history for this message
Oliver Siegmar (osiegmar) wrote :

This is the log when installing the VMware-Tools. There are several lines like this:

insserv: warning: current start runlevel(s) (0) of script `halt' overwrites defaults (empty).

Revision history for this message
Oliver Siegmar (osiegmar) wrote :

OK - here is how you can reproduce this:

root@ubuntutpl:~# cat /etc/init.d/testinit
#!/bin/sh
### BEGIN INIT INFO
# Provides: test
# Required-Start: $local_fs
# Required-Stop: $local_fs
# X-Start-Before: $network
# X-Stop-After: $network
# Default-Start: 2 3 5
# Default-Stop: 0 6
### END INIT INFO

root@ubuntutpl:~# ls -l /etc/rc0.d/
total 1
-rw-r--r-- 1 root root 353 2009-09-07 20:58 README
lrwxrwxrwx 1 root root 22 2010-05-21 19:18 S15wpa-ifupdown -> ../init.d/wpa-ifupdown
lrwxrwxrwx 1 root root 18 2010-05-21 19:16 S20sendsigs -> ../init.d/sendsigs
lrwxrwxrwx 1 root root 17 2010-05-21 19:16 S30urandom -> ../init.d/urandom
lrwxrwxrwx 1 root root 22 2010-05-21 19:16 S31umountnfs.sh -> ../init.d/umountnfs.sh
lrwxrwxrwx 1 root root 20 2010-05-21 19:16 S35networking -> ../init.d/networking
lrwxrwxrwx 1 root root 18 2010-05-21 19:16 S40umountfs -> ../init.d/umountfs
lrwxrwxrwx 1 root root 20 2010-05-21 19:16 S60umountroot -> ../init.d/umountroot
lrwxrwxrwx 1 root root 14 2010-05-21 19:16 S90halt -> ../init.d/halt
root@ubuntutpl:~# insserv /etc/init.d/testinit

[ alot of insserv warnings ]

root@ubuntutpl:~# ls -l /etc/rc0.d/
total 1
-rw-r--r-- 1 root root 353 2009-09-07 20:58 README
lrwxrwxrwx 1 root root 14 2010-05-21 20:01 S01halt -> ../init.d/halt
lrwxrwxrwx 1 root root 20 2010-05-21 20:01 S01networking -> ../init.d/networking
lrwxrwxrwx 1 root root 18 2010-05-21 20:01 S01sendsigs -> ../init.d/sendsigs
lrwxrwxrwx 1 root root 18 2010-05-21 20:01 S01umountfs -> ../init.d/umountfs
lrwxrwxrwx 1 root root 22 2010-05-21 20:01 S01umountnfs.sh -> ../init.d/umountnfs.sh
lrwxrwxrwx 1 root root 20 2010-05-21 20:01 S01umountroot -> ../init.d/umountroot
lrwxrwxrwx 1 root root 17 2010-05-21 20:01 S02urandom -> ../init.d/urandom
lrwxrwxrwx 1 root root 22 2010-05-21 20:01 S02wpa-ifupdown -> ../init.d/wpa-ifupdown

Revision history for this message
Oliver Siegmar (osiegmar) wrote :

I found a workaround. Before installing the VMware-Tools I rename /sbin/insserv to /sbin/insserv.bak - then the VMware-Tools installer uses update-rc.d as a fallback. After the installation I rename /sbin/insserv.bak back to /sbin/insserv .

Revision history for this message
Phillip Susi (psusi) wrote :

The usplash package has been superseded by plymouth and has been removed from the Ubuntu archive. Closing all related bugs.

Changed in usplash (Ubuntu):
status: Confirmed → Invalid
Curtis Hovey (sinzui)
no longer affects: null
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.