xpra icon
Bug tracker and wiki

Opened 3 weeks ago

Closed 3 weeks ago

#2194 closed defect (fixed)

gtk3 opengl client crash with scaling + resizing

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: blocker Milestone: 2.5
Component: client Version: 2.4.x
Keywords: Cc:

Description (last modified by Antoine Martin)

Upscale and xterm a couple of times then resize it down, boom:

(gdb) bt
#0  0x00000000400b3f31 in  ()
#1  0x0000555557c5f208 in  ()
#2  0x000055555784b978 in  ()
#3  0x00007fffffffa420 in  ()
#4  0x000000000000016f in  ()
#5  0x00007fffcf2ea576 in  () at /lib64/libnvidia-glcore.so.418.43
#6  0x00007fffcf2f515a in  () at /lib64/libnvidia-glcore.so.418.43
#7  0x00007fffcf4646d3 in  () at /lib64/libnvidia-glcore.so.418.43
#8  0x00007fffcf42ec56 in  () at /lib64/libnvidia-glcore.so.418.43
#9  0x00007fffcf436f63 in  () at /lib64/libnvidia-glcore.so.418.43
#10 0x00007fffcf43aa98 in  () at /lib64/libnvidia-glcore.so.418.43
#11 0x00007fffcf453527 in  () at /lib64/libnvidia-glcore.so.418.43
#12 0x00007ffff082aace in ffi_call_unix64 () at /lib64/libffi.so.6
#13 0x00007ffff082a48f in ffi_call () at /lib64/libffi.so.6
#14 0x00007fffefe4df51 in _call_function_pointer (argcount=9, resmem=<optimized out>, restype=<optimized out>, atypes=<optimized out>, avalues=<optimized out>, pProc=0x7fffe69e8300 <glTexImage2D>, flags=4353)
    at /usr/src/debug/python3-3.7.2-4.fc29.x86_64/Modules/_ctypes/callproc.c:827
#15 0x00007fffefe4df51 in _ctypes_callproc (pProc=<optimized out>, argtuple=<optimized out>, flags=<optimized out>, argtypes=<optimized out>, restype=<optimized out>, checker=<optimized out>)
    at /usr/src/debug/python3-3.7.2-4.fc29.x86_64/Modules/_ctypes/callproc.c:1184
#16 0x00007fffefe4e6cf in PyCFuncPtr_call (self=<optimized out>, inargs=<optimized out>, kwds=0x0) at /usr/src/debug/python3-3.7.2-4.fc29.x86_64/Modules/_ctypes/_ctypes.c:3962
#17 0x00007ffff7d15e0b in PyObject_Call (callable=<method-wrapper '__call__' of CFunctionType object at 0x7fffd113ce58>, args=<optimized out>, kwargs=<optimized out>) at /usr/src/debug/python3-3.7.2-4.fc29.x86_64/Objects/call.c:245
#18 0x00007ffff7d7364c in slot_tp_call (self=Python Exception <class 'RuntimeError'> Type does not have a target.: 
Python Exception <class 'RuntimeError'> Type does not have a target.: 
, args=, kwds=0x0) at /usr/src/debug/python3-3.7.2-4.fc29.x86_64/Objects/typeobject.c:6379
#19 0x00007fffd0f8aba5 in  () at /usr/lib64/python3.7/site-packages/OpenGL_accelerate/wrapper.cpython-37m-x86_64-linux-gnu.so
#20 0x00007fffd0f94983 in  () at /usr/lib64/python3.7/site-packages/OpenGL_accelerate/wrapper.cpython-37m-x86_64-linux-gnu.so
#21 0x00007fffd101670e in  () at /usr/lib64/python3.7/site-packages/OpenGL_accelerate/latebind.cpython-37m-x86_64-linux-gnu.so
#22 0x00007ffff7d86bcc in _PyObject_FastCallKeywordsPython Exception <class 'RuntimeError'> Type does not have a target.: 
 (callable=, stack=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at /usr/src/debug/python3-3.7.2-4.fc29.x86_64/Objects/call.c:204
#23 0x00007ffff7dd16df in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at /usr/src/debug/python3-3.7.2-4.fc29.x86_64/Python/ceval.c:4619
#24 0x00007ffff7dd16df in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.2-4.fc29.x86_64/Python/ceval.c:3124
#25 0x00007ffff7d5b44a in function_code_fastcall (globals=<optimized out>, nargs=1, args=<optimized out>, co=<optimized out>) at /usr/src/debug/python3-3.7.2-4.fc29.x86_64/Objects/call.c:408
#26 0x00007ffff7d5b44a in _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x7fffce4447b0, nargs=1, kwnames=<optimized out>) at /usr/src/debug/python3-3.7.2-4.fc29.x86_64/Objects/call.c:408
#27 0x00007ffff7dcc791 in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at /usr/src/debug/python3-3.7.2-4.fc29.x86_64/Python/ceval.c:4616
#28 0x00007ffff7dcc791 in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.2-4.fc29.x86_64/Python/ceval.c:3110
#29 0x00007ffff7d5b44a in function_code_fastcall (globals=<optimized out>, nargs=2, args=<optimized out>, co=<optimized out>) at /usr/src/debug/python3-3.7.2-4.fc29.x86_64/Objects/call.c:408
#30 0x00007ffff7d5b44a in _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x7fffb5db6c50, nargs=2, kwnames=<optimized out>) at /usr/src/debug/python3-3.7.2-4.fc29.x86_64/Objects/call.c:408
#31 0x00007ffff7dcc791 in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at /usr/src/debug/python3-3.7.2-4.fc29.x86_64/Python/ceval.c:4616
#32 0x00007ffff7dcc791 in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.2-4.fc29.x86_64/Python/ceval.c:3110
#33 0x00007ffff7d156ea in function_code_fastcall (globals=<optimized out>, nargs=2, args=<optimized out>, co=<optimized out>) at /usr/src/debug/python3-3.7.2-4.fc29.x86_64/Objects/call.c:283
#34 0x00007ffff7d156ea in _PyFunction_FastCallDict (func=<optimized out>, args=0x7fffb5bb9520, nargs=2, kwargs=<optimized out>) at /usr/src/debug/python3-3.7.2-4.fc29.x86_64/Objects/call.c:322
#35 0x00007fffefabc0cc in  () at /usr/lib64/python3.7/site-packages/gi/_gi.cpython-37m-x86_64-linux-gnu.so
#36 0x00007ffff082a8c5 in ffi_closure_unix64_inner () at /lib64/libffi.so.6
#37 0x00007ffff082ac36 in ffi_closure_unix64 () at /lib64/libffi.so.6
#38 0x00007fffee650d94 in gtk_widget_draw_internal (clip_to_size=<optimized out>, cr=0x555557380600, widget=0x5555573134c0 [xpra+client+gl+gtk3+nativegl_client_window+GLClientWindow]) at gtkwidget.c:7032
#39 0x00007fffee650d94 in gtk_widget_draw_internal (widget=0x5555573134c0 [xpra+client+gl+gtk3+nativegl_client_window+GLClientWindow], cr=0x555557380600, clip_to_size=<optimized out>) at gtkwidget.c:6970
#40 0x00007fffee65a030 in gtk_widget_render (widget=widget@entry=0x5555573134c0 [xpra+client+gl+gtk3+nativegl_client_window+GLClientWindow], window=0x555557247b10 [GdkX11Window], region=<optimized out>) at gtkwidget.c:17542
#41 0x00007fffee504999 in gtk_main_do_event (event=0x7fffffffb9e0) at gtkmain.c:1838
#42 0x00007fffee504999 in gtk_main_do_event (event=<optimized out>) at gtkmain.c:1685
#43 0x00007fffeed96a39 in _gdk_event_emit (event=event@entry=0x7fffffffb9e0) at gdkevents.c:73
#44 0x00007fffeeda7766 in _gdk_window_process_updates_recurse_helper (window=0x555557247b10 [GdkX11Window], expose_region=<optimized out>) at gdkwindow.c:3852
#45 0x00007fffeeda8936 in gdk_window_process_updates_internal (window=0x555557247b10 [GdkX11Window]) at gdkwindow.c:3998
#46 0x00007fffeeda8af4 in gdk_window_process_updates_with_mode (recurse_mode=<optimized out>, window=<optimized out>) at gdkwindow.c:4193
#47 0x00007fffeeda8af4 in gdk_window_process_updates_with_mode (window=<optimized out>, recurse_mode=<optimized out>) at gdkwindow.c:4164
#51 0x00007fffef8f80a3 in <emit signal ??? on instance 0x555555833bb0 [GdkFrameClockIdle]> (instance=instance@entry=0x555555833bb0, signal_id=<optimized out>, detail=detail@entry=0) at gsignal.c:3447
    #48 0x00007fffef8db3dd in g_closure_invoke (closure=0x55555739de40, return_value=0x0, n_param_values=1, param_values=0x7fffffffbcb0, invocation_hint=0x7fffffffbc30) at gclosure.c:810
    #49 0x00007fffef8ee983 in signal_emit_unlocked_R (node=node@entry=0x555555825bb0, detail=detail@entry=0, instance=instance@entry=0x555555833bb0, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffbcb0)
    at gsignal.c:3635
    #50 0x00007fffef8f7aaa in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffbe70) at gsignal.c:3391
#52 0x00007fffeed9fd93 in _gdk_frame_clock_emit_paint (frame_clock=frame_clock@entry=0x555555833bb0 [GdkFrameClockIdle]) at gdkframeclock.c:640
#53 0x00007fffeeda053d in gdk_frame_clock_paint_idle (data=0x555555833bb0) at gdkframeclockidle.c:459
#54 0x00007fffeed8abac in gdk_threads_dispatch (data=data@entry=0x555556ce6a60) at gdk.c:755
#55 0x00007fffef96fb31 in g_timeout_dispatch (source=0x555557370a80, callback=0x7fffeed8ab80 <gdk_threads_dispatch>, user_data=0x555556ce6a60) at gmain.c:4667
#56 0x00007fffef96f06d in g_main_dispatch (context=0x55555582f320) at gmain.c:3182
#57 0x00007fffef96f06d in g_main_context_dispatch (context=context@entry=0x55555582f320) at gmain.c:3847
#58 0x00007fffef96f438 in g_main_context_iterate (context=0x55555582f320, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3920
#59 0x00007fffef96f762 in g_main_loop_run (loop=0x555556bdab90) at gmain.c:4116
#60 0x00007fffee503b6d in gtk_main () at gtkmain.c:1323
#61 0x00007ffff082aace in ffi_call_unix64 () at /lib64/libffi.so.6
#62 0x00007ffff082a48f in ffi_call () at /lib64/libffi.so.6
#63 0x00007fffefabe815 in  () at /usr/lib64/python3.7/site-packages/gi/_gi.cpython-37m-x86_64-linux-gnu.so

Turning on opengl debugging is enough to avoid the crash.
Heisenbug!

Change History (3)

comment:1 Changed 3 weeks ago by Antoine Martin

Description: modified (diff)
Status: newassigned

comment:2 Changed 3 weeks ago by Antoine Martin

Managed to get the opengl debug log before the crash:

2019-03-06 10:59:43,439 GL do_configure_event(<Gdk.EventConfigure object at 0x7fffb5cc7ae8 (void at 0x555557248000)>)
2019-03-06 10:59:43,444 GL_MAX_TEXTURE_SIZE=32768
2019-03-06 10:59:43,444 Texture size GL_MAX_RECTANGLE_TEXTURE_SIZE=32768
2019-03-06 10:59:43,444 Initializing GL context for window size (3199, 1645), backing size (2133, 1097), max texture size=32768

comment:3 Changed 3 weeks ago by Antoine Martin

Resolution: fixed
Status: assignedclosed

Using apitrace as per wiki/Debugging/OpenGL, it seems to crash on glTexImage2D(GL_TEXTURE_RECTANGLE, 0, GL_RGB8, 1651, 732, 0, GL_RGB, GL_UNSIGNED_BYTE, [binary data, size=4719.22kb]): previous frame shows it, crashy one does not.
The call before is the glPixelStorei(GL_PACK_ALIGNMENT, 1).

This seems to be caused by r21687, which was added as a workaround for Intel chipset issues: ticket:2153#comment:3. Reverted in r21981.

Note: See TracTickets for help on using tickets.