tests: xmem_startup_below_40, linear_buffer_backing_copy_warp and startup_resource_retire_hardware_debug0 each failed once on main CI #3426

Open
opened 2026-11-29 01:24:26 +00:00 by Leyukaka · 3 comments
Leyukaka commented 2026-11-29 01:24:26 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T01:24:26Z.


Each of the three tests failed in one job of one main run and passed in every other completed job listed below. A search of issues and PRs for the three names finds only the merged PRs that added or touched the tests.

xmem_startup_below_40

Run 46194701708, 0614f68c, job "Build and test on Windows" (141139673318).

boundary: 4 blocker reservation(s), window 000000FFFFC00000-000000FFFFFFFFFF
boundary overflow: size=0x410000 -> 0000000000000000 (error 8)
boundary: size=0x400000 -> 0000000000000000 (error 8)
check_failed: boundary_allocated
xmem_startup_below_40: FAIL (1 failed check(s))

linear_buffer_backing_copy_warp

Same run and job.

copy     xmem     gate2q FAIL: queue 2 completed with queue 1 still gated: read B=1024/1024; queue 1 then read B=1024/1024; consumer waits +0

The other three gate2q lines of that test run passed (copy xmem gate2q.held with consumer waits +2, copy private gate2q with +1, copy private gate2q.held with +2).

startup_resource_retire_hardware_debug0

Run 46194210510, 6747721c, job "Build and test on Windows at /O2" (141131633819).

adapter=Microsoft Basic Render Driver debug_layer=off mode=on
FAIL: resources kept after their submission passed
  stage 'in flight passed' texture live=5242880/17 expected=5242880/17 retained=131072/2 expected=0/0

Results per job

Run Commit Job xmem_startup_below_40 linear_buffer_backing_copy_warp startup_resource_retire_hardware_debug0
46194701708 0614f68c Build and test on Windows failed failed passed
46194701708 0614f68c Build and test on Windows at /O2 passed passed passed
46194210510 6747721c Build and test on Windows at /O2 passed passed failed
46174243424 f2972840 Build and test on Windows passed passed passed

The other job of 46194210510 (Debug) and of 46174243424 (/O2) was cancelled. The main runs on 51472392 (46204629558) and 212d4b5f (46206952431) were cancelled, so no main run has completed since 0614f68c.

The other failures of these runs are not part of this issue: shader_compile_lds_request_cli_check is fixed by #3424, startup_compute_dispatch_output_warp is covered by #3394 and startup_compute_half_buffer_uav_controls by #3389.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6673404956 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3426). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T01:24:26Z. --- Each of the three tests failed in one job of one main run and passed in every other completed job listed below. A search of issues and PRs for the three names finds only the merged PRs that added or touched the tests. ### `xmem_startup_below_40` Run 46194701708, `0614f68c`, job "Build and test on Windows" (141139673318). ``` boundary: 4 blocker reservation(s), window 000000FFFFC00000-000000FFFFFFFFFF boundary overflow: size=0x410000 -> 0000000000000000 (error 8) boundary: size=0x400000 -> 0000000000000000 (error 8) check_failed: boundary_allocated xmem_startup_below_40: FAIL (1 failed check(s)) ``` ### `linear_buffer_backing_copy_warp` Same run and job. ``` copy xmem gate2q FAIL: queue 2 completed with queue 1 still gated: read B=1024/1024; queue 1 then read B=1024/1024; consumer waits +0 ``` The other three `gate2q` lines of that test run passed (`copy xmem gate2q.held` with `consumer waits +2`, `copy private gate2q` with `+1`, `copy private gate2q.held` with `+2`). ### `startup_resource_retire_hardware_debug0` Run 46194210510, `6747721c`, job "Build and test on Windows at /O2" (141131633819). ``` adapter=Microsoft Basic Render Driver debug_layer=off mode=on FAIL: resources kept after their submission passed stage 'in flight passed' texture live=5242880/17 expected=5242880/17 retained=131072/2 expected=0/0 ``` ### Results per job | Run | Commit | Job | `xmem_startup_below_40` | `linear_buffer_backing_copy_warp` | `startup_resource_retire_hardware_debug0` | |---|---|---|---|---|---| | 46194701708 | `0614f68c` | Build and test on Windows | failed | failed | passed | | 46194701708 | `0614f68c` | Build and test on Windows at /O2 | passed | passed | passed | | 46194210510 | `6747721c` | Build and test on Windows at /O2 | passed | passed | failed | | 46174243424 | `f2972840` | Build and test on Windows | passed | passed | passed | The other job of 46194210510 (Debug) and of 46174243424 (/O2) was cancelled. The main runs on `51472392` (46204629558) and `212d4b5f` (46206952431) were cancelled, so no main run has completed since `0614f68c`. The other failures of these runs are not part of this issue: `shader_compile_lds_request_cli_check` is fixed by #3424, `startup_compute_dispatch_output_warp` is covered by #3394 and `startup_compute_half_buffer_uav_controls` by #3389.
Not-Saii commented 2026-11-29 02:03:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-29T02:03:14Z.


I'll take this. It's three separate failures, so I'll treat each test on its own and open one PR per cause.

Plan.

  1. Reproduce locally. On current main, in both the Debug and the /O2 build, run each test in a loop: ctest --preset dev --no-tests=error -R '^<test>$' --repeat until-fail:200. Under CPU load as well, since CI runners are slower than my machine. Run startup_resource_retire_hardware_debug0 on WARP, the adapter that failed in CI, and on the RTX 4090. I'll post the failure rate per test, configuration and adapter. If a test never fails in N runs, I'll say so and not claim a fix for it.
  2. Find the cause. For each test, find whether the race is in the test or in the runtime:
    • xmem_startup_below_40: the boundary allocation that fails with error 8 after 4 blocker reservations;
    • linear_buffer_backing_copy_warp: gate2q, where queue 2 completes while queue 1 is still gated;
    • startup_resource_retire_hardware_debug0: 2 textures still retained at the in flight passed stage.
  3. Fix.
    • A runtime race gets a runtime fix with a fixture that fails without it.
    • A test that assumes a timing or address-space layout CI doesn't guarantee gets a test fix that keeps the same check, without weakening or deleting it.
    • Each PR includes the loop count before and after, plus a revert control.

Environment: Windows 11 build 26300, NVIDIA GeForce RTX 4090 (driver 32.0.16.1088), Windows SDK 10.0.26100, plus WARP.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7249180116 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3426#issuecomment-7249180116). Originally posted by [Not-Saii](https://github.com/Not-Saii) on 2026-11-29T02:03:14Z. --- I'll take this. It's three separate failures, so I'll treat each test on its own and open one PR per cause. **Plan.** 1. **Reproduce locally.** On current `main`, in both the Debug and the /O2 build, run each test in a loop: `ctest --preset dev --no-tests=error -R '^<test>$' --repeat until-fail:200`. Under CPU load as well, since CI runners are slower than my machine. Run `startup_resource_retire_hardware_debug0` on WARP, the adapter that failed in CI, and on the RTX 4090. I'll post the failure rate per test, configuration and adapter. If a test never fails in N runs, I'll say so and not claim a fix for it. 2. **Find the cause.** For each test, find whether the race is in the test or in the runtime: - `xmem_startup_below_40`: the boundary allocation that fails with error 8 after 4 blocker reservations; - `linear_buffer_backing_copy_warp`: `gate2q`, where queue 2 completes while queue 1 is still gated; - `startup_resource_retire_hardware_debug0`: 2 textures still retained at the `in flight passed` stage. 3. **Fix.** - A runtime race gets a runtime fix with a fixture that fails without it. - A test that assumes a timing or address-space layout CI doesn't guarantee gets a test fix that keeps the same check, without weakening or deleting it. - Each PR includes the loop count before and after, plus a revert control. Environment: Windows 11 build 26300, NVIDIA GeForce RTX 4090 (driver 32.0.16.1088), Windows SDK 10.0.26100, plus WARP. AI-assisted.
Not-Saii commented 2026-11-29 14:01:03 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-29T14:01:03Z.


Results of the loops from my claim. Base 212d4b5f. Windows 11 build 26300; WARP; NVIDIA GeForce RTX 4090, driver 32.0.16.1088; Windows SDK 10.0.26100. dev (Debug) and release (/O2) presets.

Each loop runs ctest --preset <dev|release> --no-tests=error -R '^<test>$' a fixed number of times and counts failures. "load 24" adds 24 busy-loop processes on a 24-thread CPU. "2 cores" pins ctest, the test and 4 busy-loop processes to two logical CPUs. Each configuration also passed one --repeat until-fail:200 run.

Test Debug idle / load 24 / 2 cores /O2 idle / load 24 / 2 cores
xmem_startup_below_40 0/1000, 0/1000, 0/1000 0/1000, 0/1000, 0/1000
linear_buffer_backing_copy_warp 0/200, 0/200, 0/200 0/200, 0/200, 0/200
startup_resource_retire_warp_debug0 0/1000, 167/1000, 134/1000 0/1000, 630/1000, 224/1000
startup_resource_retire_hardware_debug0 (RTX 4090) 0/1000, 0/1000, not run 0/1000, 0/1000, not run

startup_resource_retire_hardware_debug0 reproduces on WARP under CPU load, with the CI output. The cause is in the test: the in flight passed stage waits for only one of the four queues before draining. The fix and its evidence are in #3457.

xmem_startup_below_40: unreproduced in 6000 runs. I don't claim a fix. What I measured:

  • When the fixture itself starts a thread right after check_boundary() reserves the low range, the thread's stack lands at the base of the 4 MiB window (000000FFFFC00000). The test then fails with exactly the CI output, 200 of 200 times: overflow refused with error 8, boundary: size=0x400000 -> 0000000000000000 (error 8), check_failed: boundary_allocated. An unconstrained VirtualAlloc lands above 2^40 and doesn't interfere.
  • In 1000 runs under load, the test process locally has exactly one thread at start, at the boundary setup and at exit. So I have no evidence that a thread, or anything else, actually takes the window on CI. A thread started by the system on the slower runner is a hypothesis.
  • A change that keeps every check: leave eight free ranges of 4 MiB − 64 KiB just below the window, which new stacks take first and which can't hold the checked blocks. With 1 or 12 forced threads, it fails 0/200 (the current test fails 200/200 with 1). That change is in #3458, as hardening rather than a fix.

linear_buffer_backing_copy_warp (copy xmem gate2q): unreproduced in 1200 runs. The CI line passes every predicate except consumer waits +0. linear_buffer_backing.h counts a consumer wait only when the internal refresh has not completed by the time each submission checks. Skipping the wait when the copy has already landed is correct. Measured with the unmodified test, 100 runs each: the non-held gate2q lines report +1 when idle and mostly +2 under load (+1 ×3, +2 ×97). gate2q.held always reports +2. When the fixture lets queue 1's refresh copy land before the checks (through x2w_d3d12_linear_buffer_test_pause point 2), the line becomes exactly the CI failure, with both queues reading B. So the non-held after.consumer_waits > before.consumer_waits assumes timing that WARP doesn't guarantee, while gate2q.held and its skip_consumer_wait control already check the wait deterministically. I'm leaving that check as it is. If it fails again, this is the first place to look. I'm not opening a PR for it, so this issue stays open; no PR uses Fixes #3426.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7256974759 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3426#issuecomment-7256974759). Originally posted by [Not-Saii](https://github.com/Not-Saii) on 2026-11-29T14:01:03Z. --- Results of the loops from my claim. Base `212d4b5f`. Windows 11 build 26300; WARP; NVIDIA GeForce RTX 4090, driver 32.0.16.1088; Windows SDK 10.0.26100. `dev` (Debug) and `release` (/O2) presets. Each loop runs `ctest --preset <dev|release> --no-tests=error -R '^<test>$'` a fixed number of times and counts failures. "load 24" adds 24 busy-loop processes on a 24-thread CPU. "2 cores" pins ctest, the test and 4 busy-loop processes to two logical CPUs. Each configuration also passed one `--repeat until-fail:200` run. | Test | Debug idle / load 24 / 2 cores | /O2 idle / load 24 / 2 cores | |---|---|---| | `xmem_startup_below_40` | 0/1000, 0/1000, 0/1000 | 0/1000, 0/1000, 0/1000 | | `linear_buffer_backing_copy_warp` | 0/200, 0/200, 0/200 | 0/200, 0/200, 0/200 | | `startup_resource_retire_warp_debug0` | 0/1000, 167/1000, 134/1000 | 0/1000, 630/1000, 224/1000 | | `startup_resource_retire_hardware_debug0` (RTX 4090) | 0/1000, 0/1000, not run | 0/1000, 0/1000, not run | **`startup_resource_retire_hardware_debug0`** reproduces on WARP under CPU load, with the CI output. The cause is in the test: the `in flight passed` stage waits for only one of the four queues before draining. The fix and its evidence are in #3457. **`xmem_startup_below_40`: unreproduced in 6000 runs.** I don't claim a fix. What I measured: - When the fixture itself starts a thread right after `check_boundary()` reserves the low range, the thread's stack lands at the base of the 4 MiB window (`000000FFFFC00000`). The test then fails with exactly the CI output, 200 of 200 times: overflow refused with error 8, `boundary: size=0x400000 -> 0000000000000000 (error 8)`, `check_failed: boundary_allocated`. An unconstrained `VirtualAlloc` lands above 2^40 and doesn't interfere. - In 1000 runs under load, the test process locally has exactly one thread at start, at the boundary setup and at exit. So I have no evidence that a thread, or anything else, actually takes the window on CI. A thread started by the system on the slower runner is a hypothesis. - A change that keeps every check: leave eight free ranges of 4 MiB − 64 KiB just below the window, which new stacks take first and which can't hold the checked blocks. With 1 or 12 forced threads, it fails 0/200 (the current test fails 200/200 with 1). That change is in #3458, as hardening rather than a fix. **`linear_buffer_backing_copy_warp` (`copy xmem gate2q`): unreproduced in 1200 runs.** The CI line passes every predicate except `consumer waits +0`. `linear_buffer_backing.h` counts a consumer wait only when the internal refresh has not completed by the time each submission checks. Skipping the wait when the copy has already landed is correct. Measured with the unmodified test, 100 runs each: the non-held `gate2q` lines report +1 when idle and mostly +2 under load (+1 ×3, +2 ×97). `gate2q.held` always reports +2. When the fixture lets queue 1's refresh copy land before the checks (through `x2w_d3d12_linear_buffer_test_pause` point 2), the line becomes exactly the CI failure, with both queues reading B. So the non-held `after.consumer_waits > before.consumer_waits` assumes timing that WARP doesn't guarantee, while `gate2q.held` and its `skip_consumer_wait` control already check the wait deterministically. I'm leaving that check as it is. If it fails again, this is the first place to look. I'm not opening a PR for it, so this issue stays open; no PR uses `Fixes #3426`. AI-assisted.
R0Y00 commented 2026-12-03 17:25:40 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T17:25:40Z.


One matching result on RTX 4060 Laptop, Windows 11 build 26300, MSVC Debug during independent #3950 validation (72b10c2d): linear_buffer_backing_copy_hardware, copy xmem gate2q, both B reads 1,024/1,024, consumer waits +0. The exact-head retry passed three times, and the parent test source passed five times against the same runtime. #3950 adds a separate reference mode and leaves the gate2q path in place. Keeping this with the already-recorded WARP signature for tracking.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7386490067 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3426#issuecomment-7386490067). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-03T17:25:40Z. --- One matching result on RTX 4060 Laptop, Windows 11 build 26300, MSVC Debug during independent #3950 validation (72b10c2d): linear_buffer_backing_copy_hardware, copy xmem gate2q, both B reads 1,024/1,024, consumer waits +0. The exact-head retry passed three times, and the parent test source passed five times against the same runtime. #3950 adds a separate reference mode and leaves the gate2q path in place. Keeping this with the already-recorded WARP signature for tracking.
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
R0Y00/Xbox2Windows#3426
No description provided.