[regression] GTK apps hang for a long time on start-up under Xmir (and less under native Mir) failing to find dbus

Bug #1604704 reported by Daniel van Vugt
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
New
Undecided
Unassigned
dbus (Ubuntu)
Confirmed
Medium
Unassigned
gtk+3.0 (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

$ /usr/games/sol

(sol:18808): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Failed to connect to socket /tmp/dbus-7diijTV1R5: Connection refused
GConf Error: No D-BUS daemon running

(sol:18808): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Failed to connect to socket /tmp/dbus-Zlu4hiB92O: Connection refused
GConf Error: No D-BUS daemon running

$ nautilus

(nautilus:18870): libunity-CRITICAL **: unity-launcher.vala:154: Unable to connect to session bus: Could not connect: Connection refused

(nautilus:18870): libunity-CRITICAL **: unity-launcher.vala:154: Unable to connect to session bus: Could not connect: Connection refused

(nautilus:18870): libunity-CRITICAL **: unity-launcher.vala:154: Unable to connect to session bus: Could not connect: Connection refused

(nautilus:18870): LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Could not connect: Connection refused

(nautilus:18870): LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Could not connect: Connection refused

(nautilus:18870): LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Could not connect: Connection refused

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It used to work immediately in xenial. Now in yakkety I get errors every time.

Only dbus-related apps are affected. Native X11/Mir apps start instantly.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I do have the daemons running. Only GTK apps can't find it....

message+ 2503 0.0 0.0 44676 5704 ? Ss 11:43 0:01 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
dan 10940 0.0 0.0 43664 4568 ? Ss 15:21 0:00 dbus-daemon --session --address=unix:abstract=/tmp/dbus-VcCjNiW11q

Interesting the sol errors show it's looking for the wrong unix: socket path.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Actually it's only really slow under Xmir. Native Mir gets the same errors but no delay...

Xmir:

$ /usr/games/sol

(sol:18808): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Failed to connect to socket /tmp/dbus-7diijTV1R5: Connection refused
GConf Error: No D-BUS daemon running

(sol:18808): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Failed to connect to socket /tmp/dbus-Zlu4hiB92O: Connection refused
GConf Error: No D-BUS daemon running

Mir:

$ /usr/games/sol

(sol:20759): Gtk-WARNING **: GtkSettings Cursor Theme: Unsupported GDK backend

(sol:20759): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
GConf Error: No D-BUS daemon running

(sol:20759): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
GConf Error: No D-BUS daemon running

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yep, the apps are just failing to detect the session bus address of the Unity8 login.

Workaround for Unity8:
1. Find the real address: ps auxw | grep 'dbus-daemon --session'
2. env DBUS_SESSION_BUS_ADDRESS=...

Workaround for native Mir demo shells that have no dbus:
None?

summary: - [regression] GTK apps hang for a very long time on start-up under Xmir
- and Mir failing to find dbus
+ [regression] GTK apps hang for a long time on start-up under Xmir (and
+ less under native Mir) failing to find dbus
Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for your bug report, could you get a backtrace of a process while hanging so we get an idea where it's blocked?

Changed in gtk+3.0 (Ubuntu):
status: New → Incomplete
importance: Undecided → Low
Changed in dbus (Ubuntu):
status: New → Incomplete
importance: Undecided → Low
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I'm just going to assume this is a duplicate of bug 1604872 until proven otherwise.

Revision history for this message
Sebastien Bacher (seb128) wrote :

that would be weird, are the binaries you are trying apparmor confined? we don't have many of those, starting a game for sure shouldn't hit that ... do you have apparmor denials in your syslog?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The yakkety fix for bug 1604872 has not solved this. So no longer a duplicate.

Changed in dbus (Ubuntu):
status: Incomplete → Confirmed
Changed in gtk+3.0 (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Download full text (6.4 KiB)

Confirmed in all cases it's just that the X11/Xmir apps can't detect the session bus address of the login (which is on a different TTY BTW). Forcing DBUS_SESSION_BUS_ADDRESS solves the problem.

Here are some stack traces of the hangs:

gedit:
(gdb) bt
#0 0x00007ffff705e853 in select () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007ffff477acd1 in g_spawn_sync ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007ffff477b313 in g_spawn_command_line_sync ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007ffff7862b70 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4 0x00007ffff78645f2 in g_dbus_address_get_for_bus_sync ()
   from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#5 0x00007ffff786f7ee in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#6 0x00007ffff787522b in g_bus_get_sync ()
   from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#7 0x00007ffff784b969 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#8 0x00007ffff78488f3 in g_application_register ()
   from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#9 0x00007ffff784918f in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#10 0x00007ffff78494f2 in g_application_run ()
   from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#11 0x0000000000400cfa in main ()

nautilus:
(gdb) bt
#0 0x00007ffff34c9833 in __select_nocancel ()
    at ../sysdeps/unix/syscall-template.S:84
#1 0x00007ffff418ecd1 in g_spawn_sync ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007ffff418f313 in g_spawn_command_line_sync ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007ffff4729b70 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4 0x00007ffff472b5f2 in g_dbus_address_get_for_bus_sync ()
   from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#5 0x00007ffff47367ee in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#6 0x00007ffff473c22b in g_bus_get_sync ()
   from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#7 0x00007ffff4712969 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#8 0x00007ffff470f8f3 in g_application_register ()
   from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#9 0x000000000042c78e in ?? ()
#10 0x00007fffedd29e40 in ffi_call_unix64 ()
   from /usr/lib/x86_64-linux-gnu/libffi.so.6
#11 0x00007fffedd298ab in ffi_call ()
   from /usr/lib/x86_64-linux-gnu/libffi.so.6
#12 0x00007ffff441fcf5 in g_cclosure_marshal_generic_va ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#13 0x00007ffff441f1d4 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#14 0x00007ffff44394b8 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007ffff443a08f in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007ffff4710168 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#17 0x00007ffff47104f2 in g_application_run ()
   from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#18 0x000000000042ba31 in ?? ()
#19 0x00007ffff33ed7e0 in __libc_start_main (main=0x42b970, argc=1,
    argv=0x7fffffffe5b8, init=<optimised out>, fini=<optimised out>,
    rtld_fini=<optimised out>, stack_end=0x7fffffffe5a8)
    at ../csu/libc-start.c:291
#20 0x000000000042ba99 in ?? ()

/u...

Read more...

Changed in dbus (Ubuntu):
importance: Low → Medium
Changed in gtk+3.0 (Ubuntu):
importance: Low → Medium
tags: added: unity8-desktop
tags: added: xmir
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.