Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client hangs handling popup window #2025

Closed
totaam opened this issue Nov 2, 2018 · 11 comments
Closed

client hangs handling popup window #2025

totaam opened this issue Nov 2, 2018 · 11 comments
Labels

Comments

@totaam
Copy link
Collaborator

totaam commented Nov 2, 2018

Issue migrated from trac ticket # 2025

component: client | priority: blocker | resolution: fixed

2018-11-02 18:10:32: antoine created the issue


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
@totaam
Copy link
Collaborator Author

totaam commented Nov 3, 2018

2018-11-03 08:52:00: antoine changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented Nov 3, 2018

2018-11-03 08:52:00: antoine commented


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: glib/gtk + twisted main loop is eating up all CPU when a subprocess terminates. ([https://winswitch.org/trac/ticket/90])
And that's also when a process terminates. Coincidence?

@totaam
Copy link
Collaborator Author

totaam commented Nov 4, 2018

2018-11-04 11:58:15: antoine changed status from assigned to closed

@totaam
Copy link
Collaborator Author

totaam commented Nov 4, 2018

2018-11-04 11:58:15: antoine set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Nov 4, 2018

2018-11-04 11:58:15: antoine commented


  • r20929: makes it possible to disable the signal watcher code:
XPRA_SIGNAL_WATCHER=0 xpra start ...
  • r20930: refactor the kill_signalwatcher code into a method we can re-use, make sure we stop watching the pipe as soon as we decide to stop the watcher
  • r20931: reap children immediately, fire the callbacks from the main thread later (the actual fix)
  • r20932: re-enable the signal watcher by default

@totaam
Copy link
Collaborator Author

totaam commented Nov 4, 2018

2018-11-04 12:30:52: antoine changed status from closed to reopened

@totaam
Copy link
Collaborator Author

totaam commented Nov 4, 2018

2018-11-04 12:30:52: antoine removed resolution (was fixed)

@totaam
Copy link
Collaborator Author

totaam commented Nov 4, 2018

2018-11-04 12:30:52: antoine commented


Hit it again...

@totaam
Copy link
Collaborator Author

totaam commented Nov 4, 2018

2018-11-04 13:39:14: antoine changed status from reopened to closed

@totaam
Copy link
Collaborator Author

totaam commented Nov 4, 2018

2018-11-04 13:39:14: antoine set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Nov 4, 2018

2018-11-04 13:39:14: antoine commented


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.

@totaam totaam closed this as completed Nov 4, 2018
@totaam totaam added the v2.4.x label Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant