[cairo-bugs] [Bug 98883] BadAccess errors in ShmAttach due to thread races with XNextRequest() usage in cairo-xlib-surface-shm.c

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jul 26 02:40:07 UTC 2018


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

--- Comment #18 from Daniel van Vugt <daniel.van.vugt at canonical.com> ---
> XShmAttach returns True to indicate it successfully queued the request.
> It does not fail to queue the request.
> 
> If the server fails to process the request successfully, then it sends an
> error response.
> 
> It would be helpful to understand why you are expecting an error response.

Essentially we have the Xorg server process having its privileges demoted and
re-promoted. If the XShmAttach request comes in while it is demoted then it
can't complete the request and returns BadAccess to the client. The client
initiated the request from _cairo_xlib_shm_pool_create but has since
(asynchronously) moved on to other code. So it crashes in an unpredictable
location when the BadAccess eventually comes in from the server.

I am happy with your explanation that "XShmAttach returns True to indicate it
successfully queued the request". However I don't believe the same applies to
_cairo_xlib_shm_pool_create, so I think any final fix would have to happen in
that function still.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo-bugs/attachments/20180726/224199df/attachment-0001.html>


More information about the cairo-bugs mailing list