dbus @1.2.12_5 apparent regression, can't "launchctl load"

Jim DeLaHunt from.macports at jdlh.com
Wed May 20 20:50:08 PDT 2009


Hi, MacPorts folks:

Thanks to all of you for producing all this great software that I'm 
taking advantage of.

I'm a gnucash user on Mac OS X. Yesterday I experienced a regression. 
GnuCash started giving an error message on launch, complaining that 
it couldn't get configuration information. I think the problem lies 
with what looks like a regression in MacPorts' dbus @1.2.12_5.  I 
worked around the problem by activating dbus @1.2.12_4 instead.

Could someone please review my diagnosis, and either pass it on to 
the dbus maintainers, or correct me if I'm mistaken?


=====
Diagnosis

Here's a summary of a command-line session which persuades me that 
MacPorts' dbus @1.2.12_5 is not working, causing gnucash to fail to 
get its configuration, and that rolling back to dbus @1.2.12_4 is a 
suitable fix. My comments are marked with "[JDLH: ...]".


% launchctl load /Library/LaunchAgents/org.freedesktop.dbus-session.plist
nothing found to load
% ps auxwww | grep dbus
jdlh       365   0.0  0.0   599780    392 s000  R+    6:21PM 
0:00.00 grep dbus

[JDLH: "nothing found to load" looks like a sign of the problem with 
dbus. The lack of a dbus-daemon process is also a sign. When these 
signs happen, gnucash also fails to get its configuration 
information.]

% sudo port uninstall dbus
Password:
--->  The following versions of dbus are currently installed:
--->  	dbus @1.2.12_4
--->  	dbus @1.2.12_5 (active)
Error: port uninstall failed: Registry error: Please specify the full 
version as recorded in the port registry.

% sudo port deactivate dbus @1.2.12_5
--->  Deactivating dbus @1.2.12_5
% sudo port activate dbus @1.2.12_4
--->  Activating dbus @1.2.12_4

[JDLH: now we're using _4 revision of dbus, which works]

% launchctl load /Library/LaunchAgents/org.freedesktop.dbus-session.plist
% ps auxwww | grep dbus
jdlh       454   0.0  0.0   599780    460 s000  R+    6:34PM 
0:00.00 grep dbus
jdlh       452   0.0  0.0   600140    620   ??  S     6:34PM 
0:00.01 /opt/local/bin/dbus-daemon --nofork --session

[JDLH: launchctl load runs with no "nothing found to load" message, 
and afterwards there is a dbus-daemon process. I think this is a sign 
of a good situation.]

[Macintosh-4:~] jdlh% sudo port -v deactivate dbus @1.2.12_4
--->  Deactivating dbus @1.2.12_4
[Macintosh-4:~] jdlh% sudo port -v activate dbus @1.2.12_5
--->  Activating dbus @1.2.12_5

[JDLH: Now we're back to the _5 revision of dbus. Verify the problem 
happens again.]

% launchctl unload /Library/LaunchAgents/org.freedesktop.dbus-session.plist
% ps auxwww | grep dbus
jdlh     10833   0.0  0.0   599780    404 s000  R+    6:54PM 
0:00.00 grep dbus
% launchctl load /Library/LaunchAgents/org.freedesktop.dbus-session.plist
nothing found to load
% ps auxwww | grep dbus                                     jdlh 
10842   0.0  0.0   599780    392 s000  R+    6:55PM   0:00.00 grep 
dbus

[JDLH: "nothing found to load " message shows problem now occurs again.]


=====
Environment

MacBook Pro, intel architecture

% sw_vers
ProductName:	Mac OS X
ProductVersion:	10.5.7
BuildVersion:	9J61
% uname -a
Darwin Macintosh-4.local 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar 
31 22:52:17 PDT 2009; root:xnu-1228.12.14~1/RELEASE_I386 i386

% port info -v dbus
dbus @1.2.12, Revision 5 (devel)
Variants:    darwin_7, no_root, no_startupitem, test, universal

% port info -v gnucash
gnucash @2.2.9, Revision 2 (gnome, x11)
Variants:    (+)no_x11, universal, without_hbci, without_ofx, without_quotes


=====
Workaround

(This isn't for you macports experts, it's for the poor schmoes who 
are searching the web for some help with this symptom, and find this 
message.)

Here's the steps I think a MacPorts gnucash user can take to work 
around the dbus problem, and verify that it worked.

% sudo port deactivate dbus @1.2.12_5
--->  Deactivating dbus @1.2.12_5
% sudo port activate dbus @1.2.12_4
--->  Activating dbus @1.2.12_4
% launchctl load /Library/LaunchAgents/org.freedesktop.dbus-session.plist
[Macintosh-4:~] jdlh% ps auxwww | grep dbus 
jdlh     10877   0.0  0.0   599780    392 s000  R+    6:57PM 
0:00.00 grep dbus
jdlh     10875   0.0  0.0   600140    620   ??  S     6:57PM 
0:00.01 /opt/local/bin/dbus-daemon --nofork --session

[JDLH: when launchctl... command runs with no error message, and the 
ps.... command has a line with dbus-daemon, then gnucash should be 
able to get its configuration.]

I hope this report is useful.
-- 
     --Jim DeLaHunt, jdlh at jdlh.com     http://blog.jdlh.com/ (http://jdlh.com/)
       multilingual websites consultant

       157-2906 West Broadway, Vancouver BC V6K 2G8, Canada
          Canada mobile +1-604-376-8953


More information about the macports-users mailing list