Tests: avoid poisoning SYNC_GRAPH with an unmapped fake fence in queue_tests (#1978) #2002

Manually merged
github merged 1 commit from gh-pr/2002/head into gh-pr/2002/base 2026-11-26 05:14:06 +00:00
Owner

@⁠zondy1i on GitHub · 2026-11-25 00:37 UTC · original
zondy1i:d3d12x/fix-parallel-test-race → main · +52 −3 · 3 files · 1 commits · merged 2026-11-25 18:14 UTC

Fixes #1978.

hle::d3d12x::real::queue_tests::queue_slot_18_before_the_layout_is_known_writes_8_bytes pushed an unmapped sentinel address (0x5EED_0000) into real::FENCES and invoked queue_dispatch(14, this, fence, 1, 0, 0) with a mock signal returning 0 (S_OK). Because hr >= 0, queue_dispatch registered that bogus pointer in fence_x::FENCES (note_queue_signal) and list_x::SYNC_GRAPH.title_fences (note_title_queue_signal), while the test only removed it from real::FENCES.

Under --test-threads=1, hle::d3d12x::list_x::tests::* ran alphabetically before hle::d3d12x::real::queue_tests, hiding the bug. Under parallel cargo test, queue_tests finished first and left 0x5EED_0000 in SYNC_GRAPH.title_fences; as soon as any concurrent list_x test ran would_signal_close_cycle, prune_title_fence(0x5EED_0000, tf) called ID3D12Fence::GetCompletedValue() through the unmapped address and killed the test runner with 0xc0000005 STATUS_ACCESS_VIOLATION.

What is in it

  • Replace the unmapped 0x5EED_0000 sentinel in queue_tests (crates/xcl/src/hle/d3d12x/real.rs) with a valid minimal stack ID3D12Fence COM vtable whose GetCompletedValue returns u64::MAX, so any concurrent prune_title_fence call during the test executes safely without UB.
  • Add #[cfg(test)] cleanup helpers fence_x::forget_fence_for_test (crates/xcl/src/hle/d3d12x/fence_x.rs) and list_x::forget_title_fence_for_test (crates/xcl/src/hle/d3d12x/list_x.rs), invoked from a Drop guard in queue_tests under the respective locks before the stack mock objects go out of scope.
  • Test-only change (#[cfg(test)]); no runtime code paths modified.

Tested

  • Hardware: NVIDIA GeForce RTX 3060 Ti 8 GB (driver 621.01), AMD Ryzen 5 7500F, 64 GB RAM, Windows 11, rustc 1.100.0 (0ef1bc386 2026-11-09), debug tests + release smoke.
  • Before fix: cargo test -p xcl --lib -- hle::d3d12x::real::queue_tests hle::d3d12x::list_x crashed 3/3 runs with 0xc0000005 STATUS_ACCESS_VIOLATION.
  • After fix (rebased onto ea088a5 at a18f4ab): cargo test -p xcl --lib -- --test-threads=4 hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa hle::d3d12x::real::queue_tests hle::d3d12x::list_x::tests::cross_queue_ passed (5/5), plus 5/5 --test-threads=32 runs on 1d85dd1 and 10/10 runs on 4197910.

Regression run

main:

xcl-smoke v1
commit: 80f4819098e921f2e1ab371144d4832f68ffedd6
gpu: NVIDIA GeForce RTX 3060 Ti
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1622 (PresentX 1622)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16539 MB

PR:

xcl-smoke v1
commit: a18f4abdcd96de28414fb2826bab73ef42d9a4b2
gpu: NVIDIA GeForce RTX 3060 Ti
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1645 (PresentX 1645)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15200 MB

Not tested

  • Full workspace parallel test run; Intel GPUs; Linux / Wine + vkd3d-proton.

AI use

  • Antigravity (Gemini 4 Neon) reproduced #1978, traced the 0x5EED_0000 leak into SYNC_GRAPH.title_fences, implemented the test-only fix, rebased onto latest main, ran parallel verification and smoke runs, and drafted this description.
**@⁠zondy1i** on GitHub · 2026-11-25 00:37 UTC · [original](https://github.com/xcl-dev/xcl/pull/2002) `zondy1i:d3d12x/fix-parallel-test-race` → `main` · +52 −3 · 3 files · 1 commits · merged 2026-11-25 18:14 UTC Fixes #1978. `hle::d3d12x::real::queue_tests::queue_slot_18_before_the_layout_is_known_writes_8_bytes` pushed an unmapped sentinel address (`0x5EED_0000`) into `real::FENCES` and invoked `queue_dispatch(14, this, fence, 1, 0, 0)` with a mock `signal` returning `0` (`S_OK`). Because `hr >= 0`, `queue_dispatch` registered that bogus pointer in `fence_x::FENCES` (`note_queue_signal`) and `list_x::SYNC_GRAPH.title_fences` (`note_title_queue_signal`), while the test only removed it from `real::FENCES`. Under `--test-threads=1`, `hle::d3d12x::list_x::tests::*` ran alphabetically before `hle::d3d12x::real::queue_tests`, hiding the bug. Under parallel `cargo test`, `queue_tests` finished first and left `0x5EED_0000` in `SYNC_GRAPH.title_fences`; as soon as any concurrent `list_x` test ran `would_signal_close_cycle`, `prune_title_fence(0x5EED_0000, tf)` called `ID3D12Fence::GetCompletedValue()` through the unmapped address and killed the test runner with `0xc0000005 STATUS_ACCESS_VIOLATION`. **What is in it** - Replace the unmapped `0x5EED_0000` sentinel in `queue_tests` (`crates/xcl/src/hle/d3d12x/real.rs`) with a valid minimal stack `ID3D12Fence` COM vtable whose `GetCompletedValue` returns `u64::MAX`, so any concurrent `prune_title_fence` call during the test executes safely without UB. - Add `#[cfg(test)]` cleanup helpers `fence_x::forget_fence_for_test` (`crates/xcl/src/hle/d3d12x/fence_x.rs`) and `list_x::forget_title_fence_for_test` (`crates/xcl/src/hle/d3d12x/list_x.rs`), invoked from a `Drop` guard in `queue_tests` under the respective locks before the stack mock objects go out of scope. - Test-only change (`#[cfg(test)]`); no runtime code paths modified. **Tested** - Hardware: NVIDIA GeForce RTX 3060 Ti 8 GB (driver 621.01), AMD Ryzen 5 7500F, 64 GB RAM, Windows 11, `rustc 1.100.0 (0ef1bc386 2026-11-09)`, debug tests + release smoke. - Before fix: `cargo test -p xcl --lib -- hle::d3d12x::real::queue_tests hle::d3d12x::list_x` crashed **3/3 runs** with `0xc0000005 STATUS_ACCESS_VIOLATION`. - After fix (rebased onto `ea088a5` at `a18f4ab`): `cargo test -p xcl --lib -- --test-threads=4 hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa hle::d3d12x::real::queue_tests hle::d3d12x::list_x::tests::cross_queue_` passed (5/5), plus 5/5 `--test-threads=32` runs on `1d85dd1` and 10/10 runs on `4197910`. **Regression run** main: ``` xcl-smoke v1 commit: 80f4819098e921f2e1ab371144d4832f68ffedd6 gpu: NVIDIA GeForce RTX 3060 Ti title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1622 (PresentX 1622) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16539 MB ``` PR: ``` xcl-smoke v1 commit: a18f4abdcd96de28414fb2826bab73ef42d9a4b2 gpu: NVIDIA GeForce RTX 3060 Ti title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1645 (PresentX 1645) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15200 MB ``` **Not tested** - Full workspace parallel test run; Intel GPUs; Linux / Wine + vkd3d-proton. **AI use** - Antigravity (Gemini 4 Neon) reproduced #1978, traced the `0x5EED_0000` leak into `SYNC_GRAPH.title_fences`, implemented the test-only fix, rebased onto latest `main`, ran parallel verification and smoke runs, and drafted this description.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:14:04 +00:00
github manually merged commit a18f4abdcd into gh-pr/2002/base 2026-11-26 05:14:06 +00:00
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 01:13 UTC · original

Review note on 4197910:

  • Diff audited and CI workflow approved (currently running).
  • As noted by @upipibi, #1523 targets the same fake-fence SYNC_GRAPH issue in queue_slot_18_before_the_layout_is_known_writes_8_bytes. Depending on which approach is preferred, #2002 will still need Build and test green plus an AMD verification pass before merge.
**@⁠raylitebull** on GitHub · 2026-11-25 01:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/2002#issuecomment-7149324388) Review note on `4197910`: - Diff audited and `CI` workflow approved (currently running). - As noted by `@upipibi`, `#1523` targets the same fake-fence `SYNC_GRAPH` issue in `queue_slot_18_before_the_layout_is_known_writes_8_bytes`. Depending on which approach is preferred, `#2002` will still need `Build and test` green plus an **AMD** verification pass before merge.
Author
Owner

@⁠JoaoPauluu on GitHub · 2026-11-25 02:56 UTC · original

A run under Wine on Linux, with vkd3d-proton as the host D3D12. The 0xc0000005 from #1978 does not reproduce here, so this cannot confirm the fix. Another abort shows up in the same test pair, on main and on this PR alike.

Tested

  • RTX 3060 12 GB (NVIDIA 620.70.06), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257. Release lib test binaries, cross-built for x86_64-pc-windows-gnu: 4197910 as it is (based on 6567c5f) and main cbc296a, no uncommitted changes. Each run is one Wine process with --test-threads=4, 10 runs of each, main and this PR alternating.
  • hle::d3d12x::real::queue_tests hle::d3d12x::list_x (the pair from #1978):
    • main: 8 of 10 runs ok. 30 passed. In 2, the process died.
    • this PR: 7 of 10 runs ok. 28 passed. In 3, the process died.
    • Every death prints glibc's double free or corruption (!prev) right after vkd3d-proton/DXVK report Found device: NVIDIA GeForce RTX 3060, i.e. while a device is being made. The last test reported before it was list_x::tests::a_mirrored_buffer_binds_its_mirror_without_asking_readable ... ok each time. No 0xc0000005 in any run.
  • hle::d3d12x as a whole:
    • main: 10 of 10 runs end 175 passed; 2 failed; 2 ignored.
    • this PR: 8 of 10 runs end 158 passed; 2 failed; 2 ignored. In 2, the same double free abort came after bind::tests::reset_and_clear_state_track_initial_pso_and_clear_root_args ... ok.
    • The 2 failures are the same on both and in every run: bind::tests::execute_indirect_reads_the_arguments_written_before_it (bind.rs:1086) and device_x::tests::gpu_depth_buffer_created_for_unordered_access_is_placed (device_x.rs:1126). They are unrelated to this PR.

The abort is in the host's C heap (Wine / vkd3d-proton / the Vulkan driver) while devices are made in parallel. It may be a vkd3d-proton or driver problem rather than XCL's, and I have not narrowed it down. It occurs with and without this PR at about the same rate.

Not tested

  • native Windows (where #1978's crash is), whether the abort also occurs with a single test making devices in a loop, the whole suite.

AI use

  • Claude Code (Claude Opus 5.5) built both commits, ran the runs and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
**@⁠JoaoPauluu** on GitHub · 2026-11-25 02:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/2002#issuecomment-7151385175) A run under Wine on Linux, with vkd3d-proton as the host D3D12. The `0xc0000005` from #1978 does not reproduce here, so this cannot confirm the fix. Another abort shows up in the same test pair, on `main` and on this PR alike. **Tested** - RTX 3060 12 GB (NVIDIA 620.70.06), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257. Release lib test binaries, cross-built for `x86_64-pc-windows-gnu`: `4197910` as it is (based on `6567c5f`) and `main` `cbc296a`, no uncommitted changes. Each run is one Wine process with `--test-threads=4`, 10 runs of each, main and this PR alternating. - `hle::d3d12x::real::queue_tests hle::d3d12x::list_x` (the pair from #1978): - `main`: 8 of 10 runs `ok. 30 passed`. In 2, the process died. - this PR: 7 of 10 runs `ok. 28 passed`. In 3, the process died. - Every death prints glibc's `double free or corruption (!prev)` right after vkd3d-proton/DXVK report `Found device: NVIDIA GeForce RTX 3060`, i.e. while a device is being made. The last test reported before it was `list_x::tests::a_mirrored_buffer_binds_its_mirror_without_asking_readable ... ok` each time. No `0xc0000005` in any run. - `hle::d3d12x` as a whole: - `main`: 10 of 10 runs end `175 passed; 2 failed; 2 ignored`. - this PR: 8 of 10 runs end `158 passed; 2 failed; 2 ignored`. In 2, the same `double free` abort came after `bind::tests::reset_and_clear_state_track_initial_pso_and_clear_root_args ... ok`. - The 2 failures are the same on both and in every run: `bind::tests::execute_indirect_reads_the_arguments_written_before_it` (`bind.rs:1086`) and `device_x::tests::gpu_depth_buffer_created_for_unordered_access_is_placed` (`device_x.rs:1126`). They are unrelated to this PR. The abort is in the host's C heap (Wine / vkd3d-proton / the Vulkan driver) while devices are made in parallel. It may be a vkd3d-proton or driver problem rather than XCL's, and I have not narrowed it down. It occurs with and without this PR at about the same rate. **Not tested** - native Windows (where #1978's crash is), whether the abort also occurs with a single test making devices in a loop, the whole suite. **AI use** - Claude Code (Claude Opus 5.5) built both commits, ran the runs and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 03:51 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 03:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/2002#issuecomment-7152303727) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-25 04:08 UTC · original

AMD Windows verification for PR #2002 at 4197910e7706d722ecbeac7701d345453dc6340a

The maintainer requested an AMD pass on the parallel queue-test crash in #1978. I tested this PR's clean exact head against current main cbc296ab65a2661a61e3e2da109134bcd5319f60 on Windows 11 build 26200, Radeon RX 6800M (driver 30.0.13002.13003), Ryzen 9 5980HX, Rust 1.99.0 MSVC, with XCL_ADAPTER=6800M and 32 test threads.

Each invocation used cargo test -p xcl --lib --locked -j 2 -- --exact --test-threads=32 --show-output <queue_slot_18...> <list_x...>. The first exact test was hle::d3d12x::real::queue_tests::queue_slot_18_before_the_layout_is_known_writes_8_bytes; I paired it separately with:

  1. hle::d3d12x::list_x::tests::cross_queue_cycle_and_same_queue_fifo_do_not_deadlock
  2. hle::d3d12x::list_x::tests::cross_queue_wait64_before_signal_does_not_deadlock_submit_thread
Pair Current main PR #2002 head
Queue slot + cross-queue cycle 5/5 runs exited 0xc0000005 STATUS_ACCESS_VIOLATION before a test total 5/5 runs passed, 2 passed, 0 failed, 0 ignored each
Queue slot + Wait64 before signal 5/5 runs exited 0xc0000005 STATUS_ACCESS_VIOLATION before a test total 5/5 runs passed, 2 passed, 0 failed, 0 ignored each

cargo build --locked --workspace -j 2 also passed on the PR head. These runs exercise the reported test interaction and support the test-only crash fix on AMD. They do not establish that PR #2002 is preferable to the overlapping #1523, nor that the full workspace suite is green.

Not tested: Full library/workspace suite, retail title smoke, Intel/NVIDIA GPUs, or a merge of this older PR base with current main. No game data was used.

AI assistance: OpenAI Codex (GPT-6) ran the comparison and drafted this report.

**@⁠luckyteagirl** on GitHub · 2026-11-25 04:08 UTC · [original](https://github.com/xcl-dev/xcl/pull/2002#issuecomment-7152559227) ### AMD Windows verification for PR #2002 at `4197910e7706d722ecbeac7701d345453dc6340a` The maintainer requested an AMD pass on the parallel queue-test crash in #1978. I tested this PR's clean exact head against current `main` `cbc296ab65a2661a61e3e2da109134bcd5319f60` on Windows 11 build 26200, Radeon RX 6800M (driver `30.0.13002.13003`), Ryzen 9 5980HX, Rust `1.99.0` MSVC, with `XCL_ADAPTER=6800M` and 32 test threads. Each invocation used `cargo test -p xcl --lib --locked -j 2 -- --exact --test-threads=32 --show-output <queue_slot_18...> <list_x...>`. The first exact test was `hle::d3d12x::real::queue_tests::queue_slot_18_before_the_layout_is_known_writes_8_bytes`; I paired it separately with: 1. `hle::d3d12x::list_x::tests::cross_queue_cycle_and_same_queue_fifo_do_not_deadlock` 2. `hle::d3d12x::list_x::tests::cross_queue_wait64_before_signal_does_not_deadlock_submit_thread` | Pair | Current main | PR #2002 head | | --- | --- | --- | | Queue slot + cross-queue cycle | 5/5 runs exited `0xc0000005 STATUS_ACCESS_VIOLATION` before a test total | 5/5 runs passed, **2 passed, 0 failed, 0 ignored** each | | Queue slot + Wait64 before signal | 5/5 runs exited `0xc0000005 STATUS_ACCESS_VIOLATION` before a test total | 5/5 runs passed, **2 passed, 0 failed, 0 ignored** each | `cargo build --locked --workspace -j 2` also passed on the PR head. These runs exercise the reported test interaction and support the test-only crash fix on AMD. They do not establish that PR #2002 is preferable to the overlapping #1523, nor that the full workspace suite is green. **Not tested:** Full library/workspace suite, retail title smoke, Intel/NVIDIA GPUs, or a merge of this older PR base with current main. No game data was used. AI assistance: OpenAI Codex (GPT-6) ran the comparison and drafted this report.
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 10:42 UTC · original

Update: #1523 was closed in favour of this PR and #2002 now passes both NVIDIA (RTX 3060 Ti) and AMD (RX 6800M 5/5) verification on 4197910. Recent merges on main created a merge conflict (DIRTY) — @⁠zondy1i, please rebase onto latest main so CI runs and we can merge!

**@⁠raylitebull** on GitHub · 2026-11-25 10:42 UTC · [original](https://github.com/xcl-dev/xcl/pull/2002#issuecomment-7160075836) Update: #1523 was closed in favour of this PR and #2002 now passes both **NVIDIA** (RTX 3060 Ti) and **AMD** (RX 6800M 5/5) verification on 4197910. Recent merges on main created a merge conflict (DIRTY) — @⁠zondy1i, please rebase onto latest main so CI runs and we can merge!
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 11:00 UTC · original

Checked CI run 45598579825 on 1d85dd1: 1154 passed; 1 failed.

  • The single failing test is hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa (crates/xcl/src/hle/d3d12x/device_x.rs:1376), which is a pre-existing failure on origin/main unrelated to #2002; all queue_tests and list_x tests passed.

Remaining before merge: Re-run CI once the main device_x test fix lands (or rebase), plus independent AMD GPU verification on 1d85dd1.

**@⁠raylitebull** on GitHub · 2026-11-25 11:00 UTC · [original](https://github.com/xcl-dev/xcl/pull/2002#issuecomment-7160465016) Checked CI run `45598579825` on `1d85dd1`: `1154 passed; 1 failed`. - The single failing test is `hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa` (`crates/xcl/src/hle/d3d12x/device_x.rs:1376`), which is a pre-existing failure on `origin/main` unrelated to `#2002`; all `queue_tests` and `list_x` tests passed. **Remaining before merge:** Re-run CI once the `main` `device_x` test fix lands (or rebase), plus independent **AMD** GPU verification on `1d85dd1`.
Author
Owner

@⁠throny on GitHub · 2026-11-25 15:07 UTC · original

Two contributors checked independently and found that #2206 solves the same problem (for #1978) in a different way: #1607, group D77. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

**@⁠throny** on GitHub · 2026-11-25 15:07 UTC · [original](https://github.com/xcl-dev/xcl/pull/2002#issuecomment-7166351417) <!-- xcl-1607-hint:D77 --> Two contributors checked independently and found that #2206 solves the same problem (for #1978) in a different way: #1607, group D77. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
Author
Owner

@⁠zondy1i on GitHub · 2026-11-25 15:32 UTC · original · edited 2026-11-25 15:39 UTC

Comparison for #1607 (group D77: #2002 vs #2206):

  • #2002 fixes the root cause of #1978 directly (3 files, test-only #[cfg(test)]): replaces the unmapped 0x5EED_0000 sentinel in queue_tests with a valid minimal COM vtable and cleans up fence_x::FENCES / list_x::SYNC_GRAPH via a Drop guard, without serializing parallel D3D12 tests. Both CI checks are green on a18f4ab, it is MERGEABLE, verified on NVIDIA and AMD (RX 6800M 5/5), and #1523 was already closed in its favour.
  • #2206 bundles #1978 together with unrelated changes for #2016 and #2196 across 10 files (flagged in review for scope mismatch), serializes tests behind a global TEST_LOCK instead of removing the unmapped pointer UB, has merge conflicts, and fails PR description.

Only one fix is needed for #1978; #2002 is self-contained and ready to merge.

**@⁠zondy1i** on GitHub · 2026-11-25 15:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/2002#issuecomment-7166999860) · edited 2026-11-25 15:39 UTC Comparison for #1607 (group D77: #2002 vs #2206): - **#2002** fixes the root cause of #1978 directly (3 files, test-only `#[cfg(test)]`): replaces the unmapped `0x5EED_0000` sentinel in `queue_tests` with a valid minimal COM vtable and cleans up `fence_x::FENCES` / `list_x::SYNC_GRAPH` via a `Drop` guard, without serializing parallel D3D12 tests. Both CI checks are green on `a18f4ab`, it is `MERGEABLE`, verified on NVIDIA and AMD (RX 6800M 5/5), and #1523 was already closed in its favour. - **#2206** bundles #1978 together with unrelated changes for #2016 and #2196 across 10 files (flagged in review for scope mismatch), serializes tests behind a global `TEST_LOCK` instead of removing the unmapped pointer UB, has merge conflicts, and fails `PR description`. Only one fix is needed for #1978; #2002 is self-contained and ready to merge.
Author
Owner

@⁠zondy1i on GitHub · 2026-11-25 10:53 UTC · original · edited 2026-11-25 15:40 UTC

@⁠raylitebull Rebased onto latest main (13c2a40) at 1d85dd1 (resolved the adjacent insertion conflict in list_x.rs next to publish_cpu_cycle_break), re-verified 5/5 parallel queue_tests + list_x::cross_queue_ runs (--test-threads=32), and updated the regression smoke block for 1d85dd1.

**@⁠zondy1i** on GitHub · 2026-11-25 10:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/2002#issuecomment-7160316245) · edited 2026-11-25 15:40 UTC @⁠raylitebull Rebased onto latest `main` (`13c2a40`) at `1d85dd1` (resolved the adjacent insertion conflict in `list_x.rs` next to `publish_cpu_cycle_break`), re-verified 5/5 parallel `queue_tests` + `list_x::cross_queue_` runs (`--test-threads=32`), and updated the regression smoke block for `1d85dd1`.
Author
Owner

@⁠thiagocalile on GitHub · 2026-11-25 16:45 UTC · original

Independent test report for head a18f4abdcd96de28414fb2826bab73ef42d9a4b2 on an AMD Radeon RX 6600 (8 GB VRAM, RDNA2, native wave64).

Tested

  • Hardware: AMD Radeon RX 6600 (8146 MiB VRAM, RDNA2, native wave64 + mesh shaders, driver 32.0.21045.29003, XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.8.2502.11.
  • XCL_ADAPTER=radeon cargo test --no-fail-fast -p xcl --lib -- queue_tests --test-threads=4: 2 passed, 0 failed, 0 ignored (0 skipped).

Not tested: full workspace test suite on this head, NVIDIA/Intel GPUs, or Linux/Wine (test-only PR, no smoke run needed).

AI use: Antigravity (Gemini 4 Neon) ran the builds, tests, and smoke runs and drafted this report; the account owner reviewed and approved posting.

**@⁠thiagocalile** on GitHub · 2026-11-25 16:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/2002#issuecomment-7168477078) Independent test report for head `a18f4abdcd96de28414fb2826bab73ef42d9a4b2` on an **AMD Radeon RX 6600** (8 GB VRAM, RDNA2, native wave64). **Tested** - Hardware: AMD Radeon RX 6600 (8146 MiB VRAM, RDNA2, native wave64 + mesh shaders, driver `32.0.21045.29003`, `XCL_ADAPTER=radeon`), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (`10.0.26200.0`), Rust `1.100.0` (`stable-x86_64-pc-windows-msvc`), DXC `1.8.2502.11`. - `XCL_ADAPTER=radeon cargo test --no-fail-fast -p xcl --lib -- queue_tests --test-threads=4`: **2 passed, 0 failed, 0 ignored** (`0` skipped). **Not tested:** full workspace test suite on this head, NVIDIA/Intel GPUs, or Linux/Wine (test-only PR, no smoke run needed). **AI use:** Antigravity (Gemini 4 Neon) ran the builds, tests, and smoke runs and drafted this report; the account owner reviewed and approved posting.
Author
Owner

@⁠upipibi on GitHub · 2026-11-25 00:41 UTC · original · edited 2026-11-25 17:50 UTC

Overlap note: #1523 (mine, opened earlier for #1487, mergeable, CI green) fixes the same crash. It replaces the 0x5EED_0000 integer in queue_slot_18_before_the_layout_is_known_writes_8_bytes with a static fake ID3D12Fence whose GetCompletedValue returns a completed value, so prune_title_fence no longer calls through an unmapped address. JJAutoCompare linked #1978 to it as well.

This PR goes a step further by also removing the test's entries from fence_x::FENCES and SYNC_GRAPH afterwards, which keeps the shared state clean for later tests. If the maintainers prefer that, I'm happy to close #1523 in its favour. Only one of the two should go in.

Separately confirmed here (RTX 3070, Windows 11): the parallel cargo test -p xcl --lib -- cpu_writes q_release queue run died with 0xc0000005 while list_x's cross-queue tests were running. Single-threaded, it passes on both main and another PR's head.


Added 17:50Z: NVIDIA test report for a18f4ab (head as is, base ea088a5), as asked in #1607's NVIDIA list. RTX 3070 8 GB (Ampere, 32-lane waves), driver 616.56, Windows 11, debug, after cargo build --workspace:

  • cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2: 1236 passed, 0 failed, 46 ignored. The end-to-end title tests pass.
  • main 0829441 on the same machine, same command: 1263 passed, 0 failed, 46 ignored (the PR's base is older, so it has fewer tests).
  • Skipped hle::xaudio2, because its tests fail or hang on this machine on main too. The PR doesn't touch it.
  • SKIPPED lines: 25: 20 no wave64 on this card, 3 f16/f32 forms the per-lane path refuses, 1 no heap windows, and 1 PSO measurement that needs Developer Mode to turn the driver cache off.

AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only; no title run.

**@⁠upipibi** on GitHub · 2026-11-25 00:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/2002#issuecomment-7148780085) · edited 2026-11-25 17:50 UTC Overlap note: #1523 (mine, opened earlier for #1487, mergeable, CI green) fixes the same crash. It replaces the `0x5EED_0000` integer in `queue_slot_18_before_the_layout_is_known_writes_8_bytes` with a static fake `ID3D12Fence` whose `GetCompletedValue` returns a completed value, so `prune_title_fence` no longer calls through an unmapped address. JJAutoCompare linked #1978 to it as well. This PR goes a step further by also removing the test's entries from `fence_x::FENCES` and `SYNC_GRAPH` afterwards, which keeps the shared state clean for later tests. If the maintainers prefer that, I'm happy to close #1523 in its favour. Only one of the two should go in. Separately confirmed here (RTX 3070, Windows 11): the parallel `cargo test -p xcl --lib -- cpu_writes q_release queue` run died with `0xc0000005` while `list_x`'s cross-queue tests were running. Single-threaded, it passes on both `main` and another PR's head. --- **Added 17:50Z: NVIDIA test report for `a18f4ab`** (head as is, base `ea088a5`), as asked in #1607's NVIDIA list. RTX 3070 8 GB (Ampere, 32-lane waves), driver 616.56, Windows 11, debug, after `cargo build --workspace`: - `cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2`: **1236 passed, 0 failed, 46 ignored**. The end-to-end title tests pass. - `main` `0829441` on the same machine, same command: 1263 passed, 0 failed, 46 ignored (the PR's base is older, so it has fewer tests). - Skipped `hle::xaudio2`, because its tests fail or hang on this machine on `main` too. The PR doesn't touch it. - SKIPPED lines: 25: 20 `no wave64` on this card, 3 f16/f32 forms the per-lane path refuses, 1 no heap windows, and 1 PSO measurement that needs Developer Mode to turn the driver cache off. AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only; no title run.
Author
Owner

@⁠oni-swr on GitHub · 2026-11-25 18:05 UTC · original

AMD RX 7800 XT run of a18f4abdcd96de28414fb2826bab73ef42d9a4b2 (PR head, as-is).

Tested

  • AMD Radeon RX 7800 XT 16 GB (RDNA3, native 64-lane waves), driver 32.0.31035.1003; Ryzen 7 5700X3D; Windows 11 Pro 26200; Rust 1.100.0 MSVC; Windows SDK DXC; debug build
  • The diff only adds #[cfg(test)] helpers and changes the queue_tests module (checked in the diff).
  • cargo test --workspace --no-fail-fast -- --test-threads=4: lib 1175 passed, 1 failed, 26 ignored; every other test binary passed. queue_tests::queue_slot_18_before_the_layout_is_known_writes_8_bytes and newer_layout_maps_dispatch_mesh_to_slot_129_not_128 passed, with no crash from the parallel run.
  • The 1 failure: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 fails (seed 722: res[30] = 0x1, CPU 0x7fffffff); it fails the same way on main in my run, so it is not caused by this PR.
  • main (origin/main 68a284a596bd558b6bd9db6eedda6d6aa178c360) in the same setup: 1218 passed, 2 failed (the fuzz test and lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier).

Not tested

  • scripts/smoke.ps1: not run, as the diff is test-only (a maintainer's test-only label covers it).
  • The full suite ran once, so a rare parallel crash would not necessarily show.
  • NVIDIA, Intel, other AMD generations.

AI use

  • Test report written and run by Claude Code (Claude Sonnet 5.5); no code changed.
**@⁠oni-swr** on GitHub · 2026-11-25 18:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/2002#issuecomment-7170416202) AMD RX 7800 XT run of `a18f4abdcd96de28414fb2826bab73ef42d9a4b2` (PR head, as-is). **Tested** - AMD Radeon RX 7800 XT 16 GB (RDNA3, native 64-lane waves), driver 32.0.31035.1003; Ryzen 7 5700X3D; Windows 11 Pro 26200; Rust 1.100.0 MSVC; Windows SDK DXC; debug build - The diff only adds `#[cfg(test)]` helpers and changes the `queue_tests` module (checked in the diff). - `cargo test --workspace --no-fail-fast -- --test-threads=4`: lib **1175 passed, 1 failed, 26 ignored**; every other test binary passed. `queue_tests::queue_slot_18_before_the_layout_is_known_writes_8_bytes` and `newer_layout_maps_dispatch_mesh_to_slot_129_not_128` passed, with no crash from the parallel run. - The 1 failure: `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` fails (seed 722: `res[30] = 0x1, CPU 0x7fffffff`); it fails the same way on `main` in my run, so it is not caused by this PR. - `main` (`origin/main` `68a284a596bd558b6bd9db6eedda6d6aa178c360`) in the same setup: 1218 passed, 2 failed (the fuzz test and `lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier`). **Not tested** - `scripts/smoke.ps1`: not run, as the diff is test-only (a maintainer's `test-only` label covers it). - The full suite ran once, so a rare parallel crash would not necessarily show. - NVIDIA, Intel, other AMD generations. **AI use** - Test report written and run by Claude Code (Claude Sonnet 5.5); no code changed.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 07:05 UTC · original

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

**@⁠DavidM1911** on GitHub · 2026-11-26 07:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/2002#issuecomment-7185078276) 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
This discussion has been locked. Commenting is limited to contributors.
No description provided.