loader/dri3: Check for window destruction in dri3_wait_for_event_locked
If the underlying X11 window gets destroyed, the event we're waiting for may never be delivered, in which case xcb_wait_for_special_event would hang indefinitely.
Solution:
- Use xcb_poll_for_special_event to check if an event has arrived yet.
- If not, Wait up to ~1s for XCB's file descriptor to become readable; if it does, go back to step 1.
- If the file descriptor didn't become readable, make a round-trip to the X server to check that the window still exists. Go back to step 1 if it does, otherwise bail.
Also add an early bail-out when it's known that the window was destroyed.
Closes: #116 (closed)
Merge request reports
Activity
mentioned in issue #116 (closed)
- Resolved by Michel Dänzer
d87aee33 depends on a5994f80, so with the
Fixes:
on the former you need aCc: mesa-stable
on the latter, otherwise theFixes:
backport will succeed and break the build.
Shouldn't cabcd2dc be backported as well?(I had a look and it looks good to me, didn't notice anything obviously wrong, but I don't know enough to properly review.)
mentioned in issue #3162 (closed)
- Resolved by Michel Dänzer
I tested it, it fixes #3162 (closed)/#116 (closed) for me. VLC takes a couple seconds to fully close.
added 882 commits
-
5fd9d013...7a5e6fd2 - 879 commits from branch
mesa:master
- 215b2fac - loader/dri3: Add dri3_wait_for_event_locked full_sequence out parameter
- 935844a4 - loader/dri3: Use dri3_wait_for_event_locked in loader_dri3_wait_for_msc
- f6c7e39e - loader/dri3: Check for window destruction in dri3_wait_for_event_locked
Toggle commit list-
5fd9d013...7a5e6fd2 - 879 commits from branch
assigned to @marge-bot
mentioned in commit daenzer/mesa@b5622bf2
mentioned in commit daenzer/mesa@7a03d708
mentioned in commit daenzer/mesa@878b7c0a
added 8 commits
-
f6c7e39e...622c5489 - 5 commits from branch
mesa:master
- b5622bf2 - loader/dri3: Add dri3_wait_for_event_locked full_sequence out parameter
- 7a03d708 - loader/dri3: Use dri3_wait_for_event_locked in loader_dri3_wait_for_msc
- 878b7c0a - loader/dri3: Check for window destruction in dri3_wait_for_event_locked
Toggle commit list-
f6c7e39e...622c5489 - 5 commits from branch
assigned to @daenzer and unassigned @marge-bot
assigned to @marge-bot and unassigned @daenzer
mentioned in commit daenzer/mesa@ee779517
mentioned in commit daenzer/mesa@7c226116
mentioned in commit daenzer/mesa@d7d76878
added 7 commits
-
878b7c0a...08c39a8a - 4 commits from branch
mesa:master
- ee779517 - loader/dri3: Add dri3_wait_for_event_locked full_sequence out parameter
- 7c226116 - loader/dri3: Use dri3_wait_for_event_locked in loader_dri3_wait_for_msc
- d7d76878 - loader/dri3: Check for window destruction in dri3_wait_for_event_locked
Toggle commit list-
878b7c0a...08c39a8a - 4 commits from branch
mentioned in commit e6091908
mentioned in commit a7c5c983
mentioned in commit 195dd044
mentioned in issue #3214 (closed)
I'm afraid not. That sounds rather like a kernel level issue.
Note that the last commit needs to be reverted due to #3214 (closed) .
mentioned in issue xorg/lib/libxcb#38
mentioned in merge request xorg/lib/libxcb!9
mentioned in merge request !13564 (merged)