agc_pending_key_stores fails intermittently on the Linux CI runners (deterministic pass at the failing heads locally) #6500

Closed
opened 2026-10-15 17:41:33 +00:00 by LeandroSSB · 2 comments
LeandroSSB commented 2026-10-15 17:41:33 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by LeandroSSB on 2026-10-15T17:41:33Z.


What happens

agc_pending_key_stores fails intermittently on the Linux CI runners (lavapipe). It fails on some push runs and passes on others, across five different heads today, and passes every time in a local mirror at the exact failing heads.

CI evidence (all 2026-10-15, Build push runs)

Run Head Result
38735138744 8b2aabf27 FAILED
38748979285 940eba9a2 FAILED
38762318195 0c4816f61 FAILED
38770399477 da85abc48 FAILED
38777168832 3bb409b60 FAILED

Runs in between passed on the same test: 13:01, 13:44, 15:53 and 16:50 (the 16:50 run is green on the tree between the 16:36 and 17:25 failures). The failures are therefore not tied to one merge.

The failing assertion is always the same, and the test aborts in ~0.06 s:

AGC graphics: a range wider than the pending fill was known, or waited for

The runner log shows the same device conditions on every failure: Vulkan device: llvmpipe (LLVM 20.1.2, 256 bits) and open /dev/udmabuf: Permission denied (dma-buf imports keep write protection: unknown (probe failed ...); imported ranges are compared).

Local mirror evidence

On a local Linux container mirror (Ubuntu 24.04, gcc 13.3, same lavapipe/llvmpipe stack, /dev/udmabuf denied exactly as on the runner), at the exact failing head 940eba9a26:

ctest -R "^agc_pending_key_stores$" --repeat until-fail:5 --output-on-failure
100% tests passed, 0 tests failed out of 1  (5/5 passes, ~0.06 s each)

The write-watch probe lines in the mirror match the runner's (host imports resolve write protection: yes (0 of 4 scratch pages written after a GPU read, 4 after a GPU write, 0 after the import); imported ranges are compared).

Reading

The test is deterministic locally at heads where CI failed, and CI passes it on other runs of the same day, so this looks like runner-side nondeterminism (timing or scheduling under the CI runners' ctest load) rather than a code regression. Filing so the intermittent red stops masking real failures in the DCC-key store area — five runs today failed on this test alone.

I do not have a reproducer beyond the CI runners themselves; happy to test any instrumented run.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5871069213 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/6500). Originally posted by [LeandroSSB](https://github.com/LeandroSSB) on 2026-10-15T17:41:33Z. --- ### What happens `agc_pending_key_stores` fails intermittently on the Linux CI runners (lavapipe). It fails on some push runs and passes on others, across five different heads today, and passes every time in a local mirror at the exact failing heads. ### CI evidence (all 2026-10-15, `Build` push runs) | Run | Head | Result | | --- | --- | --- | | [38735138744](https://github.com/boykopovar/AnyPS5/actions/runs/38735138744) | `8b2aabf27` | FAILED | | [38748979285](https://github.com/boykopovar/AnyPS5/actions/runs/38748979285) | `940eba9a2` | FAILED | | [38762318195](https://github.com/boykopovar/AnyPS5/actions/runs/38762318195) | `0c4816f61` | FAILED | | [38770399477](https://github.com/boykopovar/AnyPS5/actions/runs/38770399477) | `da85abc48` | FAILED | | [38777168832](https://github.com/boykopovar/AnyPS5/actions/runs/38777168832) | `3bb409b60` | FAILED | Runs in between passed on the same test: 13:01, 13:44, 15:53 and 16:50 (the 16:50 run is green on the tree between the 16:36 and 17:25 failures). The failures are therefore not tied to one merge. The failing assertion is always the same, and the test aborts in ~0.06 s: ```text AGC graphics: a range wider than the pending fill was known, or waited for ``` The runner log shows the same device conditions on every failure: `Vulkan device: llvmpipe (LLVM 20.1.2, 256 bits)` and `open /dev/udmabuf: Permission denied` (`dma-buf imports keep write protection: unknown (probe failed ...); imported ranges are compared`). ### Local mirror evidence On a local Linux container mirror (Ubuntu 24.04, gcc 13.3, same lavapipe/llvmpipe stack, `/dev/udmabuf` denied exactly as on the runner), at the exact failing head `940eba9a26`: ```text ctest -R "^agc_pending_key_stores$" --repeat until-fail:5 --output-on-failure 100% tests passed, 0 tests failed out of 1 (5/5 passes, ~0.06 s each) ``` The write-watch probe lines in the mirror match the runner's (`host imports resolve write protection: yes (0 of 4 scratch pages written after a GPU read, 4 after a GPU write, 0 after the import); imported ranges are compared`). ### Reading The test is deterministic locally at heads where CI failed, and CI passes it on other runs of the same day, so this looks like runner-side nondeterminism (timing or scheduling under the CI runners' ctest load) rather than a code regression. Filing so the intermittent red stops masking real failures in the DCC-key store area — five runs today failed on this test alone. I do not have a reproducer beyond the CI runners themselves; happy to test any instrumented run. AI-assisted: yes (Claude Code)
jotitadev commented 2026-10-15 21:27:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-15T21:27:33Z.


It reproduces outside CI, on an NVIDIA GPU, with the same assertion. On lavapipe alone it did not fail here.

Machine: NVIDIA GeForce RTX 3070, driver 595.99.02, Vulkan 1.4.329, Ubuntu 26.04 (kernel 7.0.0-38), i7-8700. GCC 15.2, Release, BUILD_TESTING=ON. Unchanged main at 44df21632. Each run is a fresh ctest -R "^agc_pending_key_stores$" -j1 --timeout 60 -V, and the Vulkan device: lines in every log were checked.

agc_pending_key_stores runs on the recorder's own device, which ignores ANYPS5_GPU (#6219). With both ICDs installed it always picks the RTX 3070. To get lavapipe I restricted the loader with VK_DRIVER_FILES=/usr/share/vulkan/icd.d/lvp_icd.json. For the /dev/udmabuf denied rows, an LD_PRELOAD shim made open("/dev/udmabuf") fail with EACCES. That gives the same probe line as the runner: dma-buf imports keep write protection: unknown (probe failed at open /dev/udmabuf, ...).

Device /dev/udmabuf Load Failed
RTX 3070 accessible idle 15/150
RTX 3070 denied idle 5/90
RTX 3070 accessible 12 busy-loop processes on the 12 threads 2/30
lavapipe (LLVM 21.1.8) only accessible idle 0/30
lavapipe only denied idle 0/30
lavapipe only accessible same load 0/30
lavapipe only denied same load 0/30

Every failure is AGC graphics: a range wider than the pending fill was known, or waited for. In 60 interleaved pairs on the RTX 3070 (accessible, then denied, alternating), each side failed 5/60, so /dev/udmabuf access makes no difference there.

There is also a deterministic case. With #6225 applied (head 82b4a665f, so that the recorder honours ANYPS5_GPU), ANYPS5_GPU=llvmpipe with both ICDs installed fails 23/23 with the same assertion: 13 runs with /dev/udmabuf accessible, 10 denied. Both Vulkan device: lines report llvmpipe. The same build passes 10/10 when only the lavapipe ICD is visible. The logs of the two cases are identical up to the assertion.

Written with AI assistance (Claude Code). I ran the tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6202644123 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/6500#issuecomment-6202644123). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-15T21:27:33Z. --- It reproduces outside CI, on an NVIDIA GPU, with the same assertion. On lavapipe alone it did not fail here. **Machine:** NVIDIA GeForce RTX 3070, driver 595.99.02, Vulkan 1.4.329, Ubuntu 26.04 (kernel 7.0.0-38), i7-8700. GCC 15.2, Release, `BUILD_TESTING=ON`. Unchanged `main` at `44df21632`. Each run is a fresh `ctest -R "^agc_pending_key_stores$" -j1 --timeout 60 -V`, and the `Vulkan device:` lines in every log were checked. `agc_pending_key_stores` runs on the recorder's own device, which ignores `ANYPS5_GPU` (#6219). With both ICDs installed it always picks the RTX 3070. To get lavapipe I restricted the loader with `VK_DRIVER_FILES=/usr/share/vulkan/icd.d/lvp_icd.json`. For the `/dev/udmabuf denied` rows, an `LD_PRELOAD` shim made `open("/dev/udmabuf")` fail with `EACCES`. That gives the same probe line as the runner: `dma-buf imports keep write protection: unknown (probe failed at open /dev/udmabuf, ...)`. | Device | `/dev/udmabuf` | Load | Failed | |---|---|---|---| | RTX 3070 | accessible | idle | 15/150 | | RTX 3070 | denied | idle | 5/90 | | RTX 3070 | accessible | 12 busy-loop processes on the 12 threads | 2/30 | | lavapipe (LLVM 21.1.8) only | accessible | idle | 0/30 | | lavapipe only | denied | idle | 0/30 | | lavapipe only | accessible | same load | 0/30 | | lavapipe only | denied | same load | 0/30 | Every failure is `AGC graphics: a range wider than the pending fill was known, or waited for`. In 60 interleaved pairs on the RTX 3070 (accessible, then denied, alternating), each side failed 5/60, so `/dev/udmabuf` access makes no difference there. There is also a deterministic case. With #6225 applied (head `82b4a665f`, so that the recorder honours `ANYPS5_GPU`), `ANYPS5_GPU=llvmpipe` with both ICDs installed fails 23/23 with the same assertion: 13 runs with `/dev/udmabuf` accessible, 10 denied. Both `Vulkan device:` lines report llvmpipe. The same build passes 10/10 when only the lavapipe ICD is visible. The logs of the two cases are identical up to the assertion. Written with AI assistance (Claude Code). I ran the tests above on my machine.
LeandroSSB commented 2026-10-15 21:40:44 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by LeandroSSB on 2026-10-15T21:40:44Z.


Root-caused by #6560, and the "runner-side nondeterminism" reading in this issue was wrong: the test cleared only the first 256 bytes of its 64 KiB block and then asked for the keys of 512 bytes, so whenever the uncleared heap bytes were not all equal the range read as mixed and the check failed. That also explains the local-mirror evidence here — the garbage happened to be uniform in that environment, so the 5/5 repeat passed while CI kept failing. A deterministic local pass at a failing head does not exonerate the code when the failure depends on uninitialized memory.

#6560 zeroes the whole block; closing this as fixed by it.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6202859241 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/6500#issuecomment-6202859241). Originally posted by [LeandroSSB](https://github.com/LeandroSSB) on 2026-10-15T21:40:44Z. --- Root-caused by #6560, and the "runner-side nondeterminism" reading in this issue was wrong: the test cleared only the first 256 bytes of its 64 KiB block and then asked for the keys of 512 bytes, so whenever the uncleared heap bytes were not all equal the range read as mixed and the check failed. That also explains the local-mirror evidence here — the garbage happened to be uniform in that environment, so the 5/5 repeat passed while CI kept failing. A deterministic local pass at a failing head does not exonerate the code when the failure depends on uninitialized memory. #6560 zeroes the whole block; closing this as fixed by it. AI-assisted: yes (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#6500
No description provided.