Comment 69 for bug 1751252

Revision history for this message
In , Daniel van Vugt (vanvugt) wrote :

> 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.