fix(main): the blocker of agc_driver_pipelined_indirect_draw outlives its test #9647

Merged
adriadam10 merged 1 commit from upstream-pr/9647 into main 2026-10-22 06:01:20 +00:00
adriadam10 commented 2026-10-22 06:01:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-22T06:01:12Z.


What

Main's push build 39725502001 (head da54c652e3, #9433) failed agc_driver_pipelined_indirect_draw with "the queue worker and the draw pipeline deadlocked". The test's Blocker queued a lambda capturing this (a stack object) on the draw pipeline. Finish() of the first test can return before that lambda has run, so it ran during the second test through a dangling pointer, read a release that was never set and held the committer forever. #8807 (frame dump writer) is not related; the test's timing was never robust.

Fix: the blocker state is shared with the lambda and each test waits for the blocker to finish; the fixed 500 ms sleeps wait for the pipeline items and for the draw's drain request instead. Test-only change.

Tested

Linux, lavapipe (CI's driver, no /dev/udmabuf), agc_driver_pipelined_indirect_draw_tests. Reproduced with 12 processes pinned to 2 cores: before, ~17% of runs failed (stack dump of the hung run showed the committer inside the stale blocker); after, 0 hangs in 72 runs, 2 runs hit the pre-existing "drained" assertion under that starvation. ctest -R '^agc_driver_pipelined_indirect_draw$' passes unloaded.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; silent stubs are listed
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (none)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: lavapipe (llvmpipe LLVM 20.1.2), Linux
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4962862051 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9647). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-22T06:01:12Z. --- ### What Main's push build 39725502001 (head da54c652e3, #9433) failed `agc_driver_pipelined_indirect_draw` with "the queue worker and the draw pipeline deadlocked". The test's `Blocker` queued a lambda capturing `this` (a stack object) on the draw pipeline. `Finish()` of the first test can return before that lambda has run, so it ran during the second test through a dangling pointer, read a `release` that was never set and held the committer forever. #8807 (frame dump writer) is not related; the test's timing was never robust. Fix: the blocker state is shared with the lambda and each test waits for the blocker to finish; the fixed 500 ms sleeps wait for the pipeline items and for the draw's drain request instead. Test-only change. ### Tested Linux, lavapipe (CI's driver, no `/dev/udmabuf`), `agc_driver_pipelined_indirect_draw_tests`. Reproduced with 12 processes pinned to 2 cores: before, ~17% of runs failed (stack dump of the hung run showed the committer inside the stale blocker); after, 0 hangs in 72 runs, 2 runs hit the pre-existing "drained" assertion under that starvation. `ctest -R '^agc_driver_pipelined_indirect_draw$'` passes unloaded. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw; silent stubs are listed - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source (none) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: lavapipe (llvmpipe LLVM 20.1.2), Linux - [x] AI-assisted: yes
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!9647
No description provided.