Xpra: Ticket #2593: win32 shadow server crash

Last lines of -d all don't look relevant:

2020-02-13 16:47:09,133 init_capture()=GDICapture(32-bits)
(xpra_cmd.exe:3288): Gdk-WARNING **: 16:47:09.133: ../gtk+-3.24.13/gdk/win32/gdkwindow-win32.c:2317: GetClientRect failed with code 1400: Invalid window handle.
2020-02-13 16:47:09,133 monitor 0:   DISPLAY1 geometry=(0, 0, 1588, 1124) (from (0, 0, 1588, 1124))
2020-02-13 16:47:09,133 makeRootWindowModels: model({'Work': (0, 0, 1588, 1084), 'Monitor': (0, 0, 1588, 1124), 'Flags': 1, 'Device': '\\\\.\\DISPLAY1'})=RootWindowModel(GDICapture(32-bits) :       (0, 0, 1588, 1124))
2020-02-13 16:47:09,133 makeRootWindowModels()=[RootWindowModel(GDICapture(32-bits) :       (0, 0, 1588, 1124))]
2020-02-13 16:47:09,133 load_existing_windows() root window model 0: RootWindowModel(GDICapture(32-bits) :       (0, 0, 1588, 1124))
2020-02-13 16:47:09,133 add_new_window_common(RootWindowModel(GDICapture(32-bits) :       (0, 0, 1588, 1124))) watching for dynamic properties: []
2020-02-13 16:47:09,133 180ms in <class 'xpra.server.mixins.window_server.WindowServer'>.setup
[New Thread 3288.0xf54]
2020-02-13 16:47:09,145 threaded_init() start
2020-02-13 16:47:09,146 init_when_ready([])
2020-02-13 16:47:09,147 running <bound method ShadowServerBase.run of <xpra.platform.win32.shadow_server.ShadowServer object at 0x00000000042e28e0>>
2020-02-13 16:47:09,147 do_run() calling <function main at 0x0000000004b04160>
2020-02-13 16:47:09,366 PIL.Image.OPEN={'BMP': (<class 'PIL.BmpImagePlugin.BmpImageFile'>, <function _accept at 0x00000000055f44c0>), 'DIB': (<class 'PIL.BmpImagePlugin.DibImageFile'>, <function _dib_accept at 0x0000000005609af0>), 'GIF': (<class 'PIL.GifImagePlugin.GifImageFile'>, <function _accept at 0x0000000005619040>), 'TIFF': (<class 'PIL.TiffImagePlugin.TiffImageFile'>, <function _accept at 0x0000000005628700>), 'JPEG': (<function jpeg_factory at 0x000000000566daf0>, <function _accept at 0x000000000566d310>), 'PPM': (<class 'PIL.PpmImagePlugin.PpmImageFile'>, <function _accept at 0x000000000566db80>), 'PNG': (<class 'PIL.PngImagePlugin.PngImageFile'>, <function _accept at 0x0000000005e7d0d0>), 'BLP': (<class 'PIL.BlpImagePlugin.BlpImageFile'>, <function <lambda> at 0x0000000006443310>), 'BUFR': (<class 'PIL.BufrStubImagePlugin.BufrStubImageFile'>, <function _accept at 0x0000000006443af0>), 'CUR': (<class 'PIL.CurImagePlugin.CurImageFile'>, <function _accept at 0x0000000006443d30>), 'PCX': (<class 'PIL.PcxImagePlugin.PcxImageFile'>, <function _accept at 0x0000000006443f70>), 'DCX': (<class 'PIL.DcxImagePlugin.DcxImageFile'>, <function _accept at 0x0000000006443ee0>), 'DDS': (<class 'PIL.DdsImagePlugin.DdsImageFile'>, <function _validate at 0x0000000006457160>), 'EPS': (<class 'PIL.EpsImagePlugin.EpsImageFile'>, <function _accept at 0x0000000006457940>), 'FITS': (<class 'PIL.FitsStubImagePlugin.FITSStubImageFile'>, <function _accept at 0x0000000006460040>), 'FLI': (<class 'PIL.FliImagePlugin.FliImageFile'>, <function _accept at 0x0000000006460310>), 'FPX': (<class 'PIL.FpxImagePlugin.FpxImageFile'>, <function _accept at 0x0000000006460280>), 'FTEX': (<class 'PIL.FtexImagePlugin.FtexImageFile'>, <function _validate at 0x00000000071d63a0>), 'GBR': (<class 'PIL.GbrImagePlugin.GbrImageFile'>, <function _accept at 0x00000000071d6550>), 'GRIB': (<class 'PIL.GribStubImagePlugin.GribStubImageFile'>, <function _accept at 0x00000000071d6820>), 'HDF5': (<class 'PIL.Hdf5StubImagePlugin.HDF5StubImageFile'>, <function _accept at 0x00000000071d6c10>), 'JPEG2000': (<class 'PIL.Jpeg2KImagePlugin.Jpeg2KImageFile'>, <function _accept at 0x00000000071dc430>), 'ICNS': (<class 'PIL.IcnsImagePlugin.IcnsImageFile'>, <function <lambda> at 0x00000000071dce50>), 'ICO': (<class 'PIL.IcoImagePlugin.IcoImageFile'>, <function _accept at 0x00000000071dcf70>), 'IM': (<class 'PIL.ImImagePlugin.ImImageFile'>, None), 'IMT': (<class 'PIL.ImtImagePlugin.ImtImageFile'>, None), 'IPTC': (<class 'PIL.IptcImagePlugin.IptcImageFile'>, None), 'MCIDAS': (<class 'PIL.McIdasImagePlugin.McIdasImageFile'>, <function _accept at 0x00000000071f3040>), 'MIC': (<class 'PIL.MicImagePlugin.MicImageFile'>, <function _accept at 0x00000000071f31f0>), 'MPEG': (<class 'PIL.MpegImagePlugin.MpegImageFile'>, None), 'MSP': (<class 'PIL.MspImagePlugin.MspImageFile'>, <function _accept at 0x00000000071f3b80>), 'PCD': (<class 'PIL.PcdImagePlugin.PcdImageFile'>, None), 'PIXAR': (<class 'PIL.PixarImagePlugin.PixarImageFile'>, <function _accept at 0x000000000721f820>), 'PSD': (<class 'PIL.PsdImagePlugin.PsdImageFile'>, <function _accept at 0x0000000007220b80>), 'SGI': (<class 'PIL.SgiImagePlugin.SgiImageFile'>, <function _accept at 0x000000000721e1f0>), 'SPIDER': (<class 'PIL.SpiderImagePlugin.SpiderImageFile'>, None), 'SUN': (<class 'PIL.SunImagePlugin.SunImageFile'>, <function _accept at 0x000000000721eee0>), 'TGA': (<class 'PIL.TgaImagePlugin.TgaImageFile'>, None), 'WEBP': (<class 'PIL.WebPImagePlugin.WebPImageFile'>, <function _accept at 0x00000000072301f0>), 'WMF': (<class 'PIL.WmfImagePlugin.WmfStubImageFile'>, <function _accept at 0x0000000007230af0>), 'XBM': (<class 'PIL.XbmImagePlugin.XbmImageFile'>, <function _accept at 0x0000000007230ee0>), 'XPM': (<class 'PIL.XpmImagePlugin.XpmImageFile'>, <function _accept at 0x000000000723d160>), 'XVTHUMB': (<class 'PIL.XVThumbImagePlugin.XVThumbImageFile'>, <function _accept at 0x000000000723d3a0>)}
2020-02-13 16:47:09,367 do_get_encodings()=['png', 'png/L', 'png/P', 'jpeg', 'webp']
2020-02-13 16:47:09,367 init_virtual_video_devices
2020-02-13 16:47:09,367 exec_start_commands() start=[], start_child=[]
2020-02-13 16:47:09,368 VideoHelper.init()
2020-02-13 16:47:09,368 VideoHelper.init() initialized=False
2020-02-13 16:47:09,368 init_video_encoders_options()
2020-02-13 16:47:09,368  will try video encoders:
2020-02-13 16:47:09,368 found 0 video encoders:
2020-02-13 16:47:09,368 init_csc_options()
2020-02-13 16:47:09,368  will try csc modules:
2020-02-13 16:47:09,368  csc specs:
2020-02-13 16:47:09,368 csc options: {}
2020-02-13 16:47:09,369 init_video_decoders_options()
2020-02-13 16:47:09,369  will try video decoders:
2020-02-13 16:47:09,369 found 0 video decoders:
2020-02-13 16:47:09,369 video decoder options: {}
2020-02-13 16:47:09,369 VideoHelper.init() done
2020-02-13 16:47:09,369 enc_jpeg:
2020-02-13 16:47:09,369  codec_import_check('enc_jpeg', 'JPEG encoder', 'xpra.codecs.jpeg', 'xpra.codecs.jpeg.encoder', ('encode',))
[New Thread 3288.0xf5c]
2020-02-13 16:47:09,371  xpra.codecs.jpeg found, will check for ('encode',) in xpra.codecs.jpeg.encoder
2020-02-13 16:47:09,692 xpra.codecs.jpeg.encoder: init_module=None
2020-02-13 16:47:09,692 xpra.codecs.jpeg.encoder: encode=<built-in function encode>
2020-02-13 16:47:09,692 enc_jpeg.selftest=<built-in function selftest>
2020-02-13 16:47:09,693 jpeg selftest
2020-02-13 16:47:09,693 jpeg: encode with subsampling=420 for pixel format=BGRA with quality=0
2020-02-13 16:47:09,696 jpeg: encode with subsampling=422 for pixel format=BGRA with quality=50
2020-02-13 16:47:09,696 poll() procinfo list: []

(server started with --video-encoders=none --csc-modules=none to limit the codecs)

backtrace:

Thread 1 received signal SIGSEGV, Segmentation fault.
0x0000000068e44435 in ?? () from /mingw64/bin/libcairo-2.dll
(gdb) bt
#0  0x0000000068e44435 in ?? () from /mingw64/bin/libcairo-2.dll
#1  0x000000006c220434 in libgdk-3-0!gdk_win32_window_get_type () from /mingw64/bin/libgdk-3-0.dll
#2  0x000000006c22052d in libgdk-3-0!gdk_win32_window_get_type () from /mingw64/bin/libgdk-3-0.dll
#3  0x00000000679b0d50 in libgtk-3-0!gtk_widget_get_style_context () from /mingw64/bin/libgtk-3-0.dll
#4  0x00000000679b12e2 in libgtk-3-0!gtk_widget_set_opacity () from /mingw64/bin/libgtk-3-0.dll
#5  0x000000006b744797 in ?? () from /mingw64/bin/libffi-6.dll
#6  0x000000006b7443a7 in ?? () from /mingw64/bin/libffi-6.dll
#7  0x0000000004356cd5 in _gi-cpython-38!PyInit__gi () from /e/Xpra/trunk/src/dist/lib/gi/_gi-cpython-38.dll
#8  0x000000000434e22f in _gi-cpython-38!PyInit__gi () from /e/Xpra/trunk/src/dist/lib/gi/_gi-cpython-38.dll
#9  0x0000000004351f5e in _gi-cpython-38!PyInit__gi () from /e/Xpra/trunk/src/dist/lib/gi/_gi-cpython-38.dll
#10 0x0000000070a3b2be in libpython3.8!_PyObject_MakeTpCall () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#11 0x00000000709546b2 in libpython3.8!_PyEval_EvalFrameDefault () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#12 0x0000000070a3d356 in libpython3.8!_PyFunction_Vectorcall () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#13 0x0000000070a3b89c in libpython3.8!_PyObject_MakeTpCall () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#14 0x0000000070a3ab3b in libpython3.8!PyObject_Call () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#15 0x000000000434edf4 in _gi-cpython-38!PyInit__gi () from /e/Xpra/trunk/src/dist/lib/gi/_gi-cpython-38.dll
#16 0x000000006b7444eb in ?? () from /mingw64/bin/libffi-6.dll
#17 0x000000006b7446ef in ?? () from /mingw64/bin/libffi-6.dll
#18 0x00000000649f8195 in libglib-2.0-0!g_source_get_time () from /mingw64/bin/libglib-2.0-0.dll
#19 0x00000000649f751d in libglib-2.0-0!g_main_context_dispatch () from /mingw64/bin/libglib-2.0-0.dll
#20 0x00000000649f7878 in libglib-2.0-0!g_main_context_dispatch () from /mingw64/bin/libglib-2.0-0.dll
#21 0x00000000649f7cf4 in libglib-2.0-0!g_main_loop_run () from /mingw64/bin/libglib-2.0-0.dll
#22 0x000000006785a65d in libgtk-3-0!gtk_main () from /mingw64/bin/libgtk-3-0.dll
#23 0x000000006b744797 in ?? () from /mingw64/bin/libffi-6.dll
#24 0x000000006b7443a7 in ?? () from /mingw64/bin/libffi-6.dll
#25 0x0000000004356cd5 in _gi-cpython-38!PyInit__gi () from /e/Xpra/trunk/src/dist/lib/gi/_gi-cpython-38.dll
#26 0x000000000434e22f in _gi-cpython-38!PyInit__gi () from /e/Xpra/trunk/src/dist/lib/gi/_gi-cpython-38.dll
#27 0x0000000070a3abce in libpython3.8!PyObject_Call () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#28 0x0000000070951db4 in libpython3.8!_PyEval_EvalFrameDefault () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#29 0x000000007094e977 in libpython3.8!_PyEval_EvalCodeWithName () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#30 0x0000000070a3d42f in libpython3.8!_PyFunction_Vectorcall () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#31 0x0000000070954325 in libpython3.8!_PyEval_EvalFrameDefault () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#32 0x0000000070a3d356 in libpython3.8!_PyFunction_Vectorcall () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#33 0x0000000070950188 in libpython3.8!_PyEval_EvalFrameDefault () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#34 0x000000007094e977 in libpython3.8!_PyEval_EvalCodeWithName () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#35 0x0000000070a3b7e0 in libpython3.8!_PyObject_MakeTpCall () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#36 0x0000000070954325 in libpython3.8!_PyEval_EvalFrameDefault () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#37 0x000000007094e977 in libpython3.8!_PyEval_EvalCodeWithName () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#38 0x0000000070a3d42f in libpython3.8!_PyFunction_Vectorcall () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#39 0x0000000070950188 in libpython3.8!_PyEval_EvalFrameDefault () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#40 0x000000007094e977 in libpython3.8!_PyEval_EvalCodeWithName () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#41 0x0000000070a3d42f in libpython3.8!_PyFunction_Vectorcall () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#42 0x000000007094fe05 in libpython3.8!_PyEval_EvalFrameDefault () from /e/Xpra/trunk/src/dist/libpython3.8.dll
--Type <RET> for more, q to quit, c to continue without paging--
#43 0x000000007094e977 in libpython3.8!_PyEval_EvalCodeWithName () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#44 0x0000000070a3d42f in libpython3.8!_PyFunction_Vectorcall () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#45 0x000000007094fe05 in libpython3.8!_PyEval_EvalFrameDefault () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#46 0x000000007094e977 in libpython3.8!_PyEval_EvalCodeWithName () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#47 0x0000000070a3d42f in libpython3.8!_PyFunction_Vectorcall () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#48 0x000000007094fe05 in libpython3.8!_PyEval_EvalFrameDefault () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#49 0x0000000070a3d356 in libpython3.8!_PyFunction_Vectorcall () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#50 0x000000007094fe05 in libpython3.8!_PyEval_EvalFrameDefault () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#51 0x000000007094e977 in libpython3.8!_PyEval_EvalCodeWithName () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#52 0x000000007087f751 in libpython3.8!PyEval_EvalCode () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#53 0x000000007088123a in libpython3.8!PyEval_InitThreads () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#54 0x00000000709e648c in libpython3.8!PyObject_RichCompareBool () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#55 0x000000007094fe05 in libpython3.8!_PyEval_EvalFrameDefault () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#56 0x0000000070a3d356 in libpython3.8!_PyFunction_Vectorcall () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#57 0x0000000070954325 in libpython3.8!_PyEval_EvalFrameDefault () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#58 0x0000000070a3d356 in libpython3.8!_PyFunction_Vectorcall () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#59 0x0000000070a3cf4b in libpython3.8!_PyObject_FastCallDict () from /e/Xpra/trunk/src/dist/libpython3.8.dll
#60 0x0000000000401789 in ?? ()
#61 0x00000000004013ee in ?? ()
#62 0x000000000040153b in ?? ()
#63 0x0000000076e2556d in KERNEL32!BaseThreadInitThunk () from /c/Windows/system32/kernel32.dll
#64 0x0000000076f8372d in ntdll!RtlUserThreadStart () from /c/Windows/SYSTEM32/ntdll.dll
#65 0x0000000000000000 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)


Thu, 13 Feb 2020 17:27:03 GMT - totaamwin32: owner, status changed

v3.0.x branch does not crash, yay bisection time.


Fri, 14 Feb 2020 08:41:12 GMT - totaamwin32:

Bisecting with r25204 re-applied. Installed fast using python3 ./setup.py install --without-cuda_rebuild --without-nvenc --without-nvfbc --without-html5 --without-minify


Fri, 14 Feb 2020 09:04:56 GMT - totaamwin32: status changed; resolution set

Sure enough, with r25225 and XPRA_SHADOW_NOTIFY_STARTUP=0, the server does not crash.

It seems that we can't do notifications until the main loop is running, by which time we are showing the other notification ("startup complete"), so r25226 removes the initial notification.


Sat, 23 Jan 2021 05:55:31 GMT - migration script:

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