Xpra: Ticket #2280: start-desktop segfault on exit

Detected thanks to the unit tests:

$ PYTHONPATH=. python3 ./unit/server/mixins/startdesktop_option_test.py
2019-04-21 14:03:10,133 ['python3', b'/usr/bin/xpra', '--socket-dirs=/tmp', '--systemd-run=no', '--pulseaudio=no', '--start=xterm', 'stop', ':203'] failed:
2019-04-21 14:03:10,133 returncode=None
2019-04-21 14:03:10,133 contents of stdout file '/tmp/xpra-stdout-9mug9wvb':
2019-04-21 14:03:10,134  b'server requested disconnect:'
2019-04-21 14:03:10,134  b' server shutdown'
2019-04-21 14:03:10,134 contents of stderr file '/tmp/xpra-stderr-i3fp9aoj':
2019-04-21 14:03:10,134 test error for 'start-desktop' subcommand with options=OrderedDict([('windows', True), ('notifications', True), ('webcam', True), ('clipboard', True), ('speaker', True), ('microphone', True), ('av-sync', True), ('printing', True), ('file-transfer', True), ('readonly', True), ('remote-logging', True), ('mmap', True), ('dbus-proxy', True)])
Expra initialization error:
 cannot find live server for display :203
======================================================================
ERROR: test_start_all (__main__.StartDesktopOptionTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./unit/server/mixins/startdesktop_option_test.py", line 16, in test_start_all
    self._test_all("start-desktop")
  File "/home/antoine/projects/Xpra/trunk/src/unittests/unit/server/mixins/server_mixins_option_test_util.py", line 188, in _test_all
    self._test(subcommand, options=options)
  File "/home/antoine/projects/Xpra/trunk/src/unittests/unit/server/mixins/server_mixins_option_test_util.py", line 157, in _test
    self.stop_server(server, "stop", *connect_args)
  File "/home/antoine/projects/Xpra/trunk/src/unittests/unit/server_test_util.py", line 355, in stop_server
    self.show_proc_error(stopit, "stop server error")
  File "/home/antoine/projects/Xpra/trunk/src/unittests/unit/server_test_util.py", line 188, in show_proc_error
    raise Exception(msg+" command=%s" % proc.command)
Exception: stop server error command=['python3', b'/usr/bin/xpra', '--socket-dirs=/tmp', '--systemd-run=no', '--pulseaudio=no', '--start=xterm', 'stop', ':203']
----------------------------------------------------------------------
Ran 1 test in 53.759s
FAILED (errors=1)


Sun, 21 Apr 2019 12:07:14 GMT - Antoine Martin: status, description changed

only with python3, the server doesn't exit cleanly and leaves a dead socket behind.

2019-04-21 19:05:20,157 New unix-domain connection received on /tmp/localhost.localdomain-207
2019-04-21 19:05:20,491 Shutting down in response to client request
2019-04-21 19:05:20,491 Disconnecting client ():
2019-04-21 19:05:20,491  server shutdown
server requested disconnect:
 server shutdown
2019-04-21 19:05:20,491 xpra client 2 disconnected.
 xpra list --socket-dirs=/tmp
Found the following xpra sessions:
/tmp:
	UNKNOWN session at :207
Re-probing unknown sessions in: /tmp
	UNKNOWN session at :207 (cleaned up)

Sun, 21 Apr 2019 14:20:13 GMT - Antoine Martin:

Here are the commands that are run as part of the test:

The server output shows:

2019-04-21 21:19:11,333 Python3/GObject client version 3.0-r22488 64-bit
2019-04-21 21:19:11,333  connected from 'localhost.localdomain' as 'antoine' - 'Antoine Martin'
2019-04-21 21:19:12,018 New unix-domain connection received on /tmp/localhost.localdomain-207
2019-04-21 21:19:12,357 Shutting down in response to client request
2019-04-21 21:19:12,357 Disconnecting client ():
2019-04-21 21:19:12,357  server shutdown
2019-04-21 21:19:12,357 xpra client 2 disconnected.
Segmentation fault (core dumped)

The segfault explains why the socket was not cleaned up properly.


Sun, 21 Apr 2019 18:00:48 GMT - Antoine Martin: description, summary changed

The end of the server's -d all log:

enc_x264.cleanup_module()
enc_ffmpeg.cleanup_module()
csc_swscale.cleanup_module()
csc_libyuv.cleanup_module()
close_damage_handle()
invalidating named pixmap, contents handle=PixmapWrapper(0x299, 1280, 1024)
PixmapWrapper(0x299, 1280, 1024).cleanup()
get_X_error(..) initialized error names: {0: 'Success', 1: 'BadRequest', 2: 'BadValue', 3: 'BadWindow', 4: 'BadPixmap', 5: 'BadAtom', 6: 'BadCursor', 7: 'BadFont', 8: 'BadMatch', 9: 'BadDrawable', 10: 'BadAccess', 11: 'BadAlloc', 12: 'BadColor', 13: 'BadGC', 14: 'BadIDChoice', 15: 'BadName', 16: 'BadLength', 17: 'BadImplementation'}
XError XError: BadPixmap detected while already in unwind; discarding
XShmWrapper.cleanup() ref_count=0
XShmWrapper.free() has_shm=True, image=0x555555fcfea0, shmid=0xf90033
invalidating named pixmap, contents handle=None
XShmWrapper.__dealloc__() ref_count=0
XShmWrapper.cleanup() ref_count=0
XShmWrapper.free() has_shm=False, image=0x0, shmid=-0x1
remove_catchall_receiver(xpra-motion-event, <desktop_server.XpraDesktopServer object at 0x7fffe80b8c60 (xpra+x11+desktop_server+XpraDesktopServer at 0x5555558abd00)>) -> {'xpra-motion-event': [], 'xpra-xkb-event': [<desktop_server.XpraDesktopServer object at 0x7fffe80b8c60 (xpra+x11+desktop_server+XpraDesktopServer at 0x5555558abd00)>]}
cleanup_x11_filter()
cleanup_protocols([], server shutdown, True)
stop_worker(False) worker=Worker_Thread(items=0, exit=False)
Worker_Thread.stop(False) <queue.Queue object at 0x7fffe0c21cc0> items in work queue
clean_quit(..) quit timers scheduled
Worker_Thread.run() found end of queue marker
found 3 frames:
0: 0x7fffbc88a700 <frame at 0x7fffc4002ca8, file '/usr/lib64/python3.7/site-packages/xpra/net/bytestreams.py', line 123, code untilConcludes>:
Worker_Thread.run() ended (queue size=0)
...

(3 uninteresting threads) And backtrace from gdb:

(gdb) bt
#0  0x00007fffe7fc9d6d in  () at /lib64/libgdk-3.so.0
#1  0x00007fffe7fbb123 in  () at /lib64/libgdk-3.so.0
#2  0x00007fffe7fc14c9 in  () at /lib64/libgdk-3.so.0
#3  0x00007fffe7fc0fb4 in  () at /lib64/libgdk-3.so.0
#4  0x00007fffe7f8a054 in gdk_display_get_event () at /lib64/libgdk-3.so.0
#5  0x00007fffe7fc0c26 in  () at /lib64/libgdk-3.so.0
#6  0x00007fffe8b59fd0 in g_main_dispatch (context=0x5555559d4cc0) at ../glib/gmain.c:3189
#7  0x00007fffe8b59fd0 in g_main_context_dispatch (context=context@entry=0x5555559d4cc0) at ../glib/gmain.c:3854
#8  0x00007fffe8b5a368 in g_main_context_iterate (context=0x5555559d4cc0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:3927
#9  0x00007fffe8b5a6b3 in g_main_loop_run (loop=0x555555854a60) at ../glib/gmain.c:4123
#10 0x00007fffe73721ad in gtk_main () at /lib64/libgtk-3.so.0
#11 0x00007fffea431b28 in ffi_call_unix64 () at /lib64/libffi.so.6
#12 0x00007fffea431339 in ffi_call () at /lib64/libffi.so.6
#13 0x00007fffe8c5eb25 in pygi_invoke_c_callable (function_cache=0x555555854900, state=<optimized out>, py_args=<optimized out>, py_kwargs=<optimized out>) at ../gi/pygi-invoke.c:690
#14 0x00007fffe8c6065c in pygi_function_cache_invoke (function_cache=<optimized out>, py_args=<optimized out>, py_kwargs=<optimized out>) at ../gi/pygi-cache.c:863
#15 0x00007ffff7bc420e in PyObject_Call (callable=<gi.FunctionInfo at remote 0x7fffe6fd7a08>, args=<optimized out>, kwargs=<optimized out>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Objects/call.c:245
#16 0x00007ffff7c25700 in do_call_core (kwdict={}, callargs=(), func=<gi.FunctionInfo at remote 0x7fffe6fd7a08>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:4645
#17 0x00007ffff7c25700 in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:3191
#18 0x00007ffff7bc2420 in _PyEval_EvalCodeWithName
    (_co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x0, kwargs=0x7fffe111a860, kwcount=<optimized out>, kwstep=1, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name='main', qualname='main') at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:3930
#19 0x00007ffff7bc35b0 in _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x7fffe111a860, nargs=0, kwnames=<optimized out>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Objects/call.c:433
#20 0x00007ffff7bd86df in call_function (pp_stack=0x7fffffffbf38, oparg=<optimized out>, kwnames=0x0) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:4616
#21 0x00007ffff7c23f8a in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:3124
#22 0x00007ffff7bc3412 in function_code_fastcall (globals=<optimized out>, nargs=1, args=<optimized out>, co=<optimized out>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Objects/call.c:408
#23 0x00007ffff7bc3412 in _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x7fffe1276f90, nargs=1, kwnames=<optimized out>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Objects/call.c:408
#24 0x00007ffff7bd86df in call_function (pp_stack=0x7fffffffc130, oparg=<optimized out>, kwnames=0x0) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:4616
#25 0x00007ffff7c2402e in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:3110
#26 0x00007ffff7bc2420 in _PyEval_EvalCodeWithName
    (_co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x0, kwargs=0x5555557016b8, kwcount=<optimized out>, kwstep=1, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name='run', qualname='ServerCore.run') at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:3930
#27 0x00007ffff7bc35b0 in _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x5555557016b0, nargs=1, kwnames=<optimized out>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Objects/call.c:433
#28 0x00007ffff7bd86df in call_function (pp_stack=0x7fffffffc420, oparg=<optimized out>, kwnames=0x0) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:4616
#29 0x00007ffff7c2402e in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:3110
#30 0x00007ffff7bc2420 in _PyEval_EvalCodeWithName
    (_co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x0, kwargs=0x7fffe99a9a20, kwcount=<optimized out>, kwstep=1, defs=0x7fffe9924db8, defcount=1, kwdefs=0x0, closure=0x0, name='do_run_server', qualname='do_run_server') at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:3930
#31 0x00007ffff7bc35b0 in _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x7fffe99a99f0, nargs=6, kwnames=<optimized out>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Objects/call.c:433
#32 0x00007ffff7bd86df in call_function (pp_stack=0x7fffffffc718, oparg=<optimized out>, kwnames=0x0) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:4616
#33 0x00007ffff7c23f8a in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:3124
#34 0x00007ffff7bc2420 in _PyEval_EvalCodeWithName
    (_co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x0, kwargs=0x5555556f6ae0, kwcount=<optimized out>, kwstep=1, defs=0x7fffe9924d80, defcount=1, kwdefs=0x0, closure=0x0, name='run_server', qualname='run_server') at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:3930
#35 0x00007ffff7bc35b0 in _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x5555556f6ab0, nargs=6, kwnames=<optimized out>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Objects/call.c:433
#36 0x00007ffff7bd86df in call_function (pp_stack=0x7fffffffca08, oparg=<optimized out>, kwnames=0x0) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:4616
#37 0x00007ffff7c23f8a in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:3124
#38 0x00007ffff7bc2420 in _PyEval_EvalCodeWithName
    (_co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x0, kwargs=0x555555682a98, kwcount=<optimized out>, kwstep=1, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name='run_mode', qualname='run_mode') at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:3930
#39 0x00007ffff7bc35b0 in _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x555555682a68, nargs=6, kwnames=<optimized out>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Objects/call.c:433
#40 0x00007ffff7bd86df in call_function (pp_stack=0x7fffffffccf8, oparg=<optimized out>, kwnames=0x0) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:4616
#41 0x00007ffff7c23f8a in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:3124
#42 0x00007ffff7bc3412 in function_code_fastcall (globals=<optimized out>, nargs=2, args=<optimized out>, co=<optimized out>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Objects/call.c:408
#43 0x00007ffff7bc3412 in _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x7fffea921b78, nargs=2, kwnames=<optimized out>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Objects/call.c:408
#44 0x00007ffff7bd86df in call_function (pp_stack=0x7fffffffcef8, oparg=<optimized out>, kwnames=0x0) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:4616
--Type <RET> for more, q to quit, c to continue without paging--
#45 0x00007ffff7c23f8a in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:3124
#46 0x00007ffff7bc2420 in _PyEval_EvalCodeWithName
    (_co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x0, kwargs=0x0, kwcount=<optimized out>, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:3930
#47 0x00007ffff7bc32e9 in PyEval_EvalCodeEx (_co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kws=<optimized out>, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0)
    at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:3959
#48 0x00007ffff7bc330b in PyEval_EvalCode
    (co=co@entry=<code at remote 0x7fffea8368a0>, globals=globals@entry={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/usr/bin/xpra') at remote 0x7fffea8a4ef0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffea968c28>, '__file__': '/usr/bin/xpra', '__cached__': None, 'os': <module at remote 0x7fffea8aadb8>, 'sys': <module at remote 0x7fffea962f98>, 'xpra': <module at remote 0x7fffea78a048>, 'init': <function at remote 0x7fffea78b0d0>, 'set_default_name': <function at remote 0x7fffea78b1e0>, 'main': <function at remote 0x7fffea4727b8>}, locals=locals@entry={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/usr/bin/xpra') at remote 0x7fffea8a4ef0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffea968c28>, '__file__': '/usr/bin/xpra', '__cached__': None, 'os': <module at remote 0x7fffea8aadb8>, 'sys': <module at remote 0x7fffea962f98>, 'xpra': <module at remote 0x7fffea78a048>, 'init': <function at remote 0x7fffea78b0d0>, 'set_default_name': <function at remote 0x7fffea78b1e0>, 'main': <function at remote 0x7fffea4727b8>}) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/ceval.c:524
#49 0x00007ffff7c9650f in run_mod
    (mod=mod@entry=0x5555555df0f0, filename=filename@entry='/usr/bin/xpra', globals=globals@entry={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/usr/bin/xpra') at remote 0x7fffea8a4ef0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffea968c28>, '__file__': '/usr/bin/xpra', '__cached__': None, 'os': <module at remote 0x7fffea8aadb8>, 'sys': <module at remote 0x7fffea962f98>, 'xpra': <module at remote 0x7fffea78a048>, 'init': <function at remote 0x7fffea78b0d0>, 'set_default_name': <function at remote 0x7fffea78b1e0>, 'main': <function at remote 0x7fffea4727b8>}, locals=locals@entry={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/usr/bin/xpra') at remote 0x7fffea8a4ef0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffea968c28>, '__file__': '/usr/bin/xpra', '__cached__': None, 'os': <module at remote 0x7fffea8aadb8>, 'sys': <module at remote 0x7fffea962f98>, 'xpra': <module at remote 0x7fffea78a048>, 'init': <function at remote 0x7fffea78b0d0>, 'set_default_name': <function at remote 0x7fffea78b1e0>, 'main': <function at remote 0x7fffea4727b8>}, flags=flags@entry=0x7fffffffd1e0, arena=arena@entry=0x7fffea96f0a8) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/pythonrun.c:1035
#50 0x00007ffff7c96877 in PyRun_FileExFlags
    (fp=0x5555555a3b80, filename_str=<optimized out>, start=<optimized out>, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/usr/bin/xpra') at remote 0x7fffea8a4ef0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffea968c28>, '__file__': '/usr/bin/xpra', '__cached__': None, 'os': <module at remote 0x7fffea8aadb8>, 'sys': <module at remote 0x7fffea962f98>, 'xpra': <module at remote 0x7fffea78a048>, 'init': <function at remote 0x7fffea78b0d0>, 'set_default_name': <function at remote 0x7fffea78b1e0>, 'main': <function at remote 0x7fffea4727b8>}, locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/usr/bin/xpra') at remote 0x7fffea8a4ef0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7fffea968c28>, '__file__': '/usr/bin/xpra', '__cached__': None, 'os': <module at remote 0x7fffea8aadb8>, 'sys': <module at remote 0x7fffea962f98>, 'xpra': <module at remote 0x7fffea78a048>, 'init': <function at remote 0x7fffea78b0d0>, 'set_default_name': <function at remote 0x7fffea78b1e0>, 'main': <function at remote 0x7fffea4727b8>}, closeit=1, flags=0x7fffffffd1e0) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/pythonrun.c:988
#51 0x00007ffff7c9c5d6 in PyRun_SimpleFileExFlags (fp=0x5555555a3b80, filename=<optimized out>, closeit=1, flags=0x7fffffffd1e0) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Python/pythonrun.c:429
#52 0x00007ffff7c9e864 in pymain_run_file (p_cf=0x7fffffffd1e0, filename=<optimized out>, fp=0x5555555a3b80) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Modules/main.c:427
#53 0x00007ffff7c9e864 in pymain_run_filename (cf=0x7fffffffd1e0, pymain=0x7fffffffd2f0) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Modules/main.c:1627
#54 0x00007ffff7c9e864 in pymain_run_python (pymain=0x7fffffffd2f0) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Modules/main.c:2877
#55 0x00007ffff7c9e864 in pymain_main (pymain=0x7fffffffd2f0) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Modules/main.c:3038
#56 0x00007ffff7c9ec0c in _Py_UnixMain (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/python3-3.7.3-1.fc30.x86_64/Modules/main.c:3073
#57 0x00007ffff7e03f33 in __libc_start_main () at /lib64/libc.so.6
#58 0x000055555555508e in _start ()

Looks like gtk main is still running:

(gdb) py-bt
Traceback (most recent call first):
  File "/usr/lib64/python3.7/site-packages/gi/overrides/Gtk.py", line 1630, in main
    return _Gtk_main(*args, **kwargs)
  File "/usr/lib64/python3.7/site-packages/xpra/server/gtk_server_base.py", line 76, in do_run
    gtk_main()
  File "/usr/lib64/python3.7/site-packages/xpra/server/server_core.py", line 365, in run
    self.do_run()
  File "/usr/lib64/python3.7/site-packages/xpra/scripts/server.py", line 1243, in do_run_server
    r = app.run()
  File "/usr/lib64/python3.7/site-packages/xpra/scripts/server.py", line 622, in run_server
    return do_run_server(error_cb, opts, mode, xpra_file, extra_args, desktop_display)
  File "/usr/lib64/python3.7/site-packages/xpra/scripts/main.py", line 426, in run_mode
    return run_server(error_cb, options, mode, script_file, args, current_display)
  File "/usr/lib64/python3.7/site-packages/xpra/scripts/main.py", line 93, in main
    return run_mode(script_file, err, options, args, mode, defaults)
  File "/usr/bin/xpra", line 26, in <module>
    sys.exit(main(sys.argv[0], sys.argv))

Obviously, the bug can be reproduce with much simpler command lines than the long winded ones from the unit tests.

Turning off clipboard support does allow the server to exit cleanly. So #812 must have caused this.


Mon, 22 Apr 2019 04:26:49 GMT - Antoine Martin: status changed; resolution set

Fixed in r22501, we don't release the selection on exit to avoid this GTK3 crash.


Sat, 23 Jan 2021 05:46:59 GMT - migration script:

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