xpra icon
Bug tracker and wiki

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#554 closed defect (fixed)

mmap error when closing window whilst encoding pixels

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: critical Milestone: 0.12
Component: server Version: 0.12.x
Keywords: Cc:

Description

Caught this during testing:

Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/xpra/server/source.py", line 1574, in data_to_packet
    encode_and_queue()
  File "/usr/lib64/python2.7/site-packages/xpra/server/window_source.py", line 886, in make_data_packet_cb
    packet = self.make_data_packet(*data)
  File "/usr/lib64/python2.7/site-packages/xpra/server/window_source.py", line 1066, 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 322, 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 162, in mmap_write
    mmap_data_start = ctypes.c_uint.from_buffer(mmap_area, 0)
TypeError: expected a single-segment buffer object

Change History (2)

comment:1 Changed 6 years ago by Antoine Martin

Milestone: 0.12
Resolution: fixed
Status: newclosed

Was caused by the new more thorough window cleanup code added in r5650, fixed in r6011.

comment:2 Changed 6 years ago by Antoine Martin

Another related race fixed in r6024.

Sending via mmap is done in two parts:

  • mmap_send which tries to populate the mmap area (and can fail)
  • mmap_encode which creates the mostly empty packet data referencing the data position within the mmap area

This problem could also have occurred if the mmap references got cleaned up in between the two calls. This change also makes r6011 redundant and it is now unapplied in r6028.

But then.. I found that r6024 was wrong, so r6035 fixes that!

Backports for v0.12.x in: r6027 (+fix in r6036)

Last edited 6 years ago by Antoine Martin (previous) (diff)
Note: See TracTickets for help on using tickets.