Xpra: Ticket #938: mmap error when the server stops abruptly with lots of traffic

Triggered this a few times by connecting to a local X11 shadow server at a high resolution:

2015-08-09 19:32:19,397 error processing damage data: expected a single-segment buffer object
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/xpra/server/source.py", line 1841, in encode_loop
  File "/usr/lib64/python2.7/site-packages/xpra/server/window_source.py", line 1323, in make_data_packet_cb
    packet = self.make_data_packet(damage_time, process_damage_time, wid, image, coding, sequence, options, flush)
  File "/usr/lib64/python2.7/site-packages/xpra/server/window_source.py", line 1616, in make_data_packet
    mmap_data = mmap_send(self._mmap, self._mmap_size, image, self.rgb_formats, self.supports_transparency)
  File "/usr/lib64/python2.7/site-packages/xpra/server/picture_encode.py", line 270, in mmap_send
    mmap_data, mmap_free_size = mmap_write(mmap, mmap_size, data)
  File "/usr/lib64/python2.7/site-packages/xpra/net/mmap_pipe.py", line 177, in mmap_write
    mmap_data_start = int_from_buffer(mmap_area, 0)
  File "/usr/lib64/python2.7/site-packages/xpra/net/mmap_pipe.py", line 136, in int_from_buffer
    return ctypes.c_uint32.from_buffer(mmap_area, pos)      #@UndefinedVariable
TypeError: expected a single-segment buffer object

This is equivalent to a dead socket, and should be treated as such, skipping the stacktrace.

Sun, 09 Aug 2015 13:46:11 GMT - Antoine Martin: status, summary changed; resolution set

Was fairly easy to trigger using control-c to stop the server under high load.

Fix in r10244, will backport.

Sat, 23 Jan 2021 05:10:19 GMT - migration script:

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