Xpra: Ticket #2476: server crash on re-connection

Reproducible (not very reliably) by testing for #2475 / #2457 with eclipse + xterm as client applications.

(gdb) bt
#0  0x00007ffff7ed2abc in send () at /lib64/libc.so.6
#1  0x00007ffff7fb2ddf in sock_send_impl (data=<synthetic pointer>, s=0x7fff7532e830) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Modules/socketmodule.c:3942
#2  sock_call_ex (timeout=-1000000000, err=0x0, connect=0, data=<synthetic pointer>, sock_func=<optimized out>, writing=1, s=0x7fff7532e830)
    at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Modules/socketmodule.c:895
#3  sock_call (data=<synthetic pointer>, func=<optimized out>, writing=1, s=0x7fff7532e830) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Modules/socketmodule.c:947
#4  sock_send (s=0x7fff7532e830, args=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Modules/socketmodule.c:3966
#5  0x00007ffff7b933f3 in cfunction_call_varargs (kwargs=<optimized out>, args=<optimized out>, func=<built-in method send of socket object at remote 0x7fff7532e830>)
    at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:772
#6  PyCFunction_Call (func=<built-in method send of socket object at remote 0x7fff7532e830>, args=<optimized out>, kwargs=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:788
#7  0x00007ffff7c026c5 in do_call_core
    (kwdict={}, callargs=(b'P\x01\x00\x00\x00\x00\x00P\xc4\t\x84opus\x80l\x89timestampA\x00\x00\x00\x00\xba\xc5j`\x88duration@\x011-\x00\x82ts@\x03\xf9~\xee\x87latency>\x7f\x84time@\x03\xf9\x7fm\x88sequence\x00',), func=<built-in method send of socket object at remote 0x7fff7532e830>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:4641
#8  _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:3191
#9  0x00007ffff7bb3d90 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='untilConcludes', qualname='untilConcludes') at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:3930
#10 0x00007ffff7bb543e in _PyFunction_FastCallDict (func=<optimized out>, args=0x7fff7548b248, nargs=<optimized out>, kwargs=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:367
#11 0x00007ffff7bfe214 in do_call_core
    (kwdict=0x0, callargs=(<method at remote 0x7fffdc88a960>, <method at remote 0x7fffc49de1e0>, <built-in method send of socket object at remote 0x7fff7532e830>, b'P\x01\x00\x00\x00\x00\x00P\xc4\t\x84opus\x80l\x89timestampA\x00\x00\x00\x00\xba\xc5j`\x88duration@\x011-\x00\x82ts@\x03\xf9~\xee\x87latency>\x7f\x84time@\x03\xf9\x7fm\x88sequence\x00'), func=<function at remote 0x7fffe8ff7200>)
    at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:4645
#12 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:3191
#13 0x00007ffff7bb3d90 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='untilConcludes', qualname='Connection.untilConcludes') at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:3930
#14 0x00007ffff7bb543e in _PyFunction_FastCallDict (func=<optimized out>, args=0x7fffc037d4b0, nargs=<optimized out>, kwargs=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:367
#15 0x00007ffff7b88e26 in _PyObject_Call_Prepend
    (callable=<function at remote 0x7fffe8ff7b00>, obj=<optimized out>, args=(<built-in method send of socket object at remote 0x7fff7532e830>, b'P\x01\x00\x00\x00\x00\x00P\xc4\t\x84opus\x80l\x89timestampA\x00\x00\x00\x00\xba\xc5j`\x88duration@\x011-\x00\x82ts@\x03\xf9~\xee\x87latency>\x7f\x84time@\x03\xf9\x7fm\x88sequence\x00'), kwargs=0x0) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:908
#16 0x00007ffff7bb597e in PyObject_Call (callable=<method at remote 0x7fff766e6cd0>, args=<optimized out>, kwargs=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:245
#17 0x00007ffff7bfe214 in do_call_core
    (kwdict=0x0, callargs=(<built-in method send of socket object at remote 0x7fff7532e830>, b'P\x01\x00\x00\x00\x00\x00P\xc4\t\x84opus\x80l\x89timestampA\x00\x00\x00\x00\xba\xc5j`\x88duration@\x011-\x00\x82ts@\x03\xf9~\xee\x87latency>\x7f\x84time@\x03\xf9\x7fm\x88sequence\x00'), func=<method at remote 0x7fff766e6cd0>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:4645
#18 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:3191
#19 0x00007ffff7bb3d90 in _PyEval_EvalCodeWithName
    (_co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x0, kwargs=0x7fffdc9438e8, kwcount=<optimized out>, kwstep=1, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name='_write', qualname='Connection._write') at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:3930
#20 0x00007ffff7bb4da2 in _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x7fffdc9438d0, nargs=3, kwnames=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:433
#21 0x00007ffff7bc63ef in call_function (pp_stack=0x7fffc037d8d0, oparg=<optimized out>, kwnames=0x0) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:4616
#22 0x00007ffff7bfcb0c in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:3110
#23 0x00007ffff7bb4c02 in function_code_fastcall (globals=<optimized out>, nargs=2, args=<optimized out>, co=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:408
#24 _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x7fffde62c558, nargs=2, kwnames=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:408
#25 0x00007ffff7bc63ef in call_function (pp_stack=0x7fffc037dac0, oparg=<optimized out>, kwnames=0x0) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:4616
#26 0x00007ffff7bfcb0c in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:3110
#27 0x00007ffff7bb4c02 in function_code_fastcall (globals=<optimized out>, nargs=3, args=<optimized out>, co=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:408
#28 _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x7fff755c9bb0, nargs=3, kwnames=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:408
#29 0x00007ffff7bc63ef in call_function (pp_stack=0x7fffc037dcb0, oparg=<optimized out>, kwnames=0x0) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:4616
#30 0x00007ffff7bfcb0c in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:3110
#31 0x00007ffff7bb4c02 in function_code_fastcall (globals=<optimized out>, nargs=4, args=<optimized out>, co=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:408
#32 _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x7fff9c0034b0, nargs=4, kwnames=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:408
#33 0x00007ffff7bc63ef in call_function (pp_stack=0x7fffc037dea0, oparg=<optimized out>, kwnames=0x0) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:4616
#34 0x00007ffff7bfcb0c in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:3110
#35 0x00007ffff7bb3d90 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=0x7fffe5e56de8, defcount=5, kwdefs=0x0, closure=0x0, name='write_items', qualname='Protocol.write_items') at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:3930
--Type <RET> for more, q to quit, c to continue without paging--
#36 0x00007ffff7bb543e in _PyFunction_FastCallDict (func=<optimized out>, args=0x7fff7552ea30, nargs=<optimized out>, kwargs=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:367
#37 0x00007ffff7b88e94 in _PyObject_Call_Prepend
    (callable=<function at remote 0x7fffe5ddeb90>, obj=<Protocol(timeout_add=<function at remote 0x7fffe7855c20>, idle_add=<function at remote 0x7fffe7855170>, source_remove=<gi.FunctionInfo at remote 0x7fffe7737930>, read_buffer_size=65536, hangup_delay=1000, _conn=None, _process_packet_cb=<method at remote 0x7fffdc8333c0>, make_chunk_header=<method at remote 0x7fffdf7fcbe0>, make_frame_header=<method at remote 0x7fffe40156e0>, _write_queue=<Queue(maxsize=0, queue=<collections.deque at remote 0x7fff7553bde0>, mutex=<_thread.lock at remote 0x7fff75320030>, not_empty=<Condition(_lock=<_thread.lock at remote 0x7fff75320030>, acquire=<built-in method acquire of _thread.lock object at remote 0x7fff75320030>, release=<built-in method release of _thread.lock object at remote 0x7fff75320030>, _waiters=<collections.deque at remote 0x7fff7532ebb0>) at remote 0x7fffde03fdd0>, not_full=<Condition(_lock=<_thread.lock at remote 0x7fff75320030>, acquire=<built-in method acquire of _thread.lock object at remote 0x7fff75320030>, release=<built-in method release of _thread.lock o...(truncated), args=([b'P\x00\x00\x02\x00\x00\x00\xa0\xfc\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'P\x01\x00\x00\x00\x00\x00P\xc4\t\x84opus\x80l\x89timestampA\x00\x00\x00\x00\xba\xc5j`\x88duration@\x011-\x00\x82ts@\x03\xf9~\xee\x87latency>\x7f\x84time@\x03\xf9\x7fm\x88sequence\x00'], None, None, None, False, True), kwargs=0x0) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:908
#38 0x00007ffff7bb597e in PyObject_Call (callable=<method at remote 0x7fffc49de640>, args=<optimized out>, kwargs=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:245
#39 0x00007ffff7bfe214 in do_call_core
    (kwdict=0x0, callargs=([b'P\x00\x00\x02\x00\x00\x00\xa0\xfc\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', b'P\x01\x00\x00\x00\x00\x00P\xc4\t\x84opus\x80l\x89timestampA\x00\x00\x00\x00\xba\xc5j`\x88duration@\x011-\x00\x82ts@\x03\xf9~\xee\x87latency>\x7f\x84time@\x03\xf9\x7fm\x88sequence\x00'], None, None, None, False, True), func=<method at remote 0x7fffc49de640>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:4645
#40 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:3191
#41 0x00007ffff7bb4c02 in function_code_fastcall (globals=<optimized out>, nargs=1, args=<optimized out>, co=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:408
#42 _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x7fff9c00a378, nargs=1, kwnames=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:408
#43 0x00007ffff7bc63ef in call_function (pp_stack=0x7fffc037e428, oparg=<optimized out>, kwnames=0x0) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:4616
#44 0x00007ffff7bfca68 in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:3124
#45 0x00007ffff7bb4c02 in function_code_fastcall (globals=<optimized out>, nargs=3, args=<optimized out>, co=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:408
#46 _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x7fff60058f98, nargs=3, kwnames=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:408
#47 0x00007ffff7bc63ef in call_function (pp_stack=0x7fffc037e610, oparg=<optimized out>, kwnames=0x0) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:4616
#48 0x00007ffff7bfcb0c in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:3110
#49 0x00007ffff7bb526a in function_code_fastcall (globals=<optimized out>, nargs=1, args=<optimized out>, co=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:322
#50 _PyFunction_FastCallDict (func=<optimized out>, args=0x7fffc037e770, nargs=1, kwargs=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:322
#51 0x00007ffff7b88e26 in _PyObject_Call_Prepend (callable=<function at remote 0x7fffe5ddea70>, obj=<optimized out>, args=(), kwargs={}) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:908
#52 0x00007ffff7bb597e in PyObject_Call (callable=<method at remote 0x7fffdf6db230>, args=<optimized out>, kwargs=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:245
#53 0x00007ffff7bfe214 in do_call_core (kwdict={}, callargs=(), func=<method at remote 0x7fffdf6db230>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:4645
#54 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:3191
#55 0x00007ffff7bb4c02 in function_code_fastcall (globals=<optimized out>, nargs=1, args=<optimized out>, co=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:408
#56 _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x7fff780035c0, nargs=1, kwnames=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:408
#57 0x00007ffff7bc63ef in call_function (pp_stack=0x7fffc037eaa0, oparg=<optimized out>, kwnames=0x0) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:4616
#58 0x00007ffff7bfcb0c in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:3110
#59 0x00007ffff7bb4c02 in function_code_fastcall (globals=<optimized out>, nargs=1, args=<optimized out>, co=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:408
#60 _PyFunction_FastCallKeywords (func=<optimized out>, stack=0x7fffcc064298, nargs=1, kwnames=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:408
#61 0x00007ffff7bc63ef in call_function (pp_stack=0x7fffc037ec90, oparg=<optimized out>, kwnames=0x0) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:4616
#62 0x00007ffff7bfcb0c in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/ceval.c:3110
#63 0x00007ffff7bb526a in function_code_fastcall (globals=<optimized out>, nargs=1, args=<optimized out>, co=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:322
#64 _PyFunction_FastCallDict (func=<optimized out>, args=0x7fffc037edf0, nargs=1, kwargs=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:322
#65 0x00007ffff7b88e26 in _PyObject_Call_Prepend (callable=<function at remote 0x7fffea5e3ef0>, obj=<optimized out>, args=(), kwargs=0x0) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:908
#66 0x00007ffff7bb597e in PyObject_Call (callable=<method at remote 0x7fffdc832af0>, args=<optimized out>, kwargs=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:245
#67 0x00007ffff7c8bfc6 in t_bootstrap (boot_raw=boot_raw@entry=0x7fff7549e7e0) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Modules/_threadmodule.c:994
#68 0x00007ffff7c0cb84 in pythread_wrapper (arg=<optimized out>) at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Python/thread_pthread.h:174
#69 0x00007ffff7a6c4e2 in start_thread () at /lib64/libpthread.so.0
#70 0x00007ffff7ed1643 in clone () at /lib64/libc.so.6
(gdb) py-bt
Traceback (most recent call first):
  File "/usr/lib64/python3.7/site-packages/xpra/net/bytestreams.py", line 100, in untilConcludes
    return f(*a, **kw)
  File "/usr/lib64/python3.7/site-packages/xpra/net/bytestreams.py", line 168, in untilConcludes
    return untilConcludes(self.is_active, self.can_retry, *args)
  File "/usr/lib64/python3.7/site-packages/xpra/net/bytestreams.py", line 176, in _write
    w = self.untilConcludes(*args)
  File "/usr/lib64/python3.7/site-packages/xpra/net/bytestreams.py", line 323, in write
    return self._write(self._socket.send, buf)
  File "/usr/lib64/python3.7/site-packages/xpra/net/protocol.py", line 710, in con_write
    return con.write(buf)
  File "/usr/lib64/python3.7/site-packages/xpra/net/protocol.py", line 699, in write_buffers
    written = self.con_write(con, buf)
  File "/usr/lib64/python3.7/site-packages/xpra/net/protocol.py", line 680, in write_items
    self.write_buffers(buf_data, fail_cb, synchronous)
  File "/usr/lib64/python3.7/site-packages/xpra/net/protocol.py", line 664, in _write
    return self.write_items(*items)
  File "/usr/lib64/python3.7/site-packages/xpra/net/protocol.py", line 637, in _io_thread_loop
    while not self._closed and callback():
  File "/usr/lib64/python3.7/site-packages/xpra/net/protocol.py", line 656, in _write_thread_loop
    self._io_thread_loop("write", self._write)
  File "/usr/lib64/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/usr/lib64/python3.7/threading.py", line 890, in _bootstrap
    self._bootstrap_inner()

The stacktrace shows that the data being sent is audio data:

(callable=<function at remote 0x7fffe8ff7b00>, obj=<optimized out>, args=(<built-in method send of socket object at remote 0x7fff7532e830>, \
b'P\x01\x00\x00\x00\x00\x00P\xc4\t\x84opus\x80l\x89timestampA\x00\x00\x00\x00\xba\xc5j`\x88duration@\x011-\x00\x82ts@\x03\xf9~\xee\x87latency>\x7f\x84time@\x03\xf9\x7fm\x88sequence\x00'), kwargs=0x0) \
 at /usr/src/debug/python3-3.7.5-1.fc31.x86_64/Objects/call.c:908

Maybe we should be handling the SIGPIPE gracefully here? How?



Thu, 07 Nov 2019 07:54:15 GMT - Antoine Martin: status, description changed


Tue, 03 Dec 2019 13:11:28 GMT - Antoine Martin:

Reproduced a few times today by killing a macos client. It really does look like the audio subprocess getting killed is the cause as gdb caught the SIGPIPE shortly after this:

sound source using 'opus' audio codec
client   3 @03.751 got signal SIGINT
client   3 @03.751 exiting

And an audio packet was in the backtrace data. Race with audio startup?


Tue, 03 Dec 2019 17:35:23 GMT - Antoine Martin:

See also #2485


Thu, 12 Dec 2019 03:46:01 GMT - Antoine Martin:

New datapoint: also occurs with python2 servers.

Maybe a library we use overrides the default SIGPIPE behaviour?


Mon, 24 Feb 2020 15:25:25 GMT - Antoine Martin:

Could this be related to #2592?


Thu, 26 Mar 2020 10:19:01 GMT - Antoine Martin: status changed; resolution set

Not seen lately.


Sat, 23 Jan 2021 05:52:20 GMT - migration script:

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