Andy, Colin, can you please revert the workaround in
/lib/systemd/system/NetworkManager.service (remove After=dbus.service),
and instead append these lines in /lib/systemd/system/dbus.service, to
the [Service] section:

ExecStop=/bin/true
KillMode=none

This makes things work in my tests, and is a better fix IMHO. But I'd
like to confirm that this works for you too. Thanks!

Background:

I discussed that with with Michael Biebl. D-Bus is really hairy as you
get into circular dependencies very easily (with e. g. /var or /usr on
NFS), so making it start earlier could miss out some important remote
mounts. What we *really* want is to say "stop D-Bus after all D-Bus
clients", thus synthesize After=dbus.service to all Type=dbus services.
At the moment this only implies After=dbus.socket, but restarting dbus
after you already shut it down isn't working as dbus cannot save/restore
its state. At this state of the release cycle I don't have the guts to
completely rearchitect this.

Also, stopping D-Bus in a running system isn't something which we ever
supported; to the contrary, we patched several packages to avoid
restarting/stopping D-Bus in postinsts, as stopping d-bus in a running
system is shooting yourself into the foot (independent of which init
system you use). Thus leaving D-Bus running until the bitter end should
be fine, it doesn't have any file system things to do on shutdown. This
also approximates the brave new kdbus world where d-bus is basically
"always available".

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to dbus in Ubuntu.
https://bugs.launchpad.net/bugs/1438612

Title:
  remote file systems hang on shutdown, D-BUS stops too early

Status in dbus package in Ubuntu:
  Confirmed

Bug description:
  (part of bug 1431774). During shutdown, D-Bus stops too early. In
  particular, it stops before NetworkManager and remote-fs.target,  so
  that any network unmount  will cause errors and hang the boot. This
  can be seen with

  $ journalctl -b -1 | egrep 'Stop.*(D-Bus|Network M|Remote F)'
  Mär 30 19:05:19 donald systemd[1]: Stopping D-Bus System Message Bus...
  Mär 30 19:05:19 donald systemd[1]: Stopped D-Bus System Message Bus.
  Mär 30 19:05:19 donald systemd[1]: Stopped target Remote File Systems.
  Mär 30 19:05:19 donald systemd[1]: Stopping Remote File Systems.
  Mär 30 19:05:19 donald systemd[1]: Stopped target Remote File Systems (Pre).
  Mär 30 19:05:19 donald systemd[1]: Stopping Remote File Systems (Pre).
  Mär 30 19:05:19 donald systemd[1]: Stopping Network Manager...
  Mär 30 19:05:42 donald systemd[1]: Stopped Network Manager.
  Mär 30 19:05:42 donald systemd[1]: Stopping D-Bus System Message Bus Socket.

  A quick workaround is to add After=dbus.service to
  /lib/systemd/system/NetworkManager.service's [Unit] section, but this
  should be fixed in a more general fashion.

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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to