NetworkManager causes orphaned inodes

Bug #963106 reported by Steven Farmer
136
This bug affects 27 people
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Fix Released
High
Mathieu Trudel-Lapierre
Precise
Fix Released
High
Mathieu Trudel-Lapierre

Bug Description

[Impact]
On shutdown, dhclient isn't getting reaped by NetworkManager, despite being kept running through sendsigs so as not to disrupt remote filesystems (and their unmounting at shutdown). dhclient may be keeping open files for its lease files, which causes issues when unmounting /var/lib, which contains those lease files.

[Development Fix]
Remove support for connection assumption, which is meant to bring NetworkManager up to speed with connections that may have already be up during a restart of the daemon. Since we don't actually restart the daemon automatically (and instead suggest a restart of the system after upgrade) and the advantage is minimal compared to the impact on users of this interacting with the shutdown sequence, patch connection assumption out of the NM code and just always take down dhclient when NM stops.

[Stable Fix]
See above "Development fix".

[Test Case]
1) Shut down coputer.
2) In the shutdown process, perhaps as a post-stop script in /etc/init/network-manager, track down open files for the dhclient pid (which should be available from /run/sendsigs.omit.d/network-manager.dhclient{6,}.pid)

[Regression Potential]
Minimal, only affects bringing NetworkManager up on a restart of the daemon (sudo restart network-manager or /etc/init.d/network-manager restart), which improves on the speed of this operation and avoid resetting the connection if it's already up.

---------

During system shutdown, NetworkManager neither kills dhclient nor does it remove the dhclient pid file from the directory /var/run/sendsigs.omit.d. As a result, dhclient continues to hold the pid file open for write and when /etc/init.d/umountroot tries to remount the root filesystem read-only, the remount fails. The message:

mount: / is busy

is seen in the console, and the filesystem must be recovered at boot time:

[ 8.946427] EXT4-fs (sda1): INFO: recovery required on readonly filesystem
[ 8.947057] EXT4-fs (sda1): write access will be enabled during recovery
[ 11.234075] EXT4-fs (sda1): recovery complete

If shared libraries used by dhclient are updated before the reboot, orphaned inodes associated with the .so files are created. For example, doing "sudo apt-get install --reinstall libc6" and then rebooting leads to:

[ 8.356521] EXT4-fs (sda1): INFO: recovery required on readonly filesystem
[ 8.356521] EXT4-fs (sda1): write access will be enabled during recovery
[ 8.716544] EXT4-fs (sda1): orphan cleanup on readonly fs
[ 8.716544] EXT4-fs (sda1): ext4_orphan_cleanup: deleting unreferenced inode 313749
[ 8.724544] EXT4-fs (sda1): ext4_orphan_cleanup: deleting unreferenced inode 313733
[ 8.724544] EXT4-fs (sda1): ext4_orphan_cleanup: deleting unreferenced inode 313725
[ 8.724544] EXT4-fs (sda1): 3 orphan inodes deleted
[ 8.728544] EXT4-fs (sda1): recovery complete

This is network-manager 0.9.3.995+git201203152001.04b2a74-0ubuntu1 running under 12.04. I don't believe any actual data loss will occur as a result of this bug, but it's likely to produce much user anxiety. Also see Bug 952315, which misidentifies the cause of the problems as upstart.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: network-manager 0.9.3.995+git201203152001.04b2a74-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-20.32-generic 3.2.12
Uname: Linux 3.2.0-20-generic i686
ApportVersion: 1.95-0ubuntu1
Architecture: i386
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
Date: Fri Mar 23 07:42:20 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111011)
IwConfig:
 lo no wireless extensions.

 eth0 no wireless extensions.
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
 WimaxEnabled=true
ProcEnviron:
 TERM=xterm
 LANG=en_US.UTF-8
 SHELL=/bin/bash
RfKill:

SourcePackage: network-manager
UpgradeStatus: Upgraded to precise on 2012-03-02 (20 days ago)

Revision history for this message
Steven Farmer (stevenleefarmer) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in network-manager (Ubuntu):
status: New → Confirmed
Changed in network-manager (Ubuntu):
importance: Undecided → High
milestone: none → ubuntu-12.04
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Thanks for the info Steven. I looked into this a bit more.

It would seem this bug introduced the omitting: bug #869635

The resolution makes, I think, a false assumption that when network-manager is killed that it will take dhclient with it. This does not seem to be the case. Or, more likely, the processes are not waited on properly after being sent the kill signal. I looked through the code of network manager quite a bit, and could not find any code that explicitly stops the dhcp manager when SIGTERM is received, though I am no glib expert, so its possible when the main loop is exitted there is some kind of process that fires the watches which lead to the stop methods being called.

I do see that the dhclients die when I manually stop the network-manager job. This job is guaranteed to stop before umountrootfs because it stops on stopping dbus, which stops on deconfiguring-networking. deconfiguring-networking is always waited on during the shutdown.

One possiblity is that network-manager takes longer than 5 seconds to stop, at which point, upstart would send it a SIGKILL, and move on. To test that hypothesis we can just raise the kill timeout in the job to a very high level with

kill timeout 100

and then try to reproduce the problem.

Revision history for this message
Steven Farmer (stevenleefarmer) wrote :

Clint, I don't see the dhclient process die when network-manager is stopped. But I think I was guilty of some fuzzy thinking in saying that the problem is due to the pid file being held open; the problem is that the dhclient pid file isn't deleted from /var/run/sendsigs.omit.d (so /etc/init.d/sendsigs doesn't kill dhclient at shutdown time) *and* dhclient has a dhcp lease file open for write. The following should (I hope) show what I'm talking about:

$ ps auxw | grep NetworkManager | grep -v grep # NetworkManager and dhclient are both running
$ ls /var/run/sendsigs.omit.d # there are pid files for both dhclient and dnsmasq
$ sudo stop network-manager
$ ps auxw | grep NetworkManager | grep -v grep # now only dhclient is still running
$ ls /var/run/sendsigs.omit.d # and the dhclient pid file is still there
$ sudo lsof -c dhclient | grep lease # dhclient still has a lease file open for write

Because sendsigs won't kill dhclient and the lease file is open for write, /etc/init.d/umountroot fails and the filesystem must be recovered. And dhclient still has libc .so files open as well, which is what leads to orphaned inodes if those files have been overwritten during a libc upgrade.

If the dhclient pid file was removed from /var/run/sendsigs.omit.d when network-manager is stopped, then sendsigs would kill dhclient at shutdown. Or, if dhclient could be terminated when network-manager shuts down, that should work too. I don't understand enough to guess why the pid files are written to sendsigs.omit.d in the first place...

tags: added: rls-mgr-p-tracking
Revision history for this message
Steven Farmer (stevenleefarmer) wrote :

One last data point: I'm seeing the problem only with wired connections when "Available to all users" has been checked for that connection (right-click on the nm-applet icon, select "Edit Connections...", select the connection and click "Edit..." then check/uncheck "Available to all users" in the lower left).

To /etc/init.d/umountroot, just before the 'mount -n -o remount,ro /' sequence, I added:

/bin/ps > /DEBUG
/usr/bin/lsof >> DEBUG

/DEBUG shows that when (and only when) "Available to all users" has been selected for a wired connection, when umountroot runs dhclient is still running and has a dhcp lease file open for write; consequently umountroot fails. I'm attaching a copy of this DEBUG file. For wired connections with "Available to all users" unchecked, and for wireless connections, dhclient has gone away by the time umountroot runs and so there is no problem in those cases.

Revision history for this message
kapetr (kapetr) wrote :

Can confirm:

after unchecking "Available to all users" on my wired card:

- on shutdown/reboot is now no "mount: / is bussy" at the end
- on boot is now no "ext4-fs : fsck required" (which BTW in my case had end with no orphans in 9/10 cases)

Changed in network-manager (Ubuntu Precise):
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I'm unable to reproduce this. On all my systems NetworkManager shuts down cleanly and indeed doesn't stop dhclient, but that's "expected" behavior, since when you're turning NM off you may wish to retain wired connections, which happens to indeed be the case for users with mounted network shares.

Is there anything else that's special with your installation which could explain this being an issue?

Changed in network-manager (Ubuntu Precise):
status: Confirmed → Incomplete
Revision history for this message
sourchier (sourchier) wrote :

I am using ext2 as a /boot. Also I have a tmpfs mounted as:

tmpfs /tmp tmpfs nodev,nosuid 0 0

Other than that, everthing seems stock. I have installed/deinstalled alot of packages. But debsums seems to find no error. I just wish fsck would learn how to chill.

Revision history for this message
Steven Farmer (stevenleefarmer) wrote : Re: [Bug 963106] Re: NetworkManager causes orphaned inodes

The underlying problem is that, at system shutdown time, dhclient isn't
given the opportunity to gracefully exit, closing any files it has open.
This causes /etc/init.d/umountroot to fail. When umountroot fails, the
filesystem must be recovered.

There is, to the best of my knowledge, nothing particularly unusual with
the various installs of 12.04 that I've been testing, and the problem is
evident with all of them. One difference might be that I have the
splash screen turned off in grub and so can see the messages. Maybe
that explains why you're not seeing them.

At some point, possibly in oneiric, changes were made which put the
dhclient pid in /var/run/sendsigs.omit.d/ and I believe that's the basis
of the problem. And it IS a problem - the root filesystem should not
need recovery on every reboot. The "orphaned inodes" messages are just
icing on the cake. Do "sudo apt-get install --reinstall libc6" then
reboot, and run "dmesg | grep EXT" and you should see the messages.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

These changes were made on purpose in NetworkManager to avoid init killing dhclient before NetworkManager is shut down, which solves slowness at shutdown and also solves a long-time issue with mounted network shares at shutdown. NetworkManager also doesn't stop dhclient by itself on shutdown on purpose, since you may want to remain connected to a wired network despite stopping NetworkManager.

Revision history for this message
Steven Farmer (stevenleefarmer) wrote :

Yes, yes, I understand all of that, there is no need to continue
repeating it. Your motivations don't change the fact that, in trying to
fix one problem, you've created another. Your changes are causing
umountroot to FAIL at shutdown time.

Revision history for this message
sourchier (sourchier) wrote :

After installing a clean copy of ubuntu-12.04-beta2-dvd-amd64.iso--and applying updates--this bug is still there. I install ed in vmware. I used the same command as Steven Farmer to see the errors in dmseg.

Revision history for this message
Terry Newton (wtn90125) wrote :

On my test systems I fixed this bug by editing /etc/init.d/umountroot and adding...

/sbin/killall5 -15
sleep 2

...just before the part where it remounts the root fs RO. That tells the system to
ask all non-kernel tasks to clean up and exit. No idea if this is a "proper" fix
but on my installs it results in a clean shutdown and no recovery on restart.
Also not a NetworkManager file... but rather a generic way of dealing with the issue
of tasks still running when taking down the system. Would be better if it only
terminated tasks that actually have open files on the root FS.

Revision history for this message
camez (camez) wrote :

I found a solution. But it's bad idea.
I added the following line to /etc/rc0.d/S20sendsigs
 nmcli nm sleep true
Because nmcli needs Dbus, nmcli must call before killall.
This is to resolve this bug. But another problem occurs.
There is umountnfs after this.

Revision history for this message
Steve Langasek (vorlon) wrote :

I believe the right answer here is that NM should be reaping all of its dhclient helpers on shutdown, including those for wired interfaces. This is the only robust way to handle the system shutdown case, and it makes sense to me that this would be the expected behavior when shutting down NM any other time as well.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Oops, why is this still Incomplete? I've been working on a patch and it's pretty much ready now; so setting to In Progress until an upload to -proposed.

Changed in network-manager (Ubuntu Precise):
status: Incomplete → In Progress
description: updated
Revision history for this message
dino99 (9d9) wrote :

it seems that this issue reported here also affect me : https://bugs.launchpad.net/ubuntu/+source/linux/+bug/962113

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Steven, or anyone else affected,

Accepted network-manager into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in network-manager (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Steven Farmer (stevenleefarmer) wrote : Re: [Bug 963106] Re: NetworkManager causes orphaned inodes

After installing network-manager 0.9.4.0-0ubuntu4 from precise-proposed,
things are looking good. The root filesystem is clean on reboot even
after a reinstall of libc6. Many thanks to Mathieu!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package network-manager - 0.9.4.0-0ubuntu4

---------------
network-manager (0.9.4.0-0ubuntu4) precise-proposed; urgency=low

  * debian/patches/quit_dhclient_on_exit.patch: make sure we kill dhclient when
    we are stopping. (LP: #963106)
  * debian/patches/lp949743_ensure_remoteconnection_disconnects_494f0a2.patch:
    make sure NMRemoteConnection objects have their signals disconnected.
    (LP: #949743)
  * debian/patches/lp990011_use_tempaddr_sysctl_default.patch: *really* fix the
    use_tempaddr sysctl to properly be set to 2 on the wired interface.
    (LP: #990011)
 -- Mathieu Trudel-Lapierre <email address hidden> Fri, 27 Apr 2012 18:13:56 -0400

Changed in network-manager (Ubuntu):
status: In Progress → Fix Released
Changed in network-manager (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Daniel Eckl (daniel-eckl) wrote :

I fear I cannot verify this fix :(

I'm still suffering from this problem, using:
network-manager/precise uptodate 0.9.4.0-0ubuntu4

All the networkmanager stuff wants to terminate AFTER the umountroot script. I used "halt" to shutdown the sytem without poweroff and made a screenshot to show you (see attached umountroot_fail.jpg).

Please help, as I really fear for my file system... :-S

Revision history for this message
Daniel Eckl (daniel-eckl) wrote :

Additionally I let umountroot make a ps -ef and a lsof -nP just before trying to remount readonly. The output is attached, too (see safe.root.debug.txt)

Revision history for this message
Steven Farmer (stevenleefarmer) wrote :

Daniel,

I notice "/etc/rc6.d/S03umountroot stop" in your ps output. On my 12.04
installs I have S60umountroot in /etc/rc0.d and /etc/rc6.d. S03 sounds
awfully early to me.

Try "sudo mv /etc/rc6.d/S03umountroot /etc/rc6.d/S60umountroot" and then
do "sudo shutdown -H now" and see what happens.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Indeed, umountroot is supposed to be at 60; based on how we ship these scripts on a default install.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

umountroot must be at least lower than S35networking; which will emit "deconfiguring-networking": that's the stop condition for dbus, which is the stopping condition (stopping dbus) for network-manager. Only once NM is stopped can you safely run umountroot; otherwise the dhclient binaries would still be running.

Revision history for this message
Daniel Eckl (daniel-eckl) wrote :

Thank you so much Mathieu, that was a stunning catch. Something obviously shuffled my rc links around O.o

I once (months ago) had the problem that vmware player was changing the position of "halt" but seemingly it changed a lot more :(

Anyway: Obviously my problem is not this bug and I'm now sure this bug really is solved. I will now fix my script links... If anybody has an idea how I can easily reset them to their defaults, I would be very pleased. Using "update-rc.d -f <scriptname> remove" and then "... defaults" did not work, as it sets everything to "20" only.

Revision history for this message
Steven Farmer (stevenleefarmer) wrote :

Daniel, try:

$ sudo update-rc.d -f umountroot remove
$ sudo update-rc.d umountroot start 60 0 6 .

Note the period at the end of the 2nd command. And yes, my previous
suggestion of using mv won't work, you have to use update-rc.d, sorry.

When I used update-rc.d to put umountroot at 03 as you have, I see the
same symptoms you do. Using the above commands to put it back to 60
fixes the problem. Hope this helps, please let us know.

Revision history for this message
Daniel Eckl (daniel-eckl) wrote :

Thank you very much. Sadly it turned out that most of the sequence numbers are totally wrong. It's a wonder that still everything worked flawlessly except this unmounting...

I searched for a way to set all sequence numbers to their distribution default, but I failed to find such a way.

I now have a file list from another correct precise installation and I'm fixing all the links manually using update-rc.d just as you described. After I have fixed the vast majority, I will reboot and report back, if this fixed the initial problem, but this really will take some time...

Revision history for this message
Daniel Eckl (daniel-eckl) wrote :

After fixing all my init script symlinks, this problem is gone. Thank you all so much for your help.

Some background information for others who might have my problem:

Cause:
Installing Vmware Player broke all rc script links. I guess that happened already when still running ubuntu 11.10. See here: http://communities.vmware.com/message/1846324

Solution:
For every service with broken symlink I:
- deleted it using: update-rc.d -f <servicename> remove
- searched for the related package using: dpkg -S /etc/init.d/<servicename>
- reconfigured this package using: dpkg-reconfigure <packagename>

reconfiguration ran the postinstall script and recreated the now missing symlinks with correct sequence numbers

Revision history for this message
Steven Farmer (stevenleefarmer) wrote :

The perl script /usr/share/sysv-rc/saveconfig prints out the current
configuration as a series of update-rc.d commands. If you like, I can
send you a copy from a more-or-less vanilla 12.04 install. It can't be
completely vanilla without my doing a fresh install in a VM, and I won't
volunteer for that (I'm running non-pae hardware, and they've made 12.04
installs *very* aggravating). After logging in to launchpad, you should
be able to find my email address.

Revision history for this message
Steven Farmer (stevenleefarmer) wrote :

Oops, I sent my previous message before I saw yours saying you've fixed things. Congratulations, and thanks for sharing the method - I'll have to remember that.

Revision history for this message
tuhu (tuhubage) wrote :

I think I have a problem with this message also on shut down:

"mount: / is busy."

I don't remember when it started to appear. I just realized this messages yesterday. So, I google over looking for answer. I hope here is the right place to ask.

Several ways I have tried:
1. I have uninstalled network manager and and reinstalled libc6. (just like what Steven described on https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/952315 ). Still, no changes, the message still appears.
2. I have also tried:
    $ sudo update-rc.d -f umountroot remove
    $ sudo update-rc.d umountroot start 60 0 6 .

Also, no changes.

3. I have now network-manager_0.9.4.0-0ubuntu4.1_amd64.deb installed on my system, and the message still appears.

I don't really have idea about this, but here I attach my ps -f and losf -nP output. Hope there will any help.
I'm using Ubuntu 12.04 64bit.

Thanks.

Revision history for this message
Steven Farmer (stevenleefarmer) wrote :

Tuhu, your ps output shows quite a lot still running. Did you execute
the command from a terminal in the desktop environment? To be helpful,
the ps and lsof commands should be run from the /etc/init.d/umountroot
script. See message #5 above.

Before adding debug commands to umountroot, you might want to try
un-checking "Available to all users" for your active network connection.
If the "mount: / is busy" message is no longer present when you shut the
system down, then your problem might be related to this bug.

Either way, you'll probably want to proceed with getting some debug
print from umountroot. There was a typo in message #5, although I'm not
sure that it makes a difference in practice. The lsof command should
read:

/usr/bin/lsof >> /DEBUG

Be sure to make a backup copy of umountroot before editing it:

sudo cp -p /etc/init.d/umountroot ~

Revision history for this message
tuhu (tuhubage) wrote :

Thanks for the respond Steven,

Yes, I did execute it from a terminal in the desktop environment.

I have un-checked "Available to all users" for my active network connection, but, the "mount: / is busy" message still appears. So, I think my problem is not with the network manager.

So, as you suggested, I added:
/bin/ps > /DEBUG
/usr/bin/lsof >> /DEBUG
to /etc/init.d/umountroot before the 'mount -n -o remount,ro /' sequence. And you can see the out put in the attachment. This time, I input the 'ps -ef and losf -nP' command not from terminal but from tty1. Was that what you meant? Or how is it to reproduce the output you meant?

Revision history for this message
Steven Farmer (stevenleefarmer) wrote :

Tuhu, no, I wasn't asking that you run the commands from tty1.

Now that you've added the ps and lsof commands to the umountroot script,
it should create the text file '/DEBUG' when the system is shut down.

Please attach the file /DEBUG.

The error message "mount: / is busy" is being printed by the mount
command in the umountroot script. The /DEBUG file should show us what
files were still open just before that mount command is executed. It's
likely that a process still has a file open for write.

Also, have you ever installed VMware Player (see previous messages in
this bug report) or any non-ubuntu software which may have altered the
order in which your init scripts are run?

Revision history for this message
tuhu (tuhubage) wrote :

Here is the DEBUG file.

I have no VMware player installed on my system, the non-Ubuntu applications that are installed in my system are Oracle Virtualbox, remastersys, and nvidia proprietary driver. But, I remember, last time, I installed a dialer and driver for Huawei ec156 USB modem (provided in the modem). But, it was not work, the make process of the driver was failed. Thus, I deleted the installed directory of the dialer manually.

Revision history for this message
tuhu (tuhubage) wrote :

And, here is something. The message "mount: / is busy" does not appear each time I power off the system from tty1 while the lightdm is off.

Revision history for this message
Steven Farmer (stevenleefarmer) wrote :

The /DEBUG file shows that modem-manager is still running, and at line
114 you can see that the init process has /var/log/upstart/modemmanager
open for write. That explains the "mount: / is busy" message.

I would think that modem-manager should have exited before umountroot is
run. Looking at /etc/init.d/sendsigs, it appears that processes
associated with upstart jobs (like modemmanager) aren't killed, and I
see no facility there for waiting on them to exit.

I'm not an ubuntu developer, but if you care to try an experiment, you
could try adding a sync command to line 64 of /etc/init.d/sendsigs .
This is just before a comment that starts 'Upstart jobs have their own'
and a sequence of code that collects the pids of upstart jobs into a
list of pids to ignore (i.e. pids not to kill). If modem-manager or
init are waiting on i/o to complete, a sync here might give
modem-manager time to exit before it gets put into the OMITPIDS list.

If you decide to change sendsigs, be sure to make a backup copy first:

sudo cp -p /etc/init.d/sendsigs ~

Other than that, I don't have any new ideas. Let's hope that Mathieu or
another one of the powers-that-be will now jump in with some suggestions
as to how to proceed.

Revision history for this message
tuhu (tuhubage) wrote :

I have put a sync command on the line 64 of /etc/init.d/sendsigs, Steven. But, the message "mount: / is busy" still appears. Hope there will be some suggestion from the others then. Thank you for your suggestions so far.

Revision history for this message
Steven Farmer (stevenleefarmer) wrote :

Tuhu, if you type the following three commands into a terminal window
what is printed after each command?

sudo stop network-manager
initctl status modemmanager
ps p $(pgrep modem-manager) 2>/dev/null

The third command should print something only if modem-manager is still
running. It shouldn't be, but your /DEBUG file showed that it was and
that's part of the problem. You'll want to restart network-manager by
typing:

sudo start network-manager

What network devices are active on your computer whenever the problem
occurs? Any mobile broadband devices at all? Have you looked at the
log file /var/log/upstart/modemmanager.log to see if there are any error
messages or warnings there?

Bug #974187 reports modem-manager taking a very long time to shut
down. That bug is unresolved and due to expire soon due to lack of
activity. You might want to subscribe to that bug and add a "me too".

Revision history for this message
tuhu (tuhubage) wrote :

I could not open the file of /dev/null, where the output of 'ps p $(pgrep modem-manager) 2>/dev/null' went, the error on gedit: "Could not open the file /dev/null. /dev/null is not a regular file". But, when I piped it to Desktop, like: "ps p $(pgrep modem-manager) 2>/root/Desktop" , the output showed an error: "ERROR: List of process IDs must follow p. ********* simple selection ********* ********* selection by list ********* ... and.. so-on...".

The message "mount: / is busy" appears no matter my Huawei ec156 mobile broadband is attached or not. Or, when wireless network is active or not.

There is no error in /var/log/upstart/modemmanager.log, as you can see in the atachment.

Revision history for this message
Steven Farmer (stevenleefarmer) wrote :

You didn't answer my question in #42 above.

Type "man null" to learn how /dev/null works.

The ps command produced an error message. Assuming that it wasn't
mis-typed, that means that the modem-manager process wasn't running,
which is the correct result. That's also consistent with last line in
the modemmanager.log that you attached.

I suspect that your problem could be 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.

I've seen no evidence that your problem is a network-manager bug. If I
were you, I would open a new bug report using ubuntu-bug, probably
against upstart.

Revision history for this message
tuhu (tuhubage) wrote :

I have a mobile broadband device here. I have also removed "modemmanager " but the message still appears.
I'm thinking to open a new bug-report. Thanks.

Revision history for this message
Daniel Eckl (daniel-eckl) wrote :

For some reason, the main issue of this report now hit me. Root cannot be unmounted, because dhclient and dnsmasq is still running at this point (verified by running lsof in umountroot).

The order of my init scripts is still fine now, I have S35networking, S40umountfs and S60umountroot, so this is not the cause anymore.

Also when stopping networking manually, dhclient and dnsmasq are both still running.

I took the time to update to 12.10 (quantal), but still no change to this issue for me. My workaround is a "killall dnsmasq dhclient; sleep 2" in umountroot, but obviously, this doesn't even count as dirty hack, this is even more ugly.

Revision history for this message
John Clark (clarkjc) wrote :

I can confirm this bug. I have two systems running 12.10 and both experience this issue.

Killing dnsmasq and dhclient in the umountroot script results in a clean shutdown on both systems.

John Clark (clarkjc)
tags: added: quantal
Revision history for this message
Sébastien Escudier (esebastien) wrote :

I have this bug in 12.10 and Network manager version 0.9.6.0-0ubuntu7
/sbin/dhclient and /usr/sbin/dnsmasq are not stopped and / cannot be unmounted

Revision history for this message
Luigi R. (xluigi84) wrote :

This bug is still affecting quantal as reported by Sebastien. The workaround #5 works for me.

Revision history for this message
Daniel Eckl (daniel-eckl) wrote :

I fixed it for me in upstart, modifying /etc/init/network-manager.conf. Patch attached.

Revision history for this message
Daniel (skorka-b) wrote :

This bug also affects Quantal, but I don't know how to mark the bug for this.

Revision history for this message
djbmister (db260179) wrote :

umount-fix.patch:

Best if it is
cat /var/run/sendsigs.omit.d/network-manager.dhclient-*

As if you have multiple ETH, this will not kill it.

Revision history for this message
Marc MAURICE (dooblem) wrote :

I installed the Raring network-manager package (0.9.7.995+git201301311547.17123fc-0ubuntu1) in my Quantal install, and the bug seems gone.

Now I just have this displayed at shutdown :

nm-dispatcher.action: Caught signal 15, shutting down...
Rather than invoking init scripts through /etc/init.d, use the service utility ..........
... blabla...

But it's just a warning.

Revision history for this message
Sebastien (sebastien-devel) wrote :

Bug still present in kubuntu 13.04, network manager 0.9.8.0

Revision history for this message
Marc MAURICE (dooblem) wrote :

I upgraded to network manager 0.9.8.0, still staying in Quantal.

Bug still not present on my system.

@Sebastien : you should check the output of lsof (see comment #5).

Revision history for this message
John Clark (clarkjc) wrote :

I can confirm this problem still exists in 13.04 (raring). I'm using Daniel Eckl's patch in comment #49 to work around it, but I modified it to only kill dhclient. It appears that dnsmasq is being terminated properly in 13.04.

tags: added: raring
Revision history for this message
sourchier (sourchier) wrote :

I still have this bug too. Can't we get rid of NetworkManager if no one wants to fix it?

John Clark (clarkjc)
tags: added: saucy
Revision history for this message
Ivan Larionov (xeron-oskom) wrote :

This bug affects 14.04 as well and somehow tracked here https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1169614

2 years bug…

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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