Dbus fails to (re)start if `/var/run/dbus/` is present

Bug #786221 reported by Peter Wu
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
dbus (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: dbus

After stopping dbus with `sudo stop dbus`, the directory `/var/run/dbus` and its contents are still present. The next time DBus is started using `sudo start dbus`, the pid file (and socket?) is outdated. This causes issues with NetworkManager.

Version:
Kubuntu 11.04 Natty 64 bits installed from Kubuntu 11.04 Natty Alternate CD
0.8.4~git.20110319t175609.d14809b-0ubuntu3

Tags: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in dbus (Ubuntu):
status: New → Confirmed
Revision history for this message
Ivan Angelov (ivangeloff) wrote :

As I commented to bug #521407 (which was the bug I initially thought I was experiencing), one workaround might be deleting the whole directory '/var/run/dbus/' before starting the dbus daemon (see the attachedment).

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Removing /var/run/dbus during boot, before starting up the dbus daemon." of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Ivan Angelov (ivangeloff) wrote :

While the patch in comment #2 is a workaround for the dbus daemon, it does not solve the underlying problem, which seems to be caused by the migration from /var/run, /var/lock and /dev/shm to /run, /run/lock and /run/shm, respectively. (Check out the OneiricOcelot release notes here -- https://wiki.ubuntu.com/OneiricOcelot/ReleaseNotes?action=show&redirect=OneiricOcelot%2FTechnicalOverview.)

Moving the contents of /var/run and /var/lock to /run and /run/lock and symlinking /var/run -> /run and /var/lock -> /run/lock, as suggested in comment #40 to bug #856810 seems to fix the problem (along with a bunch of other problems). Thus, the patch in comment #2 is not necessary.

Revision history for this message
Peter Wu (lekensteyn) wrote :

Ivan, that assumes that the issue only applies to DBUs when starting at boot time, but it also occurs if DBus is quit after boot, and restarted afterwards.

Revision history for this message
Ivan Angelov (ivangeloff) wrote :

True. In that case my patch of /etc/init/dbus.conf will do the job, as long as DBus has been (re)started using the upstart utility. However, if DBus is quit after boot (e.g. while Xorg server is up and running), other things will break, for instance Xorg. At least in my case it breaks, not sure whether it is supposed to or that is yet another bug.

Revision history for this message
Peter Wu (lekensteyn) wrote :

That's how I initially discovered this bug ;) The issues with the display manager can be solved by restarting the X server. But when the X server crashes (or SAK (Alt+SysRq+K) is issued), DBus seems to be gone too which breaks network manager among some others (battery status IIRC)

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.