wayland: avoid stale wl_buffer destroy after unmatched release#2102
Open
awsms wants to merge 1 commit intoValveSoftware:masterfrom
Open
wayland: avoid stale wl_buffer destroy after unmatched release#2102awsms wants to merge 1 commit intoValveSoftware:masterfrom
awsms wants to merge 1 commit intoValveSoftware:masterfrom
Conversation
Some compositors (observed on Hyprland) can send `wl_buffer.release` for a buffer that gamescope never marked as compositor-acquired, which puts the buffer into a release-without-acquire state. In that state, sending `wl_buffer.destroy` later can target a stale server-side object id and trigger a protocol error (e.g. "invalid object 49"), aborting nested `--backend wayland` sessions. Track this release-without-acquire condition in CWaylandFb and, in that case, destroy only the local proxy with `wl_proxy_destroy` instead of emitting `wl_buffer.destroy`. Normal buffers keep the existing `wl_buffer_destroy` path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some compositors (observed on Hyprland) can send
wl_buffer.releasefor a buffer that gamescope never marked as compositor-acquired, which puts the buffer into a release-without-acquire state. In that state, sendingwl_buffer.destroylater can target a stale server-side object id and trigger a protocol error (e.g. "invalid object 49"), aborting nested--backend waylandsessions.Track this release-without-acquire condition in CWaylandFb and, in that case, destroy only the local proxy with
wl_proxy_destroyinstead of emittingwl_buffer.destroy.Normal buffers keep the existing
wl_buffer_destroypath.edit: can't find the issue number anymore, but this fixes
--backend waylandbeing completely unusable on some setups, and forcing the use of--backend sdl.