AGC: WAIT_REG_MEM gives up after 1 s while the awaited label is still pending on another queue, so gated work reads too early #2832

Closed
opened 2026-10-10 16:15:39 +00:00 by Silverash-i8 · 13 comments
Silverash-i8 commented 2026-10-10 16:15:39 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Silverash-i8 on 2026-10-10T16:15:39Z.


A WAIT_REG_MEM gives up after APS5_GPU_WAIT_TIMEOUT_MS (1000 ms by default) and lets its queue carry on, even when the awaited label is a recorded store on another queue that the GPU simply hasn't reached yet. When the producing work takes longer than the timeout, the gated work runs early and reads what it was supposed to wait for. agc_driver_gated_dispatch_capture catches exactly that, so it fails whenever its producer spin outlasts the timeout, which on a slow GPU under ctest --parallel happens on its own.

Setup: Windows 11 Home (26200), WinLibs GCC 15.2.0 r7, Release, main 57f96fd2, APS5_NO_PIPELINE_LTO=1 (#2777 is a separate issue). Intel Graphics in a Core Ultra 9 275HX (Arrow Lake, driver 32.0.101.8991) and RTX 5060 Laptop GPU (32.0.16.1742).

Deterministic repro

Shortening the timeout makes it fail every time, on both GPUs, with the test run on its own:

GPU APS5_GPU_WAIT_TIMEOUT_MS Result (3 runs each)
Arrow Lake iGPU 100 fails 3/3
Arrow Lake iGPU 1000 (default) passes 3/3
RTX 5060 100 fails 3/3
RTX 5060 1000 (default) passes 3/3

With 100 ms the test reports a dispatch behind a cross-queue WAIT_REG_MEM read its table before the producer's label reached memory, so it missed the table the CPU filled after submitting, after:

[gpu] queue 0x20 WAIT_REG_MEM at 0x7ff723a12100 timed out after 100ms (function 3 ref 0x1 mask 0xffffffff value 0x0)
[gpu]   earlier write by queue 0x28 opcode 0x37 at 0x7ff723a12100+0x4

So the driver does know a WRITE_DATA to that address is recorded on queue 0x28. It just stops waiting for it.

Under load

With the default timeout, the test failed in two of my ctest --parallel 6 runs on the iGPU and passes 10/10 on its own. Both failures start the same way, with the 1000 ms timeout above and then queue 0x28 dropped 1 queued labels: their record failed. One ended at the test's 10 s limit (the gated submissions did not finish, then VK_ERROR_DEVICE_LOST in teardown); the other died at 3.9 s with 0xc0000374 (heap corruption). I haven't traced the heap corruption, so I'm only reporting that it follows the same timeout.

Question

The timeout in Driver::waitMemory (WaitMemory.cpp, if (warned) return;) looks deliberate, to keep a title moving when a label never comes. But console hardware waits indefinitely here, so giving up while a matching store from another queue is still pending turns a slow frame into wrong results. Would it make sense to keep waiting, or reset start, while the awaited range has a recorded store from another queue that hasn't completed, and only give up when nothing pending can satisfy it? I'm happy to try that on a branch if it's the direction you'd want, but it's core synchronisation, so I'd rather ask first.

AI-assisted (Claude Code); every number above is from runs on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5793030746 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2832). Originally posted by [Silverash-i8](https://github.com/Silverash-i8) on 2026-10-10T16:15:39Z. --- A `WAIT_REG_MEM` gives up after `APS5_GPU_WAIT_TIMEOUT_MS` (1000 ms by default) and lets its queue carry on, even when the awaited label is a recorded store on another queue that the GPU simply hasn't reached yet. When the producing work takes longer than the timeout, the gated work runs early and reads what it was supposed to wait for. `agc_driver_gated_dispatch_capture` catches exactly that, so it fails whenever its producer spin outlasts the timeout, which on a slow GPU under `ctest --parallel` happens on its own. **Setup:** Windows 11 Home (26200), WinLibs GCC 15.2.0 r7, Release, `main` 57f96fd2, `APS5_NO_PIPELINE_LTO=1` (#2777 is a separate issue). Intel Graphics in a Core Ultra 9 275HX (Arrow Lake, driver 32.0.101.8991) and RTX 5060 Laptop GPU (32.0.16.1742). ### Deterministic repro Shortening the timeout makes it fail every time, on both GPUs, with the test run on its own: | GPU | `APS5_GPU_WAIT_TIMEOUT_MS` | Result (3 runs each) | |---|---|---| | Arrow Lake iGPU | 100 | fails 3/3 | | Arrow Lake iGPU | 1000 (default) | passes 3/3 | | RTX 5060 | 100 | fails 3/3 | | RTX 5060 | 1000 (default) | passes 3/3 | With 100 ms the test reports `a dispatch behind a cross-queue WAIT_REG_MEM read its table before the producer's label reached memory, so it missed the table the CPU filled after submitting`, after: ``` [gpu] queue 0x20 WAIT_REG_MEM at 0x7ff723a12100 timed out after 100ms (function 3 ref 0x1 mask 0xffffffff value 0x0) [gpu] earlier write by queue 0x28 opcode 0x37 at 0x7ff723a12100+0x4 ``` So the driver does know a `WRITE_DATA` to that address is recorded on queue 0x28. It just stops waiting for it. ### Under load With the default timeout, the test failed in two of my `ctest --parallel 6` runs on the iGPU and passes 10/10 on its own. Both failures start the same way, with the 1000 ms timeout above and then `queue 0x28 dropped 1 queued labels: their record failed`. One ended at the test's 10 s limit (`the gated submissions did not finish`, then `VK_ERROR_DEVICE_LOST` in teardown); the other died at 3.9 s with `0xc0000374` (heap corruption). I haven't traced the heap corruption, so I'm only reporting that it follows the same timeout. ### Question The timeout in `Driver::waitMemory` (`WaitMemory.cpp`, `if (warned) return;`) looks deliberate, to keep a title moving when a label never comes. But console hardware waits indefinitely here, so giving up while a matching store from another queue is still pending turns a slow frame into wrong results. Would it make sense to keep waiting, or reset `start`, while the awaited range has a recorded store from another queue that hasn't completed, and only give up when nothing pending can satisfy it? I'm happy to try that on a branch if it's the direction you'd want, but it's core synchronisation, so I'd rather ask first. AI-assisted (Claude Code); every number above is from runs on this machine.
Zurisen commented 2026-10-10 17:51:00 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Zurisen on 2026-10-10T17:51:00Z.


RTX 4070 data, same build setup as yours (Windows 11 Home 26200, WinLibs GCC 15.2.0 r7, Release, main 57f96fd2), RTX 4070 Laptop GPU (Ada, driver 32.0.15.9636), without APS5_NO_PIPELINE_LTO. agc_driver_gated_dispatch_capture run on its own, 3 runs each:

APS5_GPU_WAIT_TIMEOUT_MS Result
100 fails 3/3
250 fails 3/3
400 passes 3/3, no timeout message
1000 (default) passes 3/3, no timeout message

The failures are the ones you describe: queue 0x20 WAIT_REG_MEM ... timed out after 100ms, earlier write by queue 0x28 opcode 0x37, then the stale-table message. On this GPU the conclusive slot is 2^27 producer iterations, and its producer finishes in under ~400 ms.

At the default timeout it passed in 5 full-suite ctest -j6 runs and in 18 batches of all agc_driver_ tests under -j12 with every cache cold, with no WAIT_REG_MEM timeout logged in any of them. So it doesn't reproduce here without shortening the timeout.

One note on the test: the consumer reads stale data only if the wait gives up before the CPU fills the table 300 ms after submitting. With the default 1000 ms the test can therefore see an early give-up only when that fill is delayed past the timeout, as under heavy load on a slower GPU. A pass at 1000 ms does not show that the wait held.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6100452614 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2832#issuecomment-6100452614). Originally posted by [Zurisen](https://github.com/Zurisen) on 2026-10-10T17:51:00Z. --- RTX 4070 data, same build setup as yours (Windows 11 Home 26200, WinLibs GCC 15.2.0 r7, Release, `main` `57f96fd2`), RTX 4070 Laptop GPU (Ada, driver 32.0.15.9636), without `APS5_NO_PIPELINE_LTO`. `agc_driver_gated_dispatch_capture` run on its own, 3 runs each: | `APS5_GPU_WAIT_TIMEOUT_MS` | Result | |---|---| | 100 | fails 3/3 | | 250 | fails 3/3 | | 400 | passes 3/3, no timeout message | | 1000 (default) | passes 3/3, no timeout message | The failures are the ones you describe: `queue 0x20 WAIT_REG_MEM ... timed out after 100ms`, `earlier write by queue 0x28 opcode 0x37`, then the stale-table message. On this GPU the conclusive slot is 2^27 producer iterations, and its producer finishes in under ~400 ms. At the default timeout it passed in 5 full-suite `ctest -j6` runs and in 18 batches of all `agc_driver_` tests under `-j12` with every cache cold, with no `WAIT_REG_MEM` timeout logged in any of them. So it doesn't reproduce here without shortening the timeout. One note on the test: the consumer reads stale data only if the wait gives up before the CPU fills the table 300 ms after submitting. With the default 1000 ms the test can therefore see an early give-up only when that fill is delayed past the timeout, as under heavy load on a slower GPU. A pass at 1000 ms does not show that the wait held.
Silverash-i8 commented 2026-10-10 23:09:18 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Silverash-i8 on 2026-10-10T23:09:18Z.


@MrMha I tested your branch from #2985 (fix/wait-memory-timeout-2832, 72f62319) on Windows, since that's the case you noted as untested. I merged it onto main e4045bbb; the only conflict was the test registration in libSceAgcDriver/CMakeLists.txt. Windows 11, WinLibs GCC 15.2.0 r7, Release, RTX 5060 Laptop (617.42) and the Arrow Lake iGPU (32.0.101.8991).

The repro from this issue is fixed. agc_driver_gated_dispatch_capture with APS5_GPU_WAIT_TIMEOUT_MS=100 passes 3/3 on both GPUs, where main fails 3/3 on both. Your _short_timeout test (1 ms) passes every run on NVIDIA.

But it breaks an existing test: agc_driver fails on both GPUs after 10 s with consumer never passed its wait. That's the second half of testLabelStoredSinceSubmission in tests/Submit.cpp:

submit(0x20, commands(waitEqual(&label, 1), writeData(&late, 1)));
check(waitFor(&late, 1, "consumer never passed its wait") >= std::chrono::milliseconds(900), "a label stored before the wait's submission satisfied it");

Nothing ever stores label again, so the only way that consumer gets through is the old give-up after APS5_GPU_WAIT_TIMEOUT_MS. The test asserts it doesn't pass early (at least 900 ms), and then relies on the timeout releasing it. So the timeout-as-completion behaviour is deliberately covered by a test today. Whether that's still wanted is the maintainer call I asked about above, and the branch needs this test updated either way. For example, the test could store the label itself once it's confirmed the consumer is still waiting at around 900 ms, and then check the consumer gets through.

Arrow Lake, _short_timeout: it fails about 1 run in 10 (2 of 10 alone, 2 of 30 with background load) with queue 0x28 dropped 1 queued labels: their record failed, then the gated submissions did not finish. A temporary print in Driver::ReportFailure showed the record fails because the device is lost (vkWaitForFences recorder: Vulkan result -4), and the Windows log has a GPU timeout (LiveKernelEvent 141) at exactly the times of the failing runs. So on this iGPU the test's long producer spin sometimes runs into the Windows GPU watchdog. That's a limit of the test on a slow GPU rather than your change. Before your change, the 1 ms timeout made it fail every time anyway. In the full parallel suite, agc_driver_gated_dispatch_capture also failed once on the iGPU; run alone with your branch it passes 5/5, which matches the parallel-load flake I described in the issue.

Full ctest -j6 with the branch: NVIDIA 742/743 (only agc_driver). Arrow Lake 734/743: agc_driver, the two gated dispatch tests above, and the six known Intel failures listed on #2114.

AI-assisted (Claude Code); I ran everything above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6103172608 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2832#issuecomment-6103172608). Originally posted by [Silverash-i8](https://github.com/Silverash-i8) on 2026-10-10T23:09:18Z. --- @MrMha I tested your branch from #2985 (`fix/wait-memory-timeout-2832`, `72f62319`) on Windows, since that's the case you noted as untested. I merged it onto `main` `e4045bbb`; the only conflict was the test registration in `libSceAgcDriver/CMakeLists.txt`. Windows 11, WinLibs GCC 15.2.0 r7, Release, RTX 5060 Laptop (617.42) and the Arrow Lake iGPU (32.0.101.8991). **The repro from this issue is fixed.** `agc_driver_gated_dispatch_capture` with `APS5_GPU_WAIT_TIMEOUT_MS=100` passes 3/3 on both GPUs, where `main` fails 3/3 on both. Your `_short_timeout` test (1 ms) passes every run on NVIDIA. **But it breaks an existing test:** `agc_driver` fails on both GPUs after 10 s with `consumer never passed its wait`. That's the second half of `testLabelStoredSinceSubmission` in `tests/Submit.cpp`: ```cpp submit(0x20, commands(waitEqual(&label, 1), writeData(&late, 1))); check(waitFor(&late, 1, "consumer never passed its wait") >= std::chrono::milliseconds(900), "a label stored before the wait's submission satisfied it"); ``` Nothing ever stores `label` again, so the only way that consumer gets through is the old give-up after `APS5_GPU_WAIT_TIMEOUT_MS`. The test asserts it doesn't pass early (at least 900 ms), and then relies on the timeout releasing it. So the timeout-as-completion behaviour is deliberately covered by a test today. Whether that's still wanted is the maintainer call I asked about above, and the branch needs this test updated either way. For example, the test could store the label itself once it's confirmed the consumer is still waiting at around 900 ms, and then check the consumer gets through. **Arrow Lake, `_short_timeout`:** it fails about 1 run in 10 (2 of 10 alone, 2 of 30 with background load) with `queue 0x28 dropped 1 queued labels: their record failed`, then `the gated submissions did not finish`. A temporary print in `Driver::ReportFailure` showed the record fails because the device is lost (`vkWaitForFences recorder: Vulkan result -4`), and the Windows log has a GPU timeout (`LiveKernelEvent 141`) at exactly the times of the failing runs. So on this iGPU the test's long producer spin sometimes runs into the Windows GPU watchdog. That's a limit of the test on a slow GPU rather than your change. Before your change, the 1 ms timeout made it fail every time anyway. In the full parallel suite, `agc_driver_gated_dispatch_capture` also failed once on the iGPU; run alone with your branch it passes 5/5, which matches the parallel-load flake I described in the issue. Full `ctest -j6` with the branch: NVIDIA 742/743 (only `agc_driver`). Arrow Lake 734/743: `agc_driver`, the two gated dispatch tests above, and the six known Intel failures listed on #2114. AI-assisted (Claude Code); I ran everything above on my machine.
Scramblrrrr commented 2026-10-11 02:53:13 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-11T02:53:13Z.


@MrMha @Silverash-i8 I prepared a test-only follow-up for #2985: 36b26122a5458028f76fe7c7710333fcfca80f6d, github.com/Scramblrrrr/AnyPS5@36b26122a5 . It can be cherry-picked independently; the branch parent is my 007 integration experiment, not a proposed replacement for your branch.

There are three timeout-dependent portions in Submit.cpp, not just the first one: stale pre-submission label, unmatched high dword in a wide wait, and a held label reset by its own queue. Each now signals that it has reached the wait, holds it for 1200 ms, asserts the consumer has not completed, then submits a genuine matching producer and checks completion. The wide case fixes the high dword; the reset case uses another queue.

Windows RTX 5070 Ti / NVIDIA 617.14 / Release with required Vulkan: revised agc_driver passed 4.21 s. Negative control restoring just if (warned) return; to WaitMemory fails at the first new assertion after the 1000 ms diagnostic (1.65 s), so this catches timeout-as-completion rather than merely making the old test pass. Restored source then passed agc_driver, gated dispatch capture and its 1 ms short-timeout mode, 3/3 in 7.95 s. Conventions pass. The temporary negative control was removed; no runtime behavior is changed by this commit.

This assumes persistent waits are the desired policy, which remains the maintainer decision noted above. It does not test shutdown cancellation of an unsatisfiable wait. I have not opened a duplicate PR.

AI-assisted (Codex).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6104784552 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2832#issuecomment-6104784552). Originally posted by [Scramblrrrr](https://github.com/Scramblrrrr) on 2026-10-11T02:53:13Z. --- @MrMha @Silverash-i8 I prepared a **test-only follow-up** for #2985: **36b26122a5458028f76fe7c7710333fcfca80f6d**, https://github.com/Scramblrrrr/AnyPS5/commit/36b26122a5458028f76fe7c7710333fcfca80f6d . It can be cherry-picked independently; the branch parent is my 007 integration experiment, not a proposed replacement for your branch. There are three timeout-dependent portions in Submit.cpp, not just the first one: stale pre-submission label, unmatched high dword in a wide wait, and a held label reset by its own queue. Each now signals that it has reached the wait, holds it for 1200 ms, asserts the consumer has not completed, then submits a genuine matching producer and checks completion. The wide case fixes the high dword; the reset case uses another queue. Windows RTX 5070 Ti / NVIDIA 617.14 / Release with required Vulkan: revised `agc_driver` passed 4.21 s. Negative control restoring just `if (warned) return;` to WaitMemory fails at the first new assertion after the 1000 ms diagnostic (1.65 s), so this catches timeout-as-completion rather than merely making the old test pass. Restored source then passed `agc_driver`, gated dispatch capture and its 1 ms short-timeout mode, 3/3 in 7.95 s. Conventions pass. The temporary negative control was removed; no runtime behavior is changed by this commit. This assumes persistent waits are the desired policy, which remains the maintainer decision noted above. It does not test shutdown cancellation of an unsatisfiable wait. I have not opened a duplicate PR. AI-assisted (Codex).
Zurisen commented 2026-10-11 02:58:25 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Zurisen on 2026-10-11T02:58:25Z.


Parallel-load run of the two together on NVIDIA, since persistent waits are the case that could hang under load: #2985's 72f62319 plus @Scramblrrrr's 36b26122, applied onto main 961b25fe (the only conflict was the test registration in libSceAgcDriver/CMakeLists.txt, resolved by keeping both blocks). RTX 4070 Laptop (driver 32.0.15.9636), Windows 11 Home (26200), WinLibs GCC 15.2.0 r7, Release, ANYPS5_REQUIRE_VULKAN=1.

Run agc_driver agc_driver_gated_dispatch_capture ..._short_timeout (1 ms)
alone, 3 runs 3/3 (4.10–4.19 s) 3/3 3/3
full ctest -j12, ANYPS5_NO_SHADER_CACHE=1, __GL_SHADER_DISK_CACHE=0, 3 runs 3/3 (4.10–4.15 s) 3/3 3/3 (1.06–1.46 s)

No hang, timeout or device loss. The full runs' only other failures also fail on main here: pr_overlap_encoding (Python 3.10) and guest_filesystem (no symlink privilege, #3169).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6104819285 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2832#issuecomment-6104819285). Originally posted by [Zurisen](https://github.com/Zurisen) on 2026-10-11T02:58:25Z. --- Parallel-load run of the two together on NVIDIA, since persistent waits are the case that could hang under load: #2985's `72f62319` plus @Scramblrrrr's `36b26122`, applied onto `main` `961b25fe` (the only conflict was the test registration in `libSceAgcDriver/CMakeLists.txt`, resolved by keeping both blocks). RTX 4070 Laptop (driver 32.0.15.9636), Windows 11 Home (26200), WinLibs GCC 15.2.0 r7, Release, `ANYPS5_REQUIRE_VULKAN=1`. | Run | `agc_driver` | `agc_driver_gated_dispatch_capture` | `..._short_timeout` (1 ms) | |---|---|---|---| | alone, 3 runs | 3/3 (4.10–4.19 s) | 3/3 | 3/3 | | full ctest `-j12`, `ANYPS5_NO_SHADER_CACHE=1`, `__GL_SHADER_DISK_CACHE=0`, 3 runs | 3/3 (4.10–4.15 s) | 3/3 | 3/3 (1.06–1.46 s) | No hang, timeout or device loss. The full runs' only other failures also fail on `main` here: `pr_overlap_encoding` (Python 3.10) and `guest_filesystem` (no symlink privilege, #3169).
Scramblrrrr commented 2026-10-11 03:02:25 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-11T03:02:25Z.


Thanks @Zurisen — that independent current-main / RTX 4070 parallel-load run is useful coverage beyond my 5070 Ti check. I will keep the 36b26122 fixture follow-up separate for @MrMha to pick up; it does not close the shutdown-cancellation gap or settle the maintainer's persistent-wait policy decision. My 007 run remains guarded and uses the unchanged 5fd30d503 driver while its lean-preset cache prepares.

AI-assisted (Codex).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6104846747 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2832#issuecomment-6104846747). Originally posted by [Scramblrrrr](https://github.com/Scramblrrrr) on 2026-10-11T03:02:25Z. --- Thanks @Zurisen — that independent current-main / RTX 4070 parallel-load run is useful coverage beyond my 5070 Ti check. I will keep the 36b26122 fixture follow-up separate for @MrMha to pick up; it does not close the shutdown-cancellation gap or settle the maintainer's persistent-wait policy decision. My 007 run remains guarded and uses the unchanged 5fd30d503 driver while its lean-preset cache prepares. AI-assisted (Codex).
Silverash-i8 commented 2026-10-11 03:05:26 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Silverash-i8 on 2026-10-11T03:05:26Z.


@Scramblrrrr @MrMha I ran this on both GPUs here: Windows 11, WinLibs GCC 15.2.0 r7, Release, main 961b25fe + #2985 (72f62319, the CMakeLists.txt conflict resolved by keeping both test blocks) + 36b26122 cherry-picked, three runs per GPU.

  • agc_driver passes on both, 3/3 on the RTX 5060 and 3/3 on the Arrow Lake iGPU. So the reworked Submit.cpp cases fix the failure I reported above, where the old test counted the timeout as completion.
  • RTX 5060: agc_driver_gated_dispatch_capture and _short_timeout pass 3/3.
  • Arrow Lake iGPU: inconclusive for now. Both gated_dispatch_capture tests failed 3/3 with the gated submissions did not finish and vkWaitForFences recorder: Vulkan result -4, with bursts of LiveKernelEvent 141 (the Windows GPU watchdog) at the same seconds. But when I then went back to plain main (961b25fe, and d31b57a4) to compare, the same test kept failing there too, with more watchdog resets and a few heap-corruption exits, even though it passed on d31b57a4 on this iGPU earlier tonight. So after that first burst of resets the iGPU's driver seems to be in a bad state, and I can't pin the failures on #2985 yet. I'll rerun after a driver reset and post a clean comparison.

AI-assisted (Claude Code); I ran all of this on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6104867391 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2832#issuecomment-6104867391). Originally posted by [Silverash-i8](https://github.com/Silverash-i8) on 2026-10-11T03:05:26Z. --- @Scramblrrrr @MrMha I ran this on both GPUs here: Windows 11, WinLibs GCC 15.2.0 r7, Release, `main` 961b25fe + #2985 (`72f62319`, the `CMakeLists.txt` conflict resolved by keeping both test blocks) + `36b26122` cherry-picked, three runs per GPU. - **`agc_driver` passes on both**, 3/3 on the RTX 5060 and 3/3 on the Arrow Lake iGPU. So the reworked `Submit.cpp` cases fix the failure I reported above, where the old test counted the timeout as completion. - **RTX 5060:** `agc_driver_gated_dispatch_capture` and `_short_timeout` pass 3/3. - **Arrow Lake iGPU: inconclusive for now.** Both `gated_dispatch_capture` tests failed 3/3 with `the gated submissions did not finish` and `vkWaitForFences recorder: Vulkan result -4`, with bursts of `LiveKernelEvent 141` (the Windows GPU watchdog) at the same seconds. But when I then went back to plain `main` (961b25fe, and d31b57a4) to compare, the same test kept failing there too, with more watchdog resets and a few heap-corruption exits, even though it passed on d31b57a4 on this iGPU earlier tonight. So after that first burst of resets the iGPU's driver seems to be in a bad state, and I can't pin the failures on #2985 yet. I'll rerun after a driver reset and post a clean comparison. AI-assisted (Claude Code); I ran all of this on my machine.
MrMha commented 2026-10-11 05:57:41 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MrMha on 2026-10-11T05:57:41Z.


Thanks @Scramblrrrr, @Silverash-i8 and @Zurisen for the correction and independent Windows testing.

I’ve incorporated the three-case test correction, credited Scramblrrrr as a coauthor, and synchronized the branch with current main while preserving both test-registration blocks.

Updated commit: github.com/MrMha/AnyPS5@056534a969

Local conventions and whitespace checks pass. The Windows/GPU measurements are yours; I have not rerun them myself. Intel GPU coverage, shutdown cancellation, and the maintainer’s decision on persistent waits remain outstanding.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106030828 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2832#issuecomment-6106030828). Originally posted by [MrMha](https://github.com/MrMha) on 2026-10-11T05:57:41Z. --- Thanks @Scramblrrrr, @Silverash-i8 and @Zurisen for the correction and independent Windows testing. I’ve incorporated the three-case test correction, credited Scramblrrrr as a coauthor, and synchronized the branch with current main while preserving both test-registration blocks. Updated commit: https://github.com/MrMha/AnyPS5/commit/056534a969e102a47b88dc493e5a41e91a046bf5 Local conventions and whitespace checks pass. The Windows/GPU measurements are yours; I have not rerun them myself. Intel GPU coverage, shutdown cancellation, and the maintainer’s decision on persistent waits remain outstanding.
Zurisen commented 2026-10-11 06:03:22 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Zurisen on 2026-10-11T06:03:22Z.


@MrMha Reran on 056534a9 itself, merged into current main 4be74d4f (clean merge), same RTX 4070 Laptop setup as above:

  • agc_driver, agc_driver_gated_dispatch_capture and ..._short_timeout alone: 3/3 each (agc_driver 4.10–4.27 s).
  • Full ctest -j12 with ANYPS5_NO_SHADER_CACHE=1 and __GL_SHADER_DISK_CACHE=0, 2 runs: 768/769 each; the three tests pass in both, and the only failure is pr_overlap_encoding, which also fails on main here (Python 3.10).
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106070500 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2832#issuecomment-6106070500). Originally posted by [Zurisen](https://github.com/Zurisen) on 2026-10-11T06:03:22Z. --- @MrMha Reran on `056534a9` itself, merged into current `main` `4be74d4f` (clean merge), same RTX 4070 Laptop setup as above: - `agc_driver`, `agc_driver_gated_dispatch_capture` and `..._short_timeout` alone: 3/3 each (`agc_driver` 4.10–4.27 s). - Full ctest `-j12` with `ANYPS5_NO_SHADER_CACHE=1` and `__GL_SHADER_DISK_CACHE=0`, 2 runs: 768/769 each; the three tests pass in both, and the only failure is `pr_overlap_encoding`, which also fails on `main` here (Python 3.10).
Silverash-i8 commented 2026-10-11 06:05:03 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Silverash-i8 on 2026-10-11T06:05:03Z.


@MrMha checked 056534a9 as pushed (on main d7cfa728), Windows 11, WinLibs GCC 15.2.0 r7, Release, RTX 5060 Laptop: agc_driver, agc_driver_gated_dispatch_capture and agc_driver_gated_dispatch_capture_short_timeout all pass 3/3.

The Intel iGPU result is still pending: its driver is in the bad state I described above, so I'll rerun this commit there after a driver reset and post the comparison with plain main.

AI-assisted (Claude Code); I ran this on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106082141 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2832#issuecomment-6106082141). Originally posted by [Silverash-i8](https://github.com/Silverash-i8) on 2026-10-11T06:05:03Z. --- @MrMha checked `056534a9` as pushed (on `main` d7cfa728), Windows 11, WinLibs GCC 15.2.0 r7, Release, RTX 5060 Laptop: `agc_driver`, `agc_driver_gated_dispatch_capture` and `agc_driver_gated_dispatch_capture_short_timeout` all pass 3/3. The Intel iGPU result is still pending: its driver is in the bad state I described above, so I'll rerun this commit there after a driver reset and post the comparison with plain `main`. AI-assisted (Claude Code); I ran this on my machine.
MrMha commented 2026-10-11 06:40:52 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MrMha on 2026-10-11T06:40:52Z.


Thanks for verifying the updated commit on Windows.

I’ve added a focused shutdown test on a separate branch: https://github.com/MrMha/AnyPS5/tree/test/wait-memory-shutdown-2832

It leaves labels unsatisfied on three queues, then checks that shutdown finishes without executing commands or queued submissions behind those waits. It builds on 056534a9 and changes no runtime behavior.

GCC compilation against the production headers, conventions, and whitespace checks pass. Runtime execution remains pending.

Could someone with an existing full build test this branch using:

cmake -S . -B build -DBUILD_TESTING=ON
cmake --build build --target agc_driver_wait_shutdown_tests
ctest --test-dir build -R "^agc_driver_wait_shutdown$" --output-on-failure

Could a maintainer also confirm whether persistent waits are the intended policy and whether #2985 can be reopened for review?

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106333170 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2832#issuecomment-6106333170). Originally posted by [MrMha](https://github.com/MrMha) on 2026-10-11T06:40:52Z. --- Thanks for verifying the updated commit on Windows. I’ve added a focused shutdown test on a separate branch: https://github.com/MrMha/AnyPS5/tree/test/wait-memory-shutdown-2832 It leaves labels unsatisfied on three queues, then checks that shutdown finishes without executing commands or queued submissions behind those waits. It builds on 056534a9 and changes no runtime behavior. GCC compilation against the production headers, conventions, and whitespace checks pass. Runtime execution remains pending. Could someone with an existing full build test this branch using: cmake -S . -B build -DBUILD_TESTING=ON cmake --build build --target agc_driver_wait_shutdown_tests ctest --test-dir build -R "^agc_driver_wait_shutdown$" --output-on-failure Could a maintainer also confirm whether persistent waits are the intended policy and whether #2985 can be reopened for review? AI-assisted: yes.
Zurisen commented 2026-10-11 06:45:36 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Zurisen on 2026-10-11T06:45:36Z.


@MrMha Ran test/wait-memory-shutdown-2832 (3b21873b), merged into main 1690db9a (clean merge), RTX 4070 Laptop (driver 32.0.15.9636), Windows 11 Home (26200), WinLibs GCC 15.2.0 r7, Release, full build (agc_driver_wait_shutdown_tests is built by the normal build).

  • agc_driver_wait_shutdown alone: 5/5, 0.19–0.30 s. Each run logs the 20 ms WAIT_REG_MEM ... timed out diagnostic for queues 0x0, 0x20 and 0x28, so all three reach their unsatisfied wait and stay there, then prints unsatisfied label waits cancelled cleanly at shutdown.
  • Full ctest -j12 with ANYPS5_NO_SHADER_CACHE=1 and __GL_SHADER_DISK_CACHE=0: 771/772; agc_driver_wait_shutdown passes (0.30 s), and the only failure is pr_overlap_encoding, which also fails on main here (Python 3.10).
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106366237 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2832#issuecomment-6106366237). Originally posted by [Zurisen](https://github.com/Zurisen) on 2026-10-11T06:45:36Z. --- @MrMha Ran `test/wait-memory-shutdown-2832` (`3b21873b`), merged into `main` `1690db9a` (clean merge), RTX 4070 Laptop (driver 32.0.15.9636), Windows 11 Home (26200), WinLibs GCC 15.2.0 r7, Release, full build (`agc_driver_wait_shutdown_tests` is built by the normal build). - `agc_driver_wait_shutdown` alone: 5/5, 0.19–0.30 s. Each run logs the 20 ms `WAIT_REG_MEM ... timed out` diagnostic for queues `0x0`, `0x20` and `0x28`, so all three reach their unsatisfied wait and stay there, then prints `unsatisfied label waits cancelled cleanly at shutdown`. - Full ctest `-j12` with `ANYPS5_NO_SHADER_CACHE=1` and `__GL_SHADER_DISK_CACHE=0`: 771/772; `agc_driver_wait_shutdown` passes (0.30 s), and the only failure is `pr_overlap_encoding`, which also fails on `main` here (Python 3.10).
Silverash-i8 commented 2026-10-11 06:47:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Silverash-i8 on 2026-10-11T06:47:11Z.


@MrMha ran test/wait-memory-shutdown-2832 (3b21873b) as you asked: Windows 11, WinLibs GCC 15.2.0 r7, Release, RTX 5060 Laptop. agc_driver_wait_shutdown builds and passes 5/5 (about 0.2 s each). The log shows the waits on the queues timing out at 20 ms, then unsatisfied label waits cancelled cleanly at shutdown. On the same build agc_driver, agc_driver_gated_dispatch_capture and _short_timeout still pass.

Intel is still pending for the same reason as before.

AI-assisted (Claude Code); I ran this on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106377415 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2832#issuecomment-6106377415). Originally posted by [Silverash-i8](https://github.com/Silverash-i8) on 2026-10-11T06:47:11Z. --- @MrMha ran `test/wait-memory-shutdown-2832` (`3b21873b`) as you asked: Windows 11, WinLibs GCC 15.2.0 r7, Release, RTX 5060 Laptop. `agc_driver_wait_shutdown` builds and passes 5/5 (about 0.2 s each). The log shows the waits on the queues timing out at 20 ms, then `unsatisfied label waits cancelled cleanly at shutdown`. On the same build `agc_driver`, `agc_driver_gated_dispatch_capture` and `_short_timeout` still pass. Intel is still pending for the same reason as before. AI-assisted (Claude Code); I ran this on my machine.
Silverash-i8 commented 2026-10-11 08:51:39 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Silverash-i8 on 2026-10-11T08:51:39Z.


Fixed by #2985 (MrMha, with Scramblrrrr's test rework and the shutdown test), merged. Thanks to everyone who tested it.

The Intel side is still open but tracked separately: agc_driver_gated_dispatch_capture hits the GPU watchdog on Intel iGPUs on plain main as well (UHD 620 on Linux and my Arrow Lake iGPU on Windows), which is #3345, and the heap-corruption exit seen on that path is #3171. Closing this one.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6107307087 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2832#issuecomment-6107307087). Originally posted by [Silverash-i8](https://github.com/Silverash-i8) on 2026-10-11T08:51:39Z. --- Fixed by #2985 (MrMha, with Scramblrrrr's test rework and the shutdown test), merged. Thanks to everyone who tested it. The Intel side is still open but tracked separately: `agc_driver_gated_dispatch_capture` hits the GPU watchdog on Intel iGPUs on plain `main` as well (UHD 620 on Linux and my Arrow Lake iGPU on Windows), which is #3345, and the heap-corruption exit seen on that path is #3171. Closing this one. AI-assisted (Claude Code).
Sign in to join this conversation.
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#2832
No description provided.