GPU frame events: concurrent FLIP waits can consume the same tick #244
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork#244
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Bennet0k on GitHub · 2026-11-24 22:59 UTC · original
Source
Two waits can pick the same tick before either has advanced
LAST. Both returnS_OKeven though only one tick was consumed. A Rust harness running the frame wait logic from2119b0eused a barrier to start twoFLIPwaits and observed two successful calls withLAST == 1. No GPU or game was needed.Proposed fix. Use the previous value returned from
fetch_maxto decide whether the waiter claimed the tick. If another waiter consumed it first, recompute the wait against the original deadline and retry. The standalone regression fails on the original logic and passes with this change. Keep a separate timeout regression to ensure a retry does not extend the caller's timeout.Found in an AI-assisted audit of
2119b0e.github-bot referenced this issue2026-11-26 03:39:50 +00:00
@avt0m4t48 on GitHub · 2026-11-25 14:44 UTC · original
I compared current main
0b0074e, #281 at105ccf4, and #325 atb8d6426with the same Linux Rust harness. A test-only barrier immediately beforefetch_maxmakes both waiters reach the claim for tick 1 before either can advance it. The harness records the requested tick, the old value returned by the atomic, and both HRESULTs.The two candidates agree on these controls. #281 currently merges cleanly and retains the newer frame-log instrumentation. These are synthetic CPU tests. #978 independently addresses the sequential test's assumptions about scheduling delays.
AI-assisted using Codex.