xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 8 years ago

Closed 8 years ago

Last modified 17 months 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:


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
  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 (3)

comment:1 Changed 8 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 8 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 8 years ago by Antoine Martin (previous) (diff)

comment:3 Changed 17 months ago by migration script

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

Note: See TracTickets for help on using tickets.