Xpra: Ticket #2025: client hangs handling popup window

Running the commented out example from r20917 then stopping it with a control-c can hang the client (fedora 29 + gnome shell), most of the time... and enabling -d all makes the crash disappear.

The window that's causing this hang is:

process_new_common: [22, 0, 0, 52, 12, \
    {'xid': '0xe0001c', 'title': 'min=(50, 10) - max=(50, 10)', 'client-machine': 'desktop', \
     'pid': 31727, 'group-leader-xid': 14680065, 'window-type': ('NORMAL',), 'override-redirect': True}], \
    metadata={'window-type': ('NORMAL',), 'xid': '0xe0001c', 'title': 'min=(50, 10) - max=(50, 10)', \
    'override-redirect': True, 'client-machine': 'desktop', 'pid': 31727, 'group-leader-xid': 14680065}, OR=True


Sat, 03 Nov 2018 08:52:00 GMT - Antoine Martin: status changed

Looks like this is clipboard related:

(gdb) bt
#0  0x00007f687881dd34 in read () at /lib64/libpthread.so.0
#1  0x00007f686fe38372 in pygtk_main_watch_check () at /usr/lib64/python2.7/site-packages/gtk-2.0/gtk/_gtk.so
#2  0x00007f687003bfc1 in g_main_context_check () at /usr/lib64/libglib-2.0.so.0
#3  0x00007f687003c550 in  () at /usr/lib64/libglib-2.0.so.0
#4  0x00007f687003c962 in g_main_loop_run () at /usr/lib64/libglib-2.0.so.0
#5  0x00007f686f742e4f in gtk_main () at /lib64/libgtk-x11-2.0.so.0
#6  0x00007f686fe4ca95 in _wrap_gtk_main () at /usr/lib64/python2.7/site-packages/gtk-2.0/gtk/_gtk.so
#7  0x00007f687899c70b in PyEval_EvalFrameEx () at /lib64/libpython2.7.so.1.0
#8  0x00007f687899c1ac in PyEval_EvalFrameEx () at /lib64/libpython2.7.so.1.0
#9  0x00007f687899d902 in PyEval_EvalCodeEx () at /lib64/libpython2.7.so.1.0
#10 0x00007f68788d8972 in  () at /lib64/libpython2.7.so.1.0
#11 0x00007f68788bfaa7 in PyObject_Call () at /lib64/libpython2.7.so.1.0
#12 0x00007f68788cb47e in  () at /lib64/libpython2.7.so.1.0
#13 0x00007f68788bfaa7 in PyObject_Call () at /lib64/libpython2.7.so.1.0
#14 0x00007f6878993cc7 in PyEval_CallObjectWithKeywords () at /lib64/libpython2.7.so.1.0
#15 0x00007f686ff6d2bf in  () at /usr/lib64/python2.7/site-packages/gobject/_gobject.so
#16 0x00007f687011dc9d in g_closure_invoke () at /usr/lib64/libgobject-2.0.so.0
#17 0x00007f6870131203 in  () at /usr/lib64/libgobject-2.0.so.0
#18 0x00007f687013945f in g_signal_emitv () at /usr/lib64/libgobject-2.0.so.0
#19 0x00007f686ff65d49 in  () at /usr/lib64/python2.7/site-packages/gobject/_gobject.so
#20 0x00007f687899d14b in PyEval_EvalFrameEx () at /lib64/libpython2.7.so.1.0
#21 0x00007f687899d902 in PyEval_EvalCodeEx () at /lib64/libpython2.7.so.1.0
#22 0x00007f68788d8972 in  () at /lib64/libpython2.7.so.1.0
#23 0x00007f68788bfaa7 in PyObject_Call () at /lib64/libpython2.7.so.1.0
#24 0x00007f68788cb47e in  () at /lib64/libpython2.7.so.1.0
#25 0x00007f68788bfaa7 in PyObject_Call () at /lib64/libpython2.7.so.1.0
#26 0x00007f6878993cc7 in PyEval_CallObjectWithKeywords () at /lib64/libpython2.7.so.1.0
#27 0x00007f686fe0307f in _wrap_GtkWidget__proxy_do_selection_get () at /usr/lib64/python2.7/site-packages/gtk-2.0/gtk/_gtk.so
#28 0x00007f687011dc9d in g_closure_invoke () at /usr/lib64/libgobject-2.0.so.0
#29 0x00007f6870130a34 in  () at /usr/lib64/libgobject-2.0.so.0
#30 0x00007f687013a32a in g_signal_emit_valist () at /usr/lib64/libgobject-2.0.so.0
#31 0x00007f687013ae04 in g_signal_emit_by_name () at /usr/lib64/libgobject-2.0.so.0
#32 0x00007f686f7b6cfb in gtk_selection_invoke_handler () at /lib64/libgtk-x11-2.0.so.0
#33 0x00007f686f7b87c9 in _gtk_selection_request () at /lib64/libgtk-x11-2.0.so.0
#34 0x00007f686fd678af in _wrap_GtkWidget__do_selection_request_event () at /usr/lib64/python2.7/site-packages/gtk-2.0/gtk/_gtk.so
#35 0x00007f687899d14b in PyEval_EvalFrameEx () at /lib64/libpython2.7.so.1.0
#36 0x00007f687899d902 in PyEval_EvalCodeEx () at /lib64/libpython2.7.so.1.0
#37 0x00007f68788d8972 in  () at /lib64/libpython2.7.so.1.0
#38 0x00007f68788bfaa7 in PyObject_Call () at /lib64/libpython2.7.so.1.0
#39 0x00007f68788cb47e in  () at /lib64/libpython2.7.so.1.0
#40 0x00007f68788bfaa7 in PyObject_Call () at /lib64/libpython2.7.so.1.0
#41 0x00007f6878993cc7 in PyEval_CallObjectWithKeywords () at /lib64/libpython2.7.so.1.0
#42 0x00007f686fe044e6 in _wrap_GtkWidget__proxy_do_selection_request_event () at /usr/lib64/python2.7/site-packages/gtk-2.0/gtk/_gtk.so
#43 0x00007f686f745e9d in _gtk_marshal_BOOLEAN__BOXED () at /lib64/libgtk-x11-2.0.so.0
#44 0x00007f687011dc9d in g_closure_invoke () at /usr/lib64/libgobject-2.0.so.0
#45 0x00007f6870130a34 in  () at /usr/lib64/libgobject-2.0.so.0
#46 0x00007f68701399a3 in g_signal_emit_valist () at /usr/lib64/libgobject-2.0.so.0
#47 0x00007f687013a923 in g_signal_emit () at /usr/lib64/libgobject-2.0.so.0
#48 0x00007f686f87a11c in gtk_widget_event_internal () at /lib64/libgtk-x11-2.0.so.0
#49 0x00007f686f74407b in gtk_main_do_event () at /lib64/libgtk-x11-2.0.so.0
#50 0x00007f686fbf2f70 in gdk_event_dispatch () at /lib64/libgdk-x11-2.0.so.0
#51 0x00007f687003c26d in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#52 0x00007f687003c638 in  () at /usr/lib64/libglib-2.0.so.0
#53 0x00007f687003c962 in g_main_loop_run () at /usr/lib64/libglib-2.0.so.0
#54 0x00007f686f742e4f in gtk_main () at /lib64/libgtk-x11-2.0.so.0
#55 0x00007f686fe4ca95 in _wrap_gtk_main () at /usr/lib64/python2.7/site-packages/gtk-2.0/gtk/_gtk.so
#56 0x00007f687899c70b in PyEval_EvalFrameEx () at /lib64/libpython2.7.so.1.0
#57 0x00007f687899c1ac in PyEval_EvalFrameEx () at /lib64/libpython2.7.so.1.0
#58 0x00007f687899c1ac in PyEval_EvalFrameEx () at /lib64/libpython2.7.so.1.0
#59 0x00007f687899c1ac in PyEval_EvalFrameEx () at /lib64/libpython2.7.so.1.0
#60 0x00007f687899c1ac in PyEval_EvalFrameEx () at /lib64/libpython2.7.so.1.0
#61 0x00007f687899c1ac in PyEval_EvalFrameEx () at /lib64/libpython2.7.so.1.0
#62 0x00007f687899d902 in PyEval_EvalCodeEx () at /lib64/libpython2.7.so.1.0
#63 0x00007f687899a53c in PyEval_EvalFrameEx () at /lib64/libpython2.7.so.1.0
#64 0x00007f687899c1ac in PyEval_EvalFrameEx () at /lib64/libpython2.7.so.1.0
#65 0x00007f687899d902 in PyEval_EvalCodeEx () at /lib64/libpython2.7.so.1.0
#66 0x00007f687899db9d in PyEval_EvalCode () at /lib64/libpython2.7.so.1.0
#67 0x00007f68789a3b4f in  () at /lib64/libpython2.7.so.1.0
#68 0x00007f68789a3af8 in PyRun_FileExFlags () at /lib64/libpython2.7.so.1.0
#69 0x00007f68789a390c in PyRun_SimpleFileExFlags () at /lib64/libpython2.7.so.1.0
#70 0x00007f68789a95ba in Py_Main () at /lib64/libpython2.7.so.1.0
#71 0x00007f68784db413 in __libc_start_main () at /lib64/libc.so.6
#72 0x000055cd047b20ae in _start ()

Interestingly, we have had issues with pygtk_main_watch_check in the past: https://winswitch.org/trac/ticket/90) And that's also when a process terminates. Coincidence?


Sun, 04 Nov 2018 11:58:14 GMT - Antoine Martin: status changed; resolution set


Sun, 04 Nov 2018 12:30:52 GMT - Antoine Martin: status changed; resolution deleted

Hit it again...


Sun, 04 Nov 2018 13:39:14 GMT - Antoine Martin: status changed; resolution set

So, the only thing that really seems to prevent the crash is to disable the clipboard... The changes above are worth keeping anyway. There is no hang with GTK3, probably because clipboard support is more limited there: #1589, so r20941 disables the signal watcher code with python2.

The real solution to all this instability is to get rid of the GTK clipboard glue: #812.


Sat, 23 Jan 2021 05:40:09 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2025