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

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Sep 17 03:53:13 PDT 2015


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

--- Comment #7 from Pekka Paalanen <ppaalanen at gmail.com> ---
(In reply to Jonas Ã…dahl from comment #6)
> Why can't we just let wl_buffer.release simply be a notification about the
> buffer being reusable

Because it has exactly the race explained in the description of this bug. This
example applies particular to Weston with gl-renderer and a client using
wl_shm.

Case A:

client                messagebuffer              server

surface1.attach(B) ->
surface1.commit    ->
                                        -> surface1.attach(B)
                                        -> surface1.commit
surface2.attach(B) ->
surface2.commit    ->
                                        -> surface2.attach(B)
                                        -> surface2.commit
                                           repaint, GL texture damage flush
                                        <- B.release
B.release          <-

B is free.


Case B:

surface1.attach(B) ->
surface1.commit    ->
                                        -> surface1.attach(B)
                                        -> surface1.commit
                                           repaint, GL texture damage flush
                                        <- B.release
surface2.attach(B) ->
surface2.commit    ->
                                        -> surface2.attach(B)
                                        -> surface2.commit
B.release          <-

B is busy on surface2.


>From the client point of view, cases A and B are equivalent, yet the buffer is
free in one and busy in the other.

-- 
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/20150917/e7bc0859/attachment.html>


More information about the wayland-bugs mailing list