Comment 3 for bug 1334676

Revision history for this message
Christopher Lee (veebers) wrote :

I dug a little further into this issue and it isn't an issue with autopilot (or libautopilot-qt etc.).

What I've observed is that there is an extra dbus connection being created when an application is being launched that does nothing (i.e. is registered but that's it, doesn't respond to queries).
This means that when we attempt to query this connection to see if it's the one that we want we hang for ~25 seconds as we wait for the "Error: org.freedesktop.DBus.Error.NoReply" failure.

I've been able to observe this happening using these steps: http://pastebin.ubuntu.com/7709477/
(Note that all this is done using a mako device, not desktop)
In this example the app is launched without testability/autopilot support but we see the same behaviour if it is.

When I run these steps on image #95 I only get 2 connections for the app and querying both gives me a quick response.

I've logged with both dbus-monitor, using G_DBUS_DEBUG=all and QDBUS_DEBUG=1 with the launched application.
You can also see in this run [1] (this is the application log with QDBUS_DEBUG=1) that when I kill the app with Ctrl-C there are a bunch of assertion failure messages from dbus-connection.c.

Here are some other example logs, but I doubt they will be super useful.

http://paste.ubuntu.com/7709432/ (this is an app run with G_DBUS_DEBUG=all)
Connections for this run for this app pid were: :1.847, 1.848 & 1.849
The non responsive connection in this run is :1.849 but doesn't appear in this log.

http://paste.ubuntu.com/7709408/ (this is the output from dbus-monitor)
Connections were :1.746, :1.747 & :1.748 (the hanging one being :1.748)
On line 97 you can see the connection being registered.

To quote Martin Pitt:
"it's not gdbus/not qdbus, but libdbus directly, not doing anything on the connection except registering it, connection is dead, and these assertions from libdbus"

[1] http://paste.ubuntu.com/7709407/