Comment 9 for bug 913991

Revision history for this message
In , Barry Warsaw (barry) wrote :

Hi Jason.

Based on your suggestion of DBUS_FATAL_WARNINGS, and some more testing
on Ubuntu 12.04, I'm starting to think this is a dbus-launch related bug.

Start by instrumenting run-test.sh to print out $PYTHONPATH, then export that
into your shell, and also export DBUS_TOP_BUILDDIR and DBUS_TOP_SRCDIR as
required by test-service.py. Now, in that shell do this from
$DBUS_TOP_SRCDIR:

DBUS_FATAL_WARNINGS=1 dbus-daemon --config-file test/tmp-session-bus.conf --print-address

In a different shell, start up Python with DBUS_SESSION_BUS_ADDRESS exported
as appropriate, then in Python do this:

>>> import dbus
>>> sb = dbus.SessionBus()
>>> p = sb.get_object('org.freedesktop.DBus.TestSuitePythonService', '/org/freedesktop/DBus/TestSuitePythonObject')

you'll get a proxy object which you can poke at, and d-feet shows that your
service is all up and running just fine. It does not matter whether
DBUS_FATAL_WARNINGS is set for this process. IOW, with the service started
with dbus-daemon directly, everything is fine.

Now, kill dbus-daemon and start the service instead with dbus-launch:

DBUS_FATAL_WARNINGS=1 dbus-launch --config-file test/tmp-session-bus.conf --sh-syntax

In the other shell, fire up Python with the new DBUS_SESSION_BUS_ADDRESS and
you'll see that as soon as you try to get the proxy object, you'll receive the
SIGABRT:

>>> p = sb.get_object('org.freedesktop.DBus.TestSuitePythonService', '/org/freedesktop/DBus/TestSuitePythonObject')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "dbus/bus.py", line 244, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "dbus/proxies.py", line 246, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "dbus/bus.py", line 183, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "dbus/bus.py", line 281, in start_service_by_name
    'su', (bus_name, flags)))
  File "dbus/connection.py", line 630, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildSignaled: Process /bin/bash received signal 6

The process described by DBUS_SESSION_BUS_PID is still running, so kill it.
Unfortunately, once dbus-launch exits, I don't get any verbose output, so I
have no idea why the service is getting aborted. It doesn't appear that
DBUS_VERBOSE is getting exported to dbus-launch's child, or maybe it is and
verbose output is getting thrown away.

As you might guess, starting dbus-launch with DBUS_FATAL_WARNINGS=0 lets
everything work. I need to try to coax more information out of dbus-launch to
continue.

On Dec 21, 2011, at 12:58 PM, <email address hidden> wrote:

>https://bugs.freedesktop.org/show_bug.cgi?id=43303
>
>--- Comment #6 from Jason Conti <email address hidden> 2011-12-21 12:58:54 UTC ---
>Barry, comment out the DBUS_FATAL_WARNINGS=1 line in test/run-test.sh.