D-Bus is killing me

Mystilleef mystilleef at gmail.com
Sun Dec 17 09:26:02 PST 2006


D-Bus is killing me. I'm this close to throwing my monitor through the
window. D-Bus accounts for almost all the hideous and latent
bugs I've ever had the displeasure of dealing with. In addition, it's
giving me and my application a bad rep. I present three suicidal
frustrations I have with D-Bus, the Python binding in particular.

1). Doesn't like Python 2.5 and I don't know why.

A few months ago, I tested my application with Python 2.5 but it won't
run because of D-Bus. The error message was cryptic. So I couldn't
figure out what was wrong. Today, a user using Python 2.5 is reporting
the same problem. The error is as follows:
------------------------------------------------------------------------
Exception exceptions.AttributeError: "'exceptions.TypeError' object
has no attribute '__module__'" in
'dbus_bindings._GIL_safe_cmessage_function_handler' ignored
Did not receive a reply. Possible causes include: the remote
application did not send a reply, the message bus security policy
blocked the reply, the reply timeout expired, or the network
connection was broken.
Introspect error: Did not receive a reply. Possible causes include:
the remote application did not send a reply, the message bus security
policy blocked the reply, the reply timeout expired, or the network
connection was broken.
------------------------------------------------------------------------
The entertaining thing about D-Bus's error messages is that you never
whether the problem stems from D-Bus or the application using it. Has
anyone had any luck with Python 2.5 and dbus-python? What's worse is
that when distros start migrating to Python 2.5, my application will be
broken.

2). Doesn't like Root and I don't know why.

My application won't run as root because of D-Bus. I get this cryptic
error message everytime I attempt to run it as root:
------------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/bin/scribes", line 40, in ?
    main(argv[1:])
  File "/usr/lib/python2.4/site-packages/SCRIBES/dbusmain.py", line 53, in main
    from info import dbus_iface
  File "/usr/lib/python2.4/site-packages/SCRIBES/info.py", line 32, in ?
    session_bus = SessionBus()
  File "//usr/lib/python2.4/site-packages/dbus/_dbus.py", line 266, in __new__
    return Bus.__new__(cls, Bus.TYPE_SESSION, use_default_mainloop, private)
  File "//usr/lib/python2.4/site-packages/dbus/_dbus.py", line 99, in __new__
    bus._connection = dbus_bindings.bus_get(bus_type, private)
  File "dbus_bindings.pyx", line 1692, in dbus_bindings.bus_get
dbus_bindings.DBusException: Did not receive a reply. Possible causes
include: the remote application did not send a reply, the message bus
security policy blocked the reply, the reply timeout expired, or the
network connection was broken.
------------------------------------------------------------------------
Can someone enlighten this n00b as to what that means, or what I'm
doing wrong?

3). D-Bus Isn't re-entrant.

Because D-Bus isn't re-entrant, I have to split my application into
a client-server model. The server exposes public methods and signals,
while the client calls them. This means my application has to maintain
two processes. Needless to say it's a pain in the rear to maintain.
D-Bus randomly throws exceptions with mysterious error messages similar
to the aforementioned ones. As a result, my D-Bus code is littered with
ugly and needless exception handlers. Not to mention random crashes and
bugs I can't reproduce or debug.

I have more issues with D-Bus, but these are the ones responsible for
my psychiatric appointments. So, I'd like to know if the maintainers are
aware of these issues. Or if the problems are a result of my ignorance.
Should I file a bug report? Any help is appreciated. My experience with
D-Bus has only been via the Python bindings. So perhaps my gripes are
related only to the Python bindings.

Thanks

D-Bus Version:
==============
dbus-1.0.2
dbus-glib-0.72
dbus-python-0.71


More information about the dbus mailing list