dbus and launchd spinning out of control

Darren Weber dweber at macports.org
Sat Mar 28 15:38:40 PDT 2009


I'm not sure if there is a specific ticket on this already, but maybe this
one comes close:
http://trac.macports.org/ticket/18462

On my system, I have the following LaunchDeamon and LaunchAgent:

[ dweber at XXX ~ ]$ cat /Library/LaunchDaemons/org.macports.dbus.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "
http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Debug</key>
    <false/>
    <key>Label</key>
    <string>org.macports.dbus</string>
    <key>OnDemand</key>
    <false/>
    <key>ProgramArguments</key>
    <array>
        <string>/opt/local/bin/daemondo</string>
        <string>--label=dbus</string>
        <string>--start-cmd</string>
        <string>/opt/local/bin/dbus-daemon</string>
        <string>--system</string>
        <string>--nofork</string>
        <string>;</string>
        <string>--pid=exec</string>
    </array>
    <key>RunAtLoad</key>
    <false/>
</dict>
</plist>


[ dweber at XXX ~ ]$ cat
/Library/LaunchAgents/org.freedesktop.dbus-session.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "
http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>org.freedesktop.dbus-session</string>
    <key>ServiceIPC</key>
    <true/>
    <!-- bug in 10.4's launchd - on-demand loading does not work -->
    <key>OnDemand</key>
    <false />
    <key>ProgramArguments</key>
    <array>
        <string>/opt/local/bin/dbus-daemon</string>
        <string>--nofork</string>
        <string>--session</string>
    </array>
    <key>Sockets</key>
    <dict>
        <key>unix_domain_listener</key>
        <dict>
            <key>SecureSocketWithKey</key>
            <string>DBUS_LAUNCHD_SESSION_BUS_SOCKET</string>
        </dict>
    </dict>
</dict>
</plist>






On Sat, Mar 28, 2009 at 3:20 PM, Darren Weber <dweber at macports.org> wrote:

>
> I've only just noticed my Utilities -> Console log and it contains streams
> of the following messages:
>
> 3/28/09 3:11:03 PM org.macports.dbus[20573] 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
> 3/28/09 3:11:03 PM com.apple.launchd[1] (org.macports.dbus) Throttling
> respawn: Will start in 10 seconds
> 3/28/09 3:11:03 PM com.apple.launchd[1] (org.macports.dbus) Throttling
> respawn: Will start in 10 seconds
> 3/28/09 3:11:13 PM org.macports.dbus[20575] 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
> 3/28/09 3:11:13 PM com.apple.launchd[1] (org.macports.dbus) Throttling
> respawn: Will start in 10 seconds
> 3/28/09 3:11:13 PM com.apple.launchd[1] (org.macports.dbus) Throttling
> respawn: Will start in 10 seconds
> 3/28/09 3:11:23 PM org.macports.dbus[20579] 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
> 3/28/09 3:11:23 PM com.apple.launchd[1] (org.macports.dbus) Throttling
> respawn: Will start in 10 seconds
> 3/28/09 3:11:23 PM com.apple.launchd[1] (org.macports.dbus) Throttling
> respawn: Will start in 10 seconds
> 3/28/09 3:11:33 PM org.macports.dbus[20583] 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
> 3/28/09 3:11:33 PM com.apple.launchd[1] (org.macports.dbus) Throttling
> respawn: Will start in 10 seconds
>
>
> So every 10 sec, launchd is trying to get dbus up and running, but it fails
> because an old pid file is hanging around.  Can this be resolved
> automatically?  When I check the file, I get:
>
> [ dweber at XXXX ~ ]$ ls -l /opt/local/var/run/dbus/pid
> -rw-r--r-- 1 root messagebus 4 2008-09-19 21:05 /opt/local/var/run/dbus/pid
>
>
> Given the date of this pid file (Sep 2008), I can only assume that this
> entire process has been repeated every 10 seconds for months, whenever my
> laptop system is running.  I've now removed the old pid file and the launchd
> job has finally come to rest.
>
> I'm not a frequent checker of system logs, I just use the system and I
> guess most people are also unlikely to check the system logs (console).  I'm
> curious about why this situation arose and, moreover, why it was not
> automatically resolved (it clearly required my intervention to remove the
> old pid file).
>
> Take care, Darren
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20090328/402c0ae2/attachment.html>


More information about the macports-users mailing list