Results of small investigation.
This bug caused by deadlock deep inside X/XCB library.
1. Lightdm wants to close a greeter and sends SIGTERM to it.
2. Greeter catches that signal and calls gtk_main_quit() to stop main gtk loop.
3. There is a gdk_flush() call inside gtk_main → it calls gdk_display_sync() → XSync() → deadlock.
4. Greeter hangs.
0x00007f62c335f4ed in poll () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007f62c335f4ed in poll () from /usr/lib/libc.so.6
#1 0x00007f62c30689f2 in ?? () from /usr/lib/libxcb.so.1
#2 0x00007f62c306a2ff in ?? () from /usr/lib/libxcb.so.1
#3 0x00007f62c306a411 in xcb_wait_for_reply () from /usr/lib/libxcb.so.1
#4 0x00007f62c59bf727 in _XReply () from /usr/lib/libX11.so.6
#5 0x00007f62c59bb11d in XSync () from /usr/lib/libX11.so.6
#6 0x00007f62c4bbd13c in gdk_flush () from /usr/lib/libgdk-3.so.0
#7 0x00007f62c507069f in gtk_main () from /usr/lib/libgtk-3.so.0
#8 0x000000000040cdcc in main ()
Any call to XSync() after SIGTERM leads to deadlock.
This issue appeared after upgrading Gtk from 3.15.1 to 3.15.2.
I'm not familiar with all this X stuff, so I don't have real solution.
The simplest workaround - exit() in SIGTERM handler.
Results of small investigation.
This bug caused by deadlock deep inside X/XCB library.
1. Lightdm wants to close a greeter and sends SIGTERM to it.
2. Greeter catches that signal and calls gtk_main_quit() to stop main gtk loop.
3. There is a gdk_flush() call inside gtk_main → it calls gdk_display_sync() → XSync() → deadlock.
4. Greeter hangs.
0x00007f62c335f4ed in poll () from /usr/lib/libc.so.6 libxcb. so.1 libxcb. so.1 libxcb. so.1 libX11. so.6 libX11. so.6 libgdk- 3.so.0 libgtk- 3.so.0
(gdb) bt
#0 0x00007f62c335f4ed in poll () from /usr/lib/libc.so.6
#1 0x00007f62c30689f2 in ?? () from /usr/lib/
#2 0x00007f62c306a2ff in ?? () from /usr/lib/
#3 0x00007f62c306a411 in xcb_wait_for_reply () from /usr/lib/
#4 0x00007f62c59bf727 in _XReply () from /usr/lib/
#5 0x00007f62c59bb11d in XSync () from /usr/lib/
#6 0x00007f62c4bbd13c in gdk_flush () from /usr/lib/
#7 0x00007f62c507069f in gtk_main () from /usr/lib/
#8 0x000000000040cdcc in main ()
Any call to XSync() after SIGTERM leads to deadlock.
This issue appeared after upgrading Gtk from 3.15.1 to 3.15.2.
I'm not familiar with all this X stuff, so I don't have real solution.
The simplest workaround - exit() in SIGTERM handler.