#15081 closed defect (fixed)
dbus failure to start after crash
Reported by: | ld-temp-q6x8@… | Owned by: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.6.0 |
Keywords: | Cc: | rhwood@…, olaf@…, akimd (Akim Demaille), drkp (Dan Ports), nicos_pavlov@…, cooljeanius (Eric Gallager) | |
Port: | dbus |
Description (last modified by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez))
There is already a ticket (#14163) related to this issue, but it hasn't been updated in 2 months and I can't figure out how to annotate it. After a forced reboot, dbus doesn't automatically restart because the PID file, /opt/local/var/run/dbus/pid, doesn't get deleted. Since dbus is running as a launchd job, this file isn't needed and shouldn't exist. The launchd item itself and the system.conf files also need to be changed. There's no need for the dbus.wrapper script, which seems to be a relic of pre-launchd times. dbus-daemon should be called directly from org.macports.dbus.plist, and the lines in system.conf that cause it to drop privileges, fork into the background, and write a PID file should be removed. I'll try to attach proposed replacements for org.macports.dbus.plist and system.conf to this ticket. Thanks.
Attachments (2)
Change History (22)
Changed 16 years ago by ld-temp-q6x8@…
comment:2 follow-up: 3 Changed 16 years ago by rhwood@…
You may want to engage the upstream dbus developers since they are almost all linux developers and launchd is unique to the Mac OS X.
comment:3 Changed 16 years ago by vaulse@…
Replying to rhwood@macports.org:
You may want to engage the upstream dbus developers since they are almost all linux developers and launchd is unique to the Mac OS X.
For that very reason, why would they care? I'm proposing to change the launchd item, which is Mac-specific, and the config file in a Mac-specific way. Only a few lines need to be changed. I've been running dbus this way for months and it works fine.
comment:4 Changed 16 years ago by blb@…
Milestone: | → Port Bugs |
---|
comment:5 Changed 16 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Description: | modified (diff) |
---|---|
Owner: | changed from macports-tickets@… to mcalhoun@… |
comment:7 Changed 16 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Resolution: | → fixed |
---|---|
Status: | new → closed |
This should be fixed in r49300.
Please let me know if there are any problems.
comment:8 follow-up: 9 Changed 15 years ago by (none)
Milestone: | Port Bugs |
---|
Milestone Port Bugs deleted
comment:9 Changed 15 years ago by akimd (Akim Demaille)
Hi all,
I still have the same problem. My system logs are filled with
04/09/09 10:28:56 org.freedesktop.dbus-system[63015] Failed to start message bus: The pid file "/opt/local/var/run/dbus/pid" exists, if the message bus is not running, remove this file 04/09/09 10:28:56 com.apple.launchd[1] (org.freedesktop.dbus-system[63015]) Exited with exit code: 1 04/09/09 10:28:56 com.apple.launchd[1] (org.freedesktop.dbus-system[63015]) Exited with exit code: 1 04/09/09 10:28:56 com.apple.launchd[1] (org.freedesktop.dbus-system) Throttling respawn: Will start in 10 seconds 04/09/09 10:29:06 org.freedesktop.dbus-system[63019] Failed to start message bus: The pid file "/opt/local/var/run/dbus/pid" exists, if the message bus is not running, remove this file 04/09/09 10:29:06 org.freedesktop.dbus-system[63019] Failed to start message bus: The pid file "/opt/local/var/run/dbus/pid" exists, if the message bus is not running, remove this file 04/09/09 10:29:06 com.apple.launchd[1] (org.freedesktop.dbus-system[63019]) Exited with exit code: 1 04/09/09 10:29:06 com.apple.launchd[1] (org.freedesktop.dbus-system) Throttling respawn: Will start in 10 seconds 04/09/09 10:29:16 org.freedesktop.dbus-system[63021] Failed to start message bus: The pid file "/opt/local/var/run/dbus/pid" exists, if the message bus is not running, remove this file 04/09/09 10:29:16 org.freedesktop.dbus-system[63021] Failed to start message bus: The pid file "/opt/local/var/run/dbus/pid" exists, if the message bus is not running, remove this file 04/09/09 10:29:16 com.apple.launchd[1] (org.freedesktop.dbus-system[63021]) Exited with exit code: 1 04/09/09 10:29:16 com.apple.launchd[1] (org.freedesktop.dbus-system) Throttling respawn: Will start in 10 seconds 04/09/09 10:29:26 org.freedesktop.dbus-system[63022] Failed to start message bus: The pid file "/opt/local/var/run/dbus/pid" exists, if the message bus is not running, remove this file 04/09/09 10:29:26 org.freedesktop.dbus-system[63022] Failed to start message bus: The pid file "/opt/local/var/run/dbus/pid" exists, if the message bus is not running, remove this file 04/09/09 10:29:26 com.apple.launchd[1] (org.freedesktop.dbus-system[63022]) Exited with exit code: 1 04/09/09 10:29:26 com.apple.launchd[1] (org.freedesktop.dbus-system) Throttling respawn: Will start in 10 seconds 04/09/09 10:29:36 org.freedesktop.dbus-system[63024] Failed to start message bus: The pid file "/opt/local/var/run/dbus/pid" exists, if the message bus is not running, remove this file 04/09/09 10:29:36 com.apple.launchd[1] (org.freedesktop.dbus-system[63024]) Exited with exit code: 1 04/09/09 10:29:36 com.apple.launchd[1] (org.freedesktop.dbus-system) Throttling respawn: Will start in 10 seconds 04/09/09 10:29:36 com.apple.launchd[1] (org.freedesktop.dbus-system) Throttling respawn: Will start in 10 seconds 04/09/09 10:29:46 org.freedesktop.dbus-system[63026] Failed to start message bus: The pid file "/opt/local/var/run/dbus/pid" exists, if the message bus is not running, remove this file 04/09/09 10:29:46 com.apple.launchd[1] (org.freedesktop.dbus-system[63026]) Exited with exit code: 1
Once I removed the file, everything is fine.
I'm using
dbus @1.2.14 (devel) Variants: darwin_7, no_root, no_startupitem, test, universal Description: A message bus system, a simple way for applications to talk to one another. Homepage: http://www.freedesktop.org/Software/dbus Build Dependencies: pkgconfig, autoconf, automake, libtool Library Dependencies: expat Platforms: darwin License: unknown Maintainers: mcalhoun@macports.org, openmaintainer@macports.org
Thanks!
comment:11 Changed 15 years ago by mf2k (Frank Schima)
Port: | dbus added |
---|
comment:13 Changed 15 years ago by drkp (Dan Ports)
I'm running into exactly the same problem with dbus @1.2.16_1:
2010/01/17 03:21:30 org.freedesktop.dbus-system[14253] Failed to start message bus: The pid file "/opt/local/var/run/dbus/pid" exists, if the message bus is not running, remove this file 2010/01/17 03:21:30 com.apple.launchd[1] (org.freedesktop.dbus-system[14253]) Exited with exit code: 1 2010/01/17 03:21:30 com.apple.launchd[1] (org.freedesktop.dbus-system) Throttling respawn: Will start in 10 seconds
I don't quite follow exactly what changed in r49300 that was supposed to fix this.
It seems to me that (as noted above) the pid file isn't necessary under launchd and so it can be disabled by removing the <pidfile> line in /opt/local/etc/dbus-1/system.conf. Indeed, removing this line does get the system bus running again. (Unfortunately, that's not the only problem I'm having with dbus.)
comment:14 follow-up: 15 Changed 15 years ago by drkp (Dan Ports)
I tried to mark this ticket as reopened but didn't have access. It sounds like this problem still exists, and I think it's a pretty important one: some other things fail in pretty mysterious ways if dbus isn't working (see many tickets about gnucash).
I think the best way to deal with this -- and the one I am successfully using now -- is to add --without-system-pid-file to configure.args.
comment:15 Changed 15 years ago by drkp (Dan Ports)
Replying to dports@…:
I think the best way to deal with this -- and the one I am successfully using now -- is to add --without-system-pid-file to configure.args.
Uh, I spoke too soon. Although configure claims to accept --without-system-pid-file, if you use it, it actually uses /no (!) as the pidfile instead of /opt/local/var/run/dbus/pid.
OK, I guess the solution is to remove the <pidfile> line from dbus-1/system.conf. Unfortunately, this file is autogenerated so it'll need to be patched in the post-configure or post-build stage rather than using a simple patchfile. I'll create a portfile patch for this.
Changed 15 years ago by drkp (Dan Ports)
Attachment: | patch-bus_system.conf.in.diff added |
---|
patchfile to stop pidfile creation
comment:16 follow-up: 19 Changed 15 years ago by drkp (Dan Ports)
Attached a patchfile to system.conf.in that causes it to not create a pidfile.
comment:17 Changed 15 years ago by jmroot (Joshua Root)
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:19 Changed 14 years ago by adfernandes (Andrew Fernandes)
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
dbus config files