Tests: the GPU-wait watchdog releases a bridged Wait64 whose producer was never submitted #2433

Open
tiagonleal wants to merge 2 commits from upstream-pr/2443 into main
tiagonleal commented 2026-11-25 19:06:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-25T19:06:44Z.


Part of #1452.

A Wait64BitValueX is bridged to a GPU queue.Wait whenever a Write64BitValueX for the same address has been recorded (try_gpu_wait). If that producer list is recorded but never submitted, the log shows prod=qNone ... wait-before-signal and recorded=<v> submitted=0x0 completed=0x0, and the waiting queue stays blocked until the sync watchdog signals the fence on the CPU after XCL_GPU_WAIT_TIMEOUT_MS (5 s by default). Nothing in the test suite arms a wait this way and waits for the real xcl-sync-watchdog thread: the only test of the expiry path, cpu_watchdog_signal_with_inflight_gpu_signal_completes_cleanly, signals the fence by hand.

What is in it

  • One #[cfg(test)] test in crates/xcl/src/hle/d3d12x/list_x.rs, unsubmitted_write64_producer_wait_is_released_by_the_watchdog (+82 lines, nothing outside mod tests).
  • It records a COMPUTE list with Write64 and a DIRECT list with the matching Wait64, arms the DIRECT list's wait on its queue through execute_with_waits_on (the COMPUTE list is never submitted), then signals a fence on that queue. It checks that the fence stays at 0 while the wait is armed (submitted_max == 0), that it reaches 1 after the watchdog timeout and not before, that the cell records the CPU release (no armed waits left, cpu_signaled_max == 0x677), and that the queue runs more work afterwards.
  • The timeout is a OnceLock read from the environment, so the test uses whatever it resolved to (5 s by default, about 5.4 s of wall time) instead of setting a process-wide variable that could race with the other tests. Same GPU-or-WARP device setup as the neighbouring tests.

It passes on main and only pins the current behaviour; no runtime code changes. It will also catch a change that stops expiring waits with no known producer, which is what #1046, #1045 and #1123 touch.

Tested

  • Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 5070 Ti 16 GB (driver 617.42), AMD Ryzen 7 9800X3D, 32 GB RAM, on 3f277701 plus this commit. No game was running when the runs started.
  • cargo test -p xcl --lib unsubmitted_write64_producer -- --nocapture: 1 passed; the log shows the bridged to GPU queue.Wait (... prod=qNone ...; wait-before-signal ...) line and then did not complete within 5000 ms ... released on CPU. The same test binary run alone 5 times: 5/5 passed (5.3 s each).
  • hle::d3d12x with --test-threads=4, 3 runs: 246 passed, 0 failed, 2 ignored each time.
  • cargo test --workspace -j 6 -- --test-threads=4, 3 runs: 1275 passed, 5 failed, 26 ignored each time; the new test passes in all 3. The 5 failures are the same on 3f277701 without this commit (1274 passed, 5 failed, 26 ignored): gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0 to _3 and gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier. 24 SKIPPED lines per run on this adapter (no wave64 and similar).

Notes on the test

  • The DIRECT list is deliberately not executed (execute_with_waits_on still arms the queue.Wait): ExecuteCommandLists goes through the queue hook, which would add the queue, blocked for 5 s, to present::QUEUES, and the sparse tests (flush_parked..., a_tile_decommitted...) and readback_routing_tests then wait on it and fail when they run in that window. I found this because the first version executed the list and failed 3 other tests in a parallel run.
  • When another test has installed that hook, ExecuteCommandLists also re-enters execute_with_waits_on, so a bridged wait can be armed twice for one list (seen with --test-threads=4); the assertions accept one or more armed waits for that reason. Observation only, not changed here.

Update, second commit 84ee77d1 (review request)

  • The test now installs a guard right after its registrations. Its Drop runs the cleanup on a normal return and on unwind: on_release for both lists, the fence, and the two SYNC_GRAPH entries. +22/−7, still nothing outside mod tests.
  • Failure path checked with a panic! forced right after the guard: hle::d3d12x with --test-threads=4 gave 245 passed, 1 failed (the forced one), 2 ignored. The panic is not in the commit.
  • At 84ee77d1: the test alone 5 of 5; hle::d3d12x 3 runs, 246 passed, 0 failed each; cargo test --workspace --no-fail-fast -j 4 -- --test-threads=4 twice, 1353 passed, 5 failed, 46 ignored each time (25 SKIPPED lines), the same 5 failures as above. These totals count every test binary of the workspace.
  • After the rebase onto main f9a0cb80 (head 82d0e7ad): cargo test --workspace --no-fail-fast -- --test-threads=4, one run: 1461 passed, 4 failed, 47 ignored (25 SKIPPED lines). The 4 failures are gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0 to _3, as before. The other results in this section are from the earlier heads named in them.

Regression run
scripts/smoke.ps1 -Seconds 60 -Title 9cc6a39e (Newer Retail Game), release builds of both commits in clean trees, run again after the rebase onto main f9a0cb80. Both runs had XCL_PREPARE=0 and the same warm DXIL cache, one after the other in the same session, main first, one run each. A warm-up run of main came before them and is not shown.

main (f9a0cb80):

xcl-smoke v1
commit: f9a0cb80f9decb41d6f6315f6cf4e06270ba2bda
gpu: NVIDIA GeForce RTX 5070 Ti
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1663 (PresentX 1664)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14753 MB

This PR (82d0e7ad):

xcl-smoke v1
commit: 82d0e7add48ae6312799b09bd35ffaa73319aece
gpu: NVIDIA GeForce RTX 5070 Ti
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1671 (PresentX 1672)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14735 MB

Not tested

  • XCL_GPU_WAIT_TIMEOUT_MS set to a non-default value (the value is read once per process).
  • Linux / Wine + vkd3d-proton, Intel and AMD GPUs, WARP (the test falls back to it, but it was run on the GPU).

AI use

  • Claude Code with Claude Sonnet 5.5: wrote the test and this description and ran the tests on my machine. Claude Code with Claude Fable 5.2: chose the case from our run logs and reviewed the diff.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5497451398 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2443). Originally posted by [tiagonleal](https://github.com/tiagonleal) on 2026-11-25T19:06:44Z. --- Part of #1452. A `Wait64BitValueX` is bridged to a GPU `queue.Wait` whenever a `Write64BitValueX` for the same address has been recorded (`try_gpu_wait`). If that producer list is recorded but never submitted, the log shows `prod=qNone ... wait-before-signal` and `recorded=<v> submitted=0x0 completed=0x0`, and the waiting queue stays blocked until the sync watchdog signals the fence on the CPU after `XCL_GPU_WAIT_TIMEOUT_MS` (5 s by default). Nothing in the test suite arms a wait this way and waits for the real `xcl-sync-watchdog` thread: the only test of the expiry path, `cpu_watchdog_signal_with_inflight_gpu_signal_completes_cleanly`, signals the fence by hand. **What is in it** - One `#[cfg(test)]` test in `crates/xcl/src/hle/d3d12x/list_x.rs`, `unsubmitted_write64_producer_wait_is_released_by_the_watchdog` (+82 lines, nothing outside `mod tests`). - It records a COMPUTE list with `Write64` and a DIRECT list with the matching `Wait64`, arms the DIRECT list's wait on its queue through `execute_with_waits_on` (the COMPUTE list is never submitted), then signals a fence on that queue. It checks that the fence stays at 0 while the wait is armed (`submitted_max == 0`), that it reaches 1 after the watchdog timeout and not before, that the cell records the CPU release (no armed waits left, `cpu_signaled_max == 0x677`), and that the queue runs more work afterwards. - The timeout is a `OnceLock` read from the environment, so the test uses whatever it resolved to (5 s by default, about 5.4 s of wall time) instead of setting a process-wide variable that could race with the other tests. Same GPU-or-WARP device setup as the neighbouring tests. It passes on main and only pins the current behaviour; no runtime code changes. It will also catch a change that stops expiring waits with no known producer, which is what #1046, #1045 and #1123 touch. **Tested** - Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 5070 Ti 16 GB (driver 617.42), AMD Ryzen 7 9800X3D, 32 GB RAM, on `3f277701` plus this commit. No game was running when the runs started. - `cargo test -p xcl --lib unsubmitted_write64_producer -- --nocapture`: 1 passed; the log shows the `bridged to GPU queue.Wait (... prod=qNone ...; wait-before-signal ...)` line and then `did not complete within 5000 ms ... released on CPU`. The same test binary run alone 5 times: 5/5 passed (5.3 s each). - `hle::d3d12x` with `--test-threads=4`, 3 runs: 246 passed, 0 failed, 2 ignored each time. - `cargo test --workspace -j 6 -- --test-threads=4`, 3 runs: 1275 passed, 5 failed, 26 ignored each time; the new test passes in all 3. The 5 failures are the same on `3f277701` without this commit (1274 passed, 5 failed, 26 ignored): `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0` to `_3` and `gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier`. 24 `SKIPPED` lines per run on this adapter (`no wave64` and similar). **Notes on the test** - The DIRECT list is deliberately not executed (`execute_with_waits_on` still arms the `queue.Wait`): `ExecuteCommandLists` goes through the queue hook, which would add the queue, blocked for 5 s, to `present::QUEUES`, and the sparse tests (`flush_parked...`, `a_tile_decommitted...`) and `readback_routing_tests` then wait on it and fail when they run in that window. I found this because the first version executed the list and failed 3 other tests in a parallel run. - When another test has installed that hook, `ExecuteCommandLists` also re-enters `execute_with_waits_on`, so a bridged wait can be armed twice for one list (seen with `--test-threads=4`); the assertions accept one or more armed waits for that reason. Observation only, not changed here. **Update, second commit 84ee77d1 (review request)** - The test now installs a guard right after its registrations. Its `Drop` runs the cleanup on a normal return and on unwind: `on_release` for both lists, the fence, and the two `SYNC_GRAPH` entries. +22/−7, still nothing outside `mod tests`. - Failure path checked with a `panic!` forced right after the guard: `hle::d3d12x` with `--test-threads=4` gave 245 passed, 1 failed (the forced one), 2 ignored. The panic is not in the commit. - At 84ee77d1: the test alone 5 of 5; `hle::d3d12x` 3 runs, 246 passed, 0 failed each; `cargo test --workspace --no-fail-fast -j 4 -- --test-threads=4` twice, 1353 passed, 5 failed, 46 ignored each time (25 `SKIPPED` lines), the same 5 failures as above. These totals count every test binary of the workspace. - After the rebase onto `main` `f9a0cb80` (head `82d0e7ad`): `cargo test --workspace --no-fail-fast -- --test-threads=4`, one run: 1461 passed, 4 failed, 47 ignored (25 `SKIPPED` lines). The 4 failures are `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0` to `_3`, as before. The other results in this section are from the earlier heads named in them. **Regression run** `scripts/smoke.ps1 -Seconds 60 -Title 9cc6a39e` (Newer Retail Game), release builds of both commits in clean trees, run again after the rebase onto `main` `f9a0cb80`. Both runs had `XCL_PREPARE=0` and the same warm DXIL cache, one after the other in the same session, `main` first, one run each. A warm-up run of `main` came before them and is not shown. `main` (`f9a0cb80`): ``` xcl-smoke v1 commit: f9a0cb80f9decb41d6f6315f6cf4e06270ba2bda gpu: NVIDIA GeForce RTX 5070 Ti title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1663 (PresentX 1664) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14753 MB ``` This PR (`82d0e7ad`): ``` xcl-smoke v1 commit: 82d0e7add48ae6312799b09bd35ffaa73319aece gpu: NVIDIA GeForce RTX 5070 Ti title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1671 (PresentX 1672) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14735 MB ``` **Not tested** - `XCL_GPU_WAIT_TIMEOUT_MS` set to a non-default value (the value is read once per process). - Linux / Wine + vkd3d-proton, Intel and AMD GPUs, WARP (the test falls back to it, but it was run on the GPU). **AI use** - Claude Code with Claude Sonnet 5.5: wrote the test and this description and ran the tests on my machine. Claude Code with Claude Fable 5.2: chose the case from our run logs and reviewed the diff. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
copilot-pull-request-reviewer[bot] commented 2026-11-25 19:06:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-25T19:06:57Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

<!-- greyfinch-sync:ivall/xcl:review:6063402862 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2443#pullrequestreview-6063402862). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/apps/copilot-pull-request-reviewer) on 2026-11-25T19:06:57Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level. An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. [Learn about Copilot code review billing](https://docs.github.com/en/copilot/concepts/agents/code-review#code-review-usage).
emirduran707 commented 2026-11-25 20:08:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-25T19:54:42Z.


Independent AMD RDNA4 (native wave64) test report on exact head 9dd81efd3145e6456cbc72025794eb3b9949c831 (clean detached checkout, no local changes).

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64, driver 32.0.31044.16), Ryzen 5 5600, 32 GB RAM, Windows 11 Pro 26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17; tests debug, smoke release.
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1355 passed, 3 failed, 46 ignored; 8 SKIPPED (6 in lower_dxil::tests::{f16,f32}_programs_on_the_gpu refused by per-lane form; heap_window_out_of_memory_falls_back_to_the_switch_form; pso_measurement_compiles_an_exact_synthetic_record). All native wave64 GPU tests ran and passed.
    • The PR's test passed: hle::d3d12x::list_x::tests::unsubmitted_write64_producer_wait_is_released_by_the_watchdog.
    • The 3 failures are pre-existing on the PR's base main: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 (seed 722) and fuzz_validate_and_gpu_3 (seed 1599) on this GPU, plus gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier (from 50a9fde / #2074, fixed later on main in #2420).

Regression run (60 s retail-title smoke, XCL_NETWORK=0, release)

xcl-smoke v1
commit: 9dd81efd3145e6456cbc72025794eb3b9949c831
gpu: AMD Radeon RX 9060 XT
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1557 (PresentX 1557)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14277 MB

(Matched main 68a284a baseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)

Not tested

  • D3D12 debug layer; Intel GPUs.

AI use

  • Antigravity with Gemini 4 Neon ran the build, test suite, and smoke run and drafted this report.
<!-- greyfinch-sync:ivall/xcl:comment:7172931797 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2443#issuecomment-7172931797). Originally posted by [emirduran707](https://github.com/emirduran707) on 2026-11-25T19:54:42Z. --- Independent AMD RDNA4 (native wave64) test report on exact head `9dd81efd3145e6456cbc72025794eb3b9949c831` (clean detached checkout, no local changes). **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64, driver 32.0.31044.16), Ryzen 5 5600, 32 GB RAM, Windows 11 Pro 26300, Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), DXC 1.9.2602.17; tests debug, smoke release. - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4`: **1355 passed, 3 failed, 46 ignored; 8 SKIPPED** (6 in `lower_dxil::tests::{f16,f32}_programs_on_the_gpu` refused by per-lane form; `heap_window_out_of_memory_falls_back_to_the_switch_form`; `pso_measurement_compiles_an_exact_synthetic_record`). All native wave64 GPU tests ran and passed. - The PR's test passed: `hle::d3d12x::list_x::tests::unsubmitted_write64_producer_wait_is_released_by_the_watchdog`. - The 3 failures are pre-existing on the PR's base `main`: `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` (seed 722) and `fuzz_validate_and_gpu_3` (seed 1599) on this GPU, plus `gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier` (from `50a9fde` / #2074, fixed later on `main` in #2420). **Regression run** (60 s retail-title smoke, `XCL_NETWORK=0`, release) ``` xcl-smoke v1 commit: 9dd81efd3145e6456cbc72025794eb3b9949c831 gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1557 (PresentX 1557) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14277 MB ``` (Matched `main` `68a284a` baseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.) **Not tested** - D3D12 debug layer; Intel GPUs. **AI use** - Antigravity with Gemini 4 Neon ran the build, test suite, and smoke run and drafted this report.
SlopTart commented 2026-11-25 20:08:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T20:02:41Z.


gpu_ suite (cold cache): 160 passed / 4 failed, no crashes. The four are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, depth-buffer state refusal, and gpu_promoted_uav_clear_values_pass_create_committed_resource (report); none caused by this PR.
Targeted run of the new watchdog tests (unsubmitted_write64_producer_wait_is_released_by_the_watchdog and friends): 3 passed, including the 5 s release path, on this lane. Related to the failures I logged on #2439: the two d11_* tests that hang until the watchdog fires are the same mechanism, and this PR's harness approach looks compatible.

<!-- greyfinch-sync:ivall/xcl:comment:7173109161 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2443#issuecomment-7173109161). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-25T20:02:41Z. --- `gpu_` suite (cold cache): 160 passed / 4 failed, no crashes. The four are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, depth-buffer state refusal, and `gpu_promoted_uav_clear_values_pass_create_committed_resource` ([report](https://github.com/xcl-dev/xcl/pull/2280#issuecomment-7172066690)); none caused by this PR. Targeted run of the new watchdog tests (`unsubmitted_write64_producer_wait_is_released_by_the_watchdog` and friends): 3 passed, including the 5 s release path, on this lane. Related to the failures I logged on #2439: the two `d11_*` tests that hang until the watchdog fires are the same mechanism, and this PR's harness approach looks compatible.
DavidM1911 commented 2026-11-25 21:05:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T20:15:59Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7173416625 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2443#issuecomment-7173416625). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T20:15:59Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun. Thanks!
luckyteagirl commented 2026-11-25 22:06:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-25T21:57:21Z.


One test-isolation issue: this fixture calls on_create for both lists and records the fake va in the sync graph, but on_release and the graph/fence cleanup run only after the assertions and the final expect. If the watchdog behavior regresses, an assertion panics first; the COM lists and cell then drop while their raw addresses remain in global test state. Later tests running in the same process can encounter stale registrations and report secondary failures unrelated to their own code.

Could you install a small scope guard immediately after registration to run the existing cleanup on both normal return and unwind? This is especially useful for a test whose purpose is to catch a timeout/failure path.

Read-only review of head 9dd81efd3145e6456cbc72025794eb3b9949c831; I did not build or run it. AI use: OpenAI Codex and a Luna subagent inspected the diff and drafted this finding.

<!-- greyfinch-sync:ivall/xcl:comment:7175752533 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2443#issuecomment-7175752533). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-25T21:57:21Z. --- One test-isolation issue: this fixture calls `on_create` for both lists and records the fake `va` in the sync graph, but `on_release` and the graph/fence cleanup run only after the assertions and the final `expect`. If the watchdog behavior regresses, an assertion panics first; the COM lists and `cell` then drop while their raw addresses remain in global test state. Later tests running in the same process can encounter stale registrations and report secondary failures unrelated to their own code. Could you install a small scope guard immediately after registration to run the existing cleanup on both normal return and unwind? This is especially useful for a test whose purpose is to catch a timeout/failure path. Read-only review of head `9dd81efd3145e6456cbc72025794eb3b9949c831`; I did not build or run it. AI use: OpenAI Codex and a Luna subagent inspected the diff and drafted this finding.
luckyteagirl commented 2026-11-25 23:09:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-25T22:21:56Z.


Focused RX 6800M report for exact PR head 9dd81efd3145e6456cbc72025794eb3b9949c831 (clean detached worktree).

Tested

  • AMD Radeon RX 6800M, driver 30.0.13002.13003; Windows 11 Home build 26200; Rust 1.99.0 MSVC.
  • XCL_ADAPTER=6800M XCL_REQUIRE_GPU=1 XCL_DIRECT_DXIL=1 cargo test --locked -p xcl --lib -j 2 unsubmitted_write64_producer_wait_is_released_by_the_watchdog -- --test-threads=1 --show-output: 1 passed, 0 failed, 0 ignored, 0 skipped. The expected 5-second GPU wait timeout released on CPU; no SKIPPED record appeared. Resource guard: none. Log: filter-unsubmitted-write64-watchdog.log.

Not tested

  • Full test suite, retail-title smoke, other GPUs.

AI use

  • OpenAI Codex (exact model variant unavailable in this session) ran this focused test and drafted this report.
<!-- greyfinch-sync:ivall/xcl:comment:7176271105 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2443#issuecomment-7176271105). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-25T22:21:56Z. --- Focused RX 6800M report for exact PR head `9dd81efd3145e6456cbc72025794eb3b9949c831` (clean detached worktree). **Tested** - AMD Radeon RX 6800M, driver `30.0.13002.13003`; Windows 11 Home build 26200; Rust `1.99.0` MSVC. - `XCL_ADAPTER=6800M XCL_REQUIRE_GPU=1 XCL_DIRECT_DXIL=1 cargo test --locked -p xcl --lib -j 2 unsubmitted_write64_producer_wait_is_released_by_the_watchdog -- --test-threads=1 --show-output`: **1 passed, 0 failed, 0 ignored, 0 skipped**. The expected 5-second GPU wait timeout released on CPU; no `SKIPPED` record appeared. Resource guard: none. Log: `filter-unsubmitted-write64-watchdog.log`. **Not tested** - Full test suite, retail-title smoke, other GPUs. **AI use** - OpenAI Codex (exact model variant unavailable in this session) ran this focused test and drafted this report.
tiagonleal commented 2026-11-25 23:09:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-25T22:41:49Z.


Done in 84ee77d1. The test now installs a guard right after the registrations, and its Drop runs the cleanup that used to sit at the end of the test: on_release for both lists, the fence, and the two SYNC_GRAPH entries. It runs on a normal return and on unwind, and it takes over a poisoned lock so it cannot panic a second time.

To check the failure path I forced a panic! right after the guard and ran cargo test -p xcl --lib -- hle::d3d12x --test-threads=4: 245 passed, 1 failed (the forced one), 2 ignored. The panic is not in the commit.

The suite counts and the two smoke blocks in the description are for the new head.

<!-- greyfinch-sync:ivall/xcl:comment:7176679750 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2443#issuecomment-7176679750). Originally posted by [tiagonleal](https://github.com/tiagonleal) on 2026-11-25T22:41:49Z. --- Done in 84ee77d1. The test now installs a guard right after the registrations, and its `Drop` runs the cleanup that used to sit at the end of the test: `on_release` for both lists, the fence, and the two `SYNC_GRAPH` entries. It runs on a normal return and on unwind, and it takes over a poisoned lock so it cannot panic a second time. To check the failure path I forced a `panic!` right after the guard and ran `cargo test -p xcl --lib -- hle::d3d12x --test-threads=4`: 245 passed, 1 failed (the forced one), 2 ignored. The panic is not in the commit. The suite counts and the two smoke blocks in the description are for the new head.
DavidM1911 commented 2026-11-26 03:06:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T02:12:18Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7180564990 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2443#issuecomment-7180564990). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T02:12:18Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
Foniass commented 2026-12-01 08:06:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:06:15Z.


Triage (#1607) – head 82d0e7a

No open or merged PR adds this test. #2499 (merged) tests a different watchdog case: the lost wake-up of a wait armed during the check. Main still has no test that arms a bridged Wait64 with an unsubmitted producer and waits for the real watchdog to release it.
The test only touches mod tests, cleans up its global state in a Drop guard, and does not execute the list through the queue hook, so it does not leak a blocked queue into present::QUEUES. It adds about 5 s to the suite (the watchdog timeout). No problems found in the diff.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7304878362 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2443#issuecomment-7304878362). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:06:15Z. --- **Triage (#1607)** – head 82d0e7a No open or merged PR adds this test. #2499 (merged) tests a different watchdog case: the lost wake-up of a wait armed during the check. Main still has no test that arms a bridged `Wait64` with an unsubmitted producer and waits for the real watchdog to release it. The test only touches `mod tests`, cleans up its global state in a `Drop` guard, and does not execute the list through the queue hook, so it does not leak a blocked queue into `present::QUEUES`. It adds about 5 s to the suite (the watchdog timeout). No problems found in the diff. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
fromthemoonx commented 2026-12-03 11:01:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-12-03T11:01:08Z.


merge-check
base: 16c2fd082a
head: 82d0e7add4
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> the lib binary is ended by the new test (exit code 0x80004005), so it has no counts; the other binaries: 156 passed, 0 failed, 20 ignored. The lib binary with the new test skipped: 2856 passed, 0 failed, 36 ignored. SKIPPED: 24 until the process ended; failing: unsubmitted_write64_producer_wait_is_released_by_the_watchdog, 30 of 30 runs alone. It is new in this PR; base passes its own suite.
review: read the whole diff (1 file, +97). One blocker, caused by a change on main after this PR's base:

  1. High: the test now stops the whole test process. Since dd84e0ad ("D3D12.X: fail closed on unproven wait timeouts", in main through #2959), the watchdog no longer releases such a wait by default. It calls stop_for_unresolved_wait, which ends the process. The log of the test alone ends with:
    a GPU queue wait exceeded its watchdog without a graph-proven cycle – the title is stopped before its remaining GPU submission
    All lib tests that had not run yet are lost with it. CI on this head is green because it ran on 2026-11-27, before that change was on main.
  2. The release that the test describes still exists behind XCL_WAIT_TIMEOUT_CONTINUE=1: with it the test passes 5 of 5 here. That setting is read once per process, so it cannot be set for one test in the shared process.
  3. A way to keep the test: run it in a child process with XCL_WAIT_TIMEOUT_CONTINUE=1, as the tests in console_heap.rs do with current_exe(). A second child without the variable could check the default, that the process ends with 0x80004005.
    performance: none at run time, test only. The test takes about 5.3 s.
    verdict: not yet: on current main the new test ends the lib test binary (point 1)
    hardware / tool and model: RTX 3060 12 GB (610.88), Ryzen 7 5700X, Windows 11 Pro 26300 / Claude Code (Claude Opus 5.5)

@tiagonleal point 1 needs a change after a rebase onto main.

<!-- greyfinch-sync:ivall/xcl:comment:7376097970 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2443#issuecomment-7376097970). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-12-03T11:01:08Z. --- merge-check base: 16c2fd082ae2e96967a2ab553bc2e1032e491f70 head: 82d0e7add48ae6312799b09bd35ffaa73319aece merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> the lib binary is ended by the new test (exit code 0x80004005), so it has no counts; the other binaries: 156 passed, 0 failed, 20 ignored. The lib binary with the new test skipped: 2856 passed, 0 failed, 36 ignored. SKIPPED: 24 until the process ended; failing: `unsubmitted_write64_producer_wait_is_released_by_the_watchdog`, 30 of 30 runs alone. It is new in this PR; base passes its own suite. review: read the whole diff (1 file, +97). One blocker, caused by a change on main after this PR's base: 1) **High: the test now stops the whole test process.** Since dd84e0ad ("D3D12.X: fail closed on unproven wait timeouts", in main through #2959), the watchdog no longer releases such a wait by default. It calls `stop_for_unresolved_wait`, which ends the process. The log of the test alone ends with: `a GPU queue wait exceeded its watchdog without a graph-proven cycle – the title is stopped before its remaining GPU submission` All lib tests that had not run yet are lost with it. CI on this head is green because it ran on 2026-11-27, before that change was on main. 2) The release that the test describes still exists behind `XCL_WAIT_TIMEOUT_CONTINUE=1`: with it the test passes 5 of 5 here. That setting is read once per process, so it cannot be set for one test in the shared process. 3) A way to keep the test: run it in a child process with `XCL_WAIT_TIMEOUT_CONTINUE=1`, as the tests in `console_heap.rs` do with `current_exe()`. A second child without the variable could check the default, that the process ends with 0x80004005. performance: none at run time, test only. The test takes about 5.3 s. verdict: not yet: on current main the new test ends the lib test binary (point 1) hardware / tool and model: RTX 3060 12 GB (610.88), Ryzen 7 5700X, Windows 11 Pro 26300 / Claude Code (Claude Opus 5.5) @tiagonleal point 1 needs a change after a rebase onto main.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2443:upstream-pr/2443'
git switch 'upstream-pr/2443'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2443'
git switch 'upstream-pr/2443'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2443'
git switch 'upstream-pr/2443'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2443'
git switch 'main'
git merge --squash 'upstream-pr/2443'
git switch 'main'
git merge --ff-only 'upstream-pr/2443'
git switch 'main'
git merge 'upstream-pr/2443'
git push origin 'main'
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
xcl-dev/xcl!2433
No description provided.