A message: "mount: / is busy" appears every time shutting down or rebooting.

Bug #1019347 reported by tuhu on 2012-06-29
208
This bug affects 43 people
Affects Status Importance Assigned to Milestone
plymouth (Ubuntu)
High
Unassigned
upstart (Ubuntu)
High
Unassigned

Bug Description

I arrived here from bug 963106 [https://bugs.launchpad.net/bugs/963106]. I thought that it was a problem with network-manager, but it was not.

I was suggested that it is probably a problem with upstart : "that modemmanager simply hasn't had time to complete the shutdown process before umountroot is run. Since modemmanager is an upstart job, sendsigs doesn't kill it."

lsb_release -rd:
     Description: Ubuntu 12.04 LTS
     Release: 12.04

apt-cache policy upstart:
   upstart:
  Installed: 1.5-0ubuntu7
  Candidate: 1.5-0ubuntu7
  Version table:
 *** 1.5-0ubuntu7 0
        500 http://kambing.ui.ac.id/ubuntu/ precise-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1.5-0ubuntu5 0
        500 http://kambing.ui.ac.id/ubuntu/ precise/main amd64 Packages

Hope this will be fixed. Thanks.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: upstart 1.5-0ubuntu7
ProcVersionSignature: Ubuntu 3.2.0-26.41-generic 3.2.19
Uname: Linux 3.2.0-26-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu8
Architecture: amd64
Date: Sat Jun 30 00:08:18 2012
InstallationMedia: Custom Live CD - Release amd64
SourcePackage: upstart
UpgradeStatus: No upgrade log present (probably fresh install)

tuhu (tuhubage) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in upstart (Ubuntu):
status: New → Confirmed
tuhu (tuhubage) on 2012-07-11
description: updated
Dave Gilbert (ubuntu-treblig) wrote :

Marking High because it's probably not good to repeatedly shutdown without a proper unmount.

Changed in upstart (Ubuntu):
importance: Undecided → High
tuhu (tuhubage) on 2012-08-01
summary: - A message: "mount: / is busy" appears every time when shutting down and
- fsck always runs when booting to check /dev/sda1.
+ A message: "mount: / is busy" appears every time when shutting down.
summary: - A message: "mount: / is busy" appears every time when shutting down.
+ A message: "mount: / is busy" appears every time or rebootingwhen
+ shutting down.
summary: - A message: "mount: / is busy" appears every time or rebootingwhen
- shutting down.
+ A message: "mount: / is busy" appears every time shutting down or
+ rebooting.
tuhu (tuhubage) wrote :

Hi, I was browsing on the net and found this link: http://ubuntuforums.org/showthread.php?t=2008576 . I think my problem is related to the "freezing plymouthd" that does not get killed on rebooting or shutting down.

As instructed in the link, I put a bash script which content was:

 #! /bin/sh

ps -Af >> process.log

in /etc/rc6.d before the "S60umountroot" script file. I opened the "process.log" file in root directory and find this:

root 2842 2 0 18:27 ? 00:00:00 [kworker/0:3]
root 2854 1 1 18:27 ? 00:00:00 /sbin/plymouthd --mode=shutdown
root 2890 2 0 18:27 ? 00:00:00 [kworker/u:0]

I did the first solution on the link. What I did was:
1. I renamed the file of "S60umountroot" that is in /etc/rc6.d and /etc/rc0.d to "S61umountroot".
2. Created a file named "S60perso-script" and set it to be executable in /etc/rc6.d and /etc/rc0.d .

The content of the "S60perso-script" was as follows:

#! /bin/sh
### BEGIN INIT INFO
# Provides:
# Required-Start:
# Required-Stop:
# Should-Stop:
# Default-Start:
# Default-Stop: 0 6
# Short-Description: Kill freezing plymouthd
### END INIT INFO

PATH=/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

case "$1" in
  start)

    killall -9 plymouthd

    ;;
  restart|reload|force-reload)

    ;;
  stop)

    killall -9 plymouthd

    ;;
  *)

    ;;
esac

:

{Source: http://ubuntuforums.org/showthread.php?t=2008576 }

That's it! And, the "mount:/ busy message" does not appear again on shutting down or rebooting. And I think the problem was not in upstart.

Juan Pablo Baserga (jbaserga) wrote :

Hi,
taking advice from other threads, I added an ps and lsof commands to the umountroot script just before the root remount command. The result is attached. As you can see the only non-kernel/init programs running are rc, S60umountroot and plymouthd. Thou I couldn't find in the lsof which is the open file that makes / busy, I agree that plymouthd shouldn't be running at this stage.

Hope this helps with debugging. My system is not clean install, upgraded several times, maybe this is the source of the problem.

Best regards,

Juan Pablo

Gro-Tsen (david-madore) wrote :

This bug report is highly confusing, so let me state this more clearly: the plymouthd process is still running at the point where /etc/init.d/umountroot is run in the shutdown process, and it is holding some rw file descriptor stopping / from being remounted ro, thus causing an unclean shutdown (and a longer boot time because the journal needs to be replayed).

I don't know what plymouthd is supposed to be, but I'm pretty sure it should be dead at that point in the shutdown process. For some reason, it is not responding to TERM signals: this should maybe be considered a bug in plymouthd (notwithstanding the thought that plymouthd is a bug in and of itself).

I didn't figure out what the offending rw file descriptor was. I also don't know why only certain users are affected (this is probably related to the details in partitioning).

The obvious, but ugly, workaround is to edit /etc/init.d/umountroot to add a line such as "/usr/bin/killall -9 plymouthd" at the top of the do_stop() function (probably a good idea to add a couple of "sync"'s around that, too).

I found that instead of 'killall' it is also possible to invoke "/bin/plymouth quit". So it seems that plymouth is still honoring quit requests. Why it doesn't honor the first quit request (or if there is any quit request) is beyond my knowledge.

Dave Gilbert (ubuntu-treblig) wrote :

As per comments #6,#7 added plymouth (may as well leave upstart in until the upstart guys confirm it's not them).

Changed in plymouth (Ubuntu):
importance: Undecided → High
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in plymouth (Ubuntu):
status: New → Confirmed

This has been present in all kinds of iterations of 12.10 for quite a while now. Unless you remove quiet splash from /etc/default/grub the message obviously won't show up, but it will cause Plymouth to hang on the shutdown splash screen for quite a while.

Not only does this cause a risk of data loss due to the unclean unmount, it also makes the shutdown process last unnecessarily long. Compared to 12.04, 12.10 shuts down very slowly. Behaviour like this will only make solving bug #1 harder.

Steve Langasek (vorlon) wrote :

This problem is not universally reproducible. I don't see any of these problems in 12.10 - I certainly don't think this is a plymouth bug, since plymouth runs on everyone's systems. Someone who can reproduce this will have to debug to find out what files are being held open and why.

Changed in plymouth (Ubuntu):
status: Confirmed → Incomplete
Changed in upstart (Ubuntu):
status: Confirmed → Invalid

Running 'sudo service networking stop' prior to shutting down decreases the time needed by nearly 100%. Still, the message about / being busy persists. I don't believe I have any problems with data corruption after booting up again though. I haven't seen fsck come by.

Never mind; fsck does come by:

[ 1.562038] EXT4-fs (sda2): INFO: recovery required on readonly filesystem
[ 1.562044] EXT4-fs (sda2): write access will be enabled during recovery
[ 1.572388] EXT4-fs (sda2): recovery complete
[ 1.572862] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)

Even though the message is always like this - so I doubt any serious consequences will follow - this isn't right.

I'll try to find out why this is happening, but it's a really confusing situation. The strange thing is; it happens both in VirtualBox running on my Debian PC and on my laptop running Xubuntu 12.10 natively. Also, I've seen it happen with a completely unmodified Ubuntu 12.10 install (VirtualBox) and a netinstall image with manually configured Xubuntu 12.10 packages (laptop). I do remember though, that it doesn't happen directly after installing a netinstall image, so I doubt we'd have to look in the packages that are part of ubuntu-minimal and ubuntu-standard, although I'd have to double-check that later. At this point, I'm suspecting something network-related, but don't pin me down on it.

Comment #5 contains some debug output, including the list of open files after shutdown.

I also cannot reproduce this behavior with my desktop-pc. But my laptop (eee-PC) always has this problem when shutting down.

Steve Langasek (vorlon) wrote :

Well, the debugging output in comment #5 doesn't show any files open for writing on the root filesystem, except for the debug output itself. It distinctly does not show plymouth holding any files open for writing.

I guess I'll just have to try to find this the old-fashioned way. I'll do a minimal netinstall in VirtualBox and build up the operating system one by one, keep rebooting in the meanwhile and wait until the problem starts to occur. Hopefully I can then at least find the offending package, so we can work from there.

I've found it. Purging dnsmasq-base solves the problem. Sadly, this is a dependency of network-manager, so it's not really an option to do so.

Can others confirm that this works for them? Edit /etc/network/interfaces prior to purging the package, of course. Otherwise you'll lose your network connections.

In case of ethernet, add:

auto eth0
iface eth0 inet dhcp

In case of wireless, add:

auto wlan0
iface wlan0 inet dhcp
wpa-ssid YOUR_SSID
wpa-psk YOUR_PSK

Could it be possible that these memory mappings are read/write?

plymouthd 10958 root mem REG 8,5 440 14729257 /root/.config/dconf/user
plymouthd 10958 root mem REG 8,5 1 557098 /root/.cache/dconf/user

I'm not completely sure whether my situation is identical to this bug, so I've filed this bugreport against dnsmasq: https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/1058987

Carsten Juttner (carjay) wrote :

Eduard,

you are correct, I added some debug output to the kernel itself (in fs/file_table.c) to log the inode number that causes sys_mount to return EBUSY.

The inode in my case was reported as 5669195 which according to the lsof log is exactly the mapping you suspected:

plymouthd 3101 0 mem REG 8,5 1 5669195 /root/.cache/dconf/user

It seems to be part of d-conf.

Launchpad Janitor (janitor) wrote :

[Expired for plymouth (Ubuntu) because there has been no activity for 60 days.]

Changed in plymouth (Ubuntu):
status: Incomplete → Expired

Let me summarize how I see the current status
* plymouth does not exit at shutdown, reason not known yet
* plymouth has open files due to dconf, it is unclear if this was intended in the design
* system cannot remount ro due to open file(s)

Additional note: I experience now the "/ is busy" on two of three of my systems. This gives me the feeling that this is probably a widespread problem among ubuntu users. Nevertheless, most users are likely not aware of this since they only use the (unity) GUI which does nowhere report this problem!

I don't know what the root cause of this problem is, but the only currently known symptom (cause) is that plymouthd does not exit at shutdown.Therefore I'm setting back the status to confirmed.

Changed in plymouth (Ubuntu):
status: Expired → Confirmed
Luigi R. (xluigi84) wrote :

Same problem on quantal. I didn't have any problem on precise. Now I cannot shut down anymore. I need to hold the power button but I am scared for my hd. By removing quit splash I can see that / cannot be unmonted and the system never halt. I have already tried acpi=off, apm_poweroff=1, acpi=force but nothing is solving the problem. I have noticed that if I don't login the system is able to shut down from the lightdm page (so at the beginning) but as soon as at least one login is performed is not possible anymore even if I logout before turning the machine off

You might try unchecking 'Available to all users' in the Network Manger
settings for your network connection. That works around the problem for
me on Linux Mint 14.

Luigi R. (xluigi84) wrote :

I think I have found the origin of my problem. First I tried to disconnect the network before shutting down and I noticed that the system turned off properly (even the monitor).

So I tried to put modprobe -r wl in /etc/init.d/unmountroot and it is working too, then I removed directly the package bcmwl and keeping the connection on the system can shutdown well although the message / is busy is still there.

In conclusion the bcmwl-kernel-source is preventing the system to turn off. Can someone verify if it?

Luigi R. (xluigi84) wrote :

The same problem with driver brcmsmac. For the moment I put nmcli nm enable false in /etc/init.d/unmountroot. I will see in these days if it will be enough.

Luigi R. (xluigi84) wrote :

In any case the message that we should get while shutting down should be umount / is busy, why is it mount?

/etc/init.d/umountroot does not execute umount, it executes mount with
'-o remount,ro' flags to remount the root filesystem in read-only mode.
Some process has a file open for write on the root filesystem, which
causes the remount to fail. See Bug #963106 and please try my
suggestion of unchecking 'Available to all users' in the Network Manager
settings for your network connection.

In any case the message that we should get while shutting down should be
umount / is busy, why is it mount?

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1019347

Title:
  A message: "mount: / is busy" appears every time shutting down or
  rebooting.

Status in “plymouth” package in Ubuntu:
  Confirmed
Status in “upstart” package in Ubuntu:
  Invalid

Bug description:
  I arrived here from bug 963106
  [https://bugs.launchpad.net/bugs/963106]. I thought that it was a
  problem with network-manager, but it was not.

  I was suggested that it is probably a problem with upstart : "that
  modemmanager simply hasn't had time to complete the shutdown process
  before umountroot is run. Since modemmanager is an upstart job,
  sendsigs doesn't kill it."

  lsb_release -rd:
       Description: Ubuntu 12.04 LTS
       Release: 12.04

  apt-cache policy upstart:
     upstart:
    Installed: 1.5-0ubuntu7
    Candidate: 1.5-0ubuntu7
    Version table:
   *** 1.5-0ubuntu7 0
          500 http://kambing.ui.ac.id/ubuntu/ precise-updates/main amd64 Packages
          100 /var/lib/dpkg/status
       1.5-0ubuntu5 0
          500 http://kambing.ui.ac.id/ubuntu/ precise/main amd64 Packages

  Hope this will be fixed. Thanks.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: upstart 1.5-0ubuntu7
  ProcVersionSignature: Ubuntu 3.2.0-26.41-generic 3.2.19
  Uname: Linux 3.2.0-26-generic x86_64
  NonfreeKernelModules: nvidia
  ApportVersion: 2.0.1-0ubuntu8
  Architecture: amd64
  Date: Sat Jun 30 00:08:18 2012
  InstallationMedia: Custom Live CD - Release amd64
  SourcePackage: upstart
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/plymouth/+bug/1019347/+subscriptions

Luigi R. (xluigi84) wrote :

ok thanks for explaining me how it works :-). Your suggestion is working for me and I got rid of "/ is busy" problem. But this issue should be already fixed since network-manager 0.9.4.0-0ubuntu4, isn't it?

I will add my comment there. Thanks again.

Hi Luigi, I'm glad to hear the the workaround helped. Yes, it's unclear
why this bug has reappeared in 12.10 after being fixed in 12.04.

Brent Miller (brentalanmiller) wrote :

After mucking around with all the Plymouth stuff in the earlier comments, I can also confirm that simply unchecking 'Available to all users' on my Ethernet connection in Network Manager fixed the problem of unclean mounts at shutdown and reboot.

Luigi R. (xluigi84) wrote :

I would like to add one comment more, during the shut down always kill all processes fails. Is it normal?

Thank, Steven Farmer

I have only uncheck the 'Available to all users' setting in the Network Manager settings for the network connection and I can now reboot without any problem on my linux Ubuntu 12.10 box

With the 'Availlable to all users'" setting checked, I have always this #é&@ of "mount : / is busy" message that hang all the system at each reboot and so, the need to stop "bestially" the computer by the power button (adon't like this)

Without it, I can now reboot my computer without any problem

@+
Yannoo

Jorge Morais (jorgemorais) wrote :

Unchecking 'Available to all users' in Network Manger settings for all my connections did NOT solve the issue for me.

However, disabling plymouth - by uninstalling plymouth-theme-ubuntu-logo and plymouth-theme-ubuntu-text - DID SOLVE the issue. I can now reboot cleanly.

Carsten Juttner (carjay) wrote :

It's been a couple of months but I finally got around to revisit this bug.

I had this happen reliably on 2 laptops, both updated from previous versions of Ubuntu.

On one of these "plymouthd" really seemed to be the culprit (see my own comment #22 ). I found out that the memory mapped region was actually opened in plymouth's X11 frame renderer (through libdconfsettings.so which seems to be part of gio). Uninstalling the X11 renderer ("apt-get remove plymouth-x11") helped on this laptop.

But this package wasn't even installed on the other laptop. Here, it was an instance of git-daemon (a runit service) which was still running causing svlogd to still keep a log file open. After uninstalling ("apt-get remove git-daemon-run") the busy mount at first seemed to have disappeared on this machine, too.

But yesterday I had another busy mount caused by modem-manager still running which caused init to keep a log file handle open on "/var/log/upstart/modemmanager.log".

So, in conclusion this is probably more of a meta-issue concerning a wider range of packages which would explain why the mentioned workarounds do not fix this issue reliably for everyone.

Alexander (lxandr) wrote :

Plymouth is not the cause. At least for me.
I've totally purged plymouth from system (installed dummy package) but I still have " / is busy " sometimes. At least once in a day.
You can see my comment here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1073433/comments/84

Øyvind Stegard (oyvinst) wrote :

Had this problem in 12.10 (upgraded from 12.04) and now in 13.04 (upgraded from 12.10). Unchecking "Available to all users" on the ethernet connection in network config seems to resolve it. The strange thing is, even though I have now re-enabled "Available to all users" on eth0, the problem is still fixed. Perhaps NetworkManager config just needed a jiggle. I've put some lsof debugging in /etc/init.d/umountroot in case it happens again..

MBybee (mike-bybee) wrote :

The "Available to all users" on eth0 worked for me as well - my box hung precisely as described (even with a shutdown -h now). After unchecking that setting, it shuts down promptly and correctly.

Conrad (conrad-couture) wrote :

I also have been getting this "bug" on two machines, each with a fresh Xubuntu 13.04 install.
----------------------------------
umount: /run/lock: not mounted
umount: /run/shm: not mounted
mount: / is busy
----------------------------------
Shutdown process would take about 10-12 seconds, instead of the expected (for me) 2-3 seconds. Once in a while, it would trigger 'fsck' for a scan at bootup.

After unchecking "Available to all users" on eth0 through network-manager, the problem is no longer present and my shutdown is clean. Will do the same on my second machine and report.

Conrad (conrad-couture) wrote :

I appologize for me incomplete testing. Please ignore my #41 comment, because after rebooting a few more times, I found that the problem persists...mount: / is busy.
I managed to reboot a couple of times immediately after logging in, where the reboot process was the normal 2-3 seconds, but have had difficulty making that happen again. Now it's always the long 10-12 second shutdown.
Long story short: unchecking "Available to all users" box helped, but for only a reboot or two.

richud (richud.com) wrote :

I am getting this problem still with 13.10 (clean install), only by unticking 'enable networking' , waiting , then shutting down do I not get Mount: / busy.

mtdew3q (thirdshiftcoder) wrote :

Hi-

I was at a friends and his dell computer wouldn't shut down right. It is Ubuntu 12.04. It hung on shutdown. "Available to all users" did nothing to solve this for my friend. I tried maybe the uncovential method of renaming /etc/init/plymouth.conf to ... plymouth.conf.disabled. After that, I had to go to rescue system to put it back by renaming it back to original. I had to mount root in rescue system as read/write to rename again. Plymouth on crunchbang didn't work for me on usb live persistent, but that is another story. My thought was, as per other peoples reports, to disable plymoth to eliminate that plymouth was causing this problem.

My friend has a pc that he can't shut down, unless he holds down the power button. I don't know what to tell him at this point. Using the command line to shut down doesn't work either.

It seems weird that I run unbuntu 12.04 and my pc works fine and his doesn't. I think it is a hardware related issue with a driver or firmware or something different. I can brag and say that I have a ZaReason, but my friend is not so lucky.

I am going to tell him to either buy dell for linux, system76 or zareason if he wants a new one.

I can't fix it :-( I gave up after having to go to rescue mode and undo disabiling plymouth.

thanks,
mtdew3q

I made two discoveries:
* I can also reproduce this problem on my single "good" system if I plug an USB bluetooth stick
* It appears that "pre-start" in "/etc/init/plymouth-stop.conf" is not executed at all on shutdown

So this might be an indication for some kind of timing problem.

Another observation: When I activate "plymouth:debug" according to https://wiki.ubuntu.com/Plymouth#Enabling_Debugging , unmounting root also fails when running ubuntu 12.04 within a virtual machine.

Ok, ignore for now my previous two posts. The two machines "reliably" producing "mount: / is busy" have the packet "plymouth-x11" installed. When uninstalling this packet on these machines the error goes away.

At the moment I suspect that those cases which can be solved by means of disabling the "Available to all users" have a different cause.

To have a better idea of what is affected by this bug, is anyone having this problem on more recent releases? 14.04, 14.10? Is it only a problem on 12.04 and 12.10?

Changed in plymouth (Ubuntu):
status: Confirmed → Incomplete

I am still facing this problem.

Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty

I have 13 network cards (a network simulator lab) and unchecking "available to all users" did not solve my problem
Poweroff shuts down the computer
Halt does not

In both cases I still see the message "mount / is busy"

This is not a fresh vanilla system, it went through upgrades since version 10 I guess (software raid was in beta at that time if I remember correctly or it was not widely available)

Jorge Morais (jorgemorais) wrote :

I recently had this problem on a 14.10 notebook. This notebook was upgraded from 14.04.

xor (xor) wrote :

Using Kubuntu 14.04.1 amd64, I can confirm that plymouth is still running during shutdown at the point in time which was suggested to investigate via ps logging at comment https://bugs.launchpad.net/ubuntu/+source/plymouth/+bug/1019347/comments/4

I do not get the "mount: / is busy" though. I get rather get "Stopping early crypto disks... [fail]"

xor (xor) wrote :

(Addendum to comment #51: I should have mentioned that I *do* suffer from my root filesystem being unclean at every boot, so unmounting somehow fails... )

Launchpad Janitor (janitor) wrote :

[Expired for plymouth (Ubuntu) because there has been no activity for 60 days.]

Changed in plymouth (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers