fix(agc): fail a failed submission's flips before reporting the failure #2246
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2246"
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?
Imported from boykopovar/AnyPS5. Originally posted by zmeizy on 2026-10-09T13:06:53Z.
What
When a queue worker fails,
Driver::runcallsReportFailure(error)and only then callsFailon the flips of the submission it was executing.ReportFailurepublishes the failure and wakes the idle waiters, so a thread returning fromAgcDriverWaitIdlewith the failure can still see one of those flips neither completed nor failed.agc_driver_fliphits this intestFailure:failed flip was completed successfully.This fails the executing submission's flips first, as
ReportFailurealready does for the pending submissions it drops before it notifies. One line moved inQueueWorker.cpp.The only
IFlipRequest::Failoutside the tests (VideoOut'sFlipRequest::Fail) takes only its own config mutex and does not call into the driver, and the onlyAgcDriverWaitIdlecall outside the guest is the VideoOut constructor, before its threads start, so failing the flips first cannot deadlock.Tested
Ubuntu 24.04, GCC 13.3, lavapipe (Mesa 25.2.8, LLVM 20), 4 cores.
agc_driver_flipwith four copies running at once: 2 of 240 runs failed before the change; 0 of 480 after it ona8b032b2and 0 of 480 on745b775e.ReportFailureand the flips'Fail, 5 of 5 runs fail withfailed flip was completed successfully.ctest --parallel 4 --timeout 120ond70b8998with this change and the two other test fixes applied: 513 tests, 0 failures.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt (n/a).mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
https://claude.ai/code/session_01Ha6Tsy62AFUyp9a5Mf7vjA
Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T15:24:56Z.
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
15a87789, merged ontomaind70b8998in one build with 33 other AGC/shader PRs that had no Windows run.PATHsetup.No title was run.
🤖 Addressed by Claude Code