[Wayland-bugs] [Bug 75303] Protocol: wl_buffer.release is racy

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Feb 28 09:15:31 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=75303

--- Comment #1 from Jason Ekstrand <jason at jlekstrand.net> ---
Pekka already noted my suggestion of reference counting.  However, this raises
the issue of compatibility between clients and servers.  In particular, if
clients start to implement buffer reference counting, then we need some sort of
a guarantee by the server that it will aid in the reference counting. 
Otherwise, in the scenario Pekka describes, the client will wait for two
releases and may only get one
It's worth noting that the usual case of waiting for wl_buffer.release before
attaching again is the same regardless of reference counting because it means
the server has at most one reference.  The issue comes in the other cases where
the server may have more references.

One option to solve this would be to add a comment to wl_surface.attach and
bump the wl_surface version.  Technically, one would like this to be part of
wl_buffer.  However, wl_buffer is typically implemented by either libwayland's
SHM implementation or the system EGL implementation and those never touch
wl_buffer.release except for EGL receiving client-side.  There is a slight
issue with EGL not knowing the wl_surface version, however EGL usually has one
buffer pool per surface and commits one buffer at a time.  I think we'll
probably be ok here.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-bugs/attachments/20140228/7b5403a4/attachment.html>


More information about the Wayland-bugs mailing list