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