Tests: the stand-in race test keeps the let-go pipeline on its thread #3474

Merged
Foniass merged 1 commit from upstream-pr/3474 into main 2026-11-30 03:02:33 +00:00
Foniass commented 2026-11-29 23:19:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-11-29T23:19:11Z.


hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline (from #2369, merged) fails on every run on main 53e85fb1: 15 of 15 runs, also run alone (left: (0, 1, 1), right: (0, 0, 1)). The test expects the winner's driver pipeline to be released with the last shell. On main the last shell lets it go through late_release::hold_pipeline, which holds it until the queues are past the lists that may bind it. So one reference is still there when the test checks. The runtime is right; the test is not.

The test now keeps what let_go is given on its thread (LET_GO, as set_private_data_validation_and_per_shell_set_name does), checks that it is the winner's pipeline, and releases it. Test-only: only the test changes.

What is in it

  • crates/xcl/src/hle/d3d12x/standin.rs: the test above

Tested

  • NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.2114), AMD Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), debug tests, release smoke
  • cargo test -p xcl --lib standin::tests: 7 passed, 0 failed, 5 runs in a row. Before the change, the test failed on 15 of 15 runs.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on 54544682: 2793 passed, 0 failed, 49 ignored. SKIPPED GPU tests: 45 distinct notices, almost all no wave64.
  • Retail title: 60 s smoke run below. The runtime does not change; the run is here for the check.

Regression run

main:

xcl-smoke v1
commit: 3b6a91ed096d6d6e0fee52cfb86dc0a7d7c8c1b0
gpu: NVIDIA GeForce RTX 5070 Ti
title: 3cb1d8e0
seconds: 60
exit: 0x0
frames shown: 1193 (PresentX 1193)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15684 MB

this PR:

xcl-smoke v1
commit: 54544682011e89267ed230e19c064b8ff589a3aa
gpu: NVIDIA GeForce RTX 5070 Ti
title: 3cb1d8e0
seconds: 60
exit: 0x0
frames shown: 1472 (PresentX 1472)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15598 MB

Not tested

  • Nothing beyond the test; the runtime does not change.

AI use

  • Claude Code with Claude Opus 5.5: found the failure on main, wrote the test change, ran the tests and the smoke runs, wrote this description.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5556238463 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3474). Originally posted by [Foniass](https://github.com/Foniass) on 2026-11-29T23:19:11Z. --- `hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline` (from #2369, merged) fails on every run on main `53e85fb1`: 15 of 15 runs, also run alone (`left: (0, 1, 1)`, `right: (0, 0, 1)`). The test expects the winner's driver pipeline to be released with the last shell. On main the last shell lets it go through `late_release::hold_pipeline`, which holds it until the queues are past the lists that may bind it. So one reference is still there when the test checks. The runtime is right; the test is not. The test now keeps what `let_go` is given on its thread (`LET_GO`, as `set_private_data_validation_and_per_shell_set_name` does), checks that it is the winner's pipeline, and releases it. Test-only: only the test changes. **What is in it** - `crates/xcl/src/hle/d3d12x/standin.rs`: the test above **Tested** - NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.2114), AMD Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), debug tests, release smoke - `cargo test -p xcl --lib standin::tests`: 7 passed, 0 failed, 5 runs in a row. Before the change, the test failed on 15 of 15 runs. - `cargo test --workspace --no-fail-fast -- --test-threads=4` on 54544682: 2793 passed, 0 failed, 49 ignored. SKIPPED GPU tests: 45 distinct notices, almost all `no wave64`. - Retail title: 60 s smoke run below. The runtime does not change; the run is here for the check. **Regression run** main: ``` xcl-smoke v1 commit: 3b6a91ed096d6d6e0fee52cfb86dc0a7d7c8c1b0 gpu: NVIDIA GeForce RTX 5070 Ti title: 3cb1d8e0 seconds: 60 exit: 0x0 frames shown: 1193 (PresentX 1193) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15684 MB ``` this PR: ``` xcl-smoke v1 commit: 54544682011e89267ed230e19c064b8ff589a3aa gpu: NVIDIA GeForce RTX 5070 Ti title: 3cb1d8e0 seconds: 60 exit: 0x0 frames shown: 1472 (PresentX 1472) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15598 MB ``` **Not tested** - Nothing beyond the test; the runtime does not change. **AI use** - Claude Code with Claude Opus 5.5: found the failure on main, wrote the test change, ran the tests and the smoke runs, wrote this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
tiagonleal commented 2026-11-29 23:22:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-29T23:22:38Z.


merge-check
base: 53e85fb124
head: 5454468201
merge: clean
build: cargo build --workspace -> ok
tests: Tier 0 (test-only diff, +5/-0 in standin.rs inside mod tests), so the touched targets and not the whole suite: cargo test -p xcl --lib hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline -- --exact -> passed 10 of 10 on the merged tree; on the base alone it fails with left: (0, 1, 1), right: (0, 0, 1). cargo test -p xcl --lib hle::d3d12x::standin:: -- --test-threads=4 -> 7 passed, 0 failed, 0 ignored. cargo test -p xcl --lib hle::d3d12x::late_release:: -- --test-threads=4 -> 4 passed, 0 failed, 0 ignored. SKIPPED: none in these. Whole suite not run on this head.
review: whole diff read. The test arms LET_GO on its own thread before the shells are made, so the winner's pipeline that the last release lets go is caught there and never reaches late_release's HELD. It then checks that exactly the winner was let go, once, drops that reference and keeps the original (0, 0, 1) check, so it still proves the loser is released and nothing leaks. LET_GO is cleared at the end, as the test above it does. Both releases run on the test's thread, so the capture does not depend on timing. Nothing outside mod tests changes.
performance: none, test-only.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB (617.42), Ryzen 7 9800X3D, 32 GB, Windows 11 26300, rustc 1.100.0, debug / Claude Code (Claude Fable 5.2 ran the tests, read the diff and wrote this)

  • Tiago
<!-- greyfinch-sync:ivall/xcl:comment:7264413370 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3474#issuecomment-7264413370). Originally posted by [tiagonleal](https://github.com/tiagonleal) on 2026-11-29T23:22:38Z. --- merge-check base: 53e85fb124eae624641e9884517e4f3c4a7d8794 head: 54544682011e89267ed230e19c064b8ff589a3aa merge: clean build: cargo build --workspace -> ok tests: Tier 0 (test-only diff, +5/-0 in `standin.rs` inside `mod tests`), so the touched targets and not the whole suite: `cargo test -p xcl --lib hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline -- --exact` -> passed 10 of 10 on the merged tree; on the base alone it fails with `left: (0, 1, 1)`, `right: (0, 0, 1)`. `cargo test -p xcl --lib hle::d3d12x::standin:: -- --test-threads=4` -> 7 passed, 0 failed, 0 ignored. `cargo test -p xcl --lib hle::d3d12x::late_release:: -- --test-threads=4` -> 4 passed, 0 failed, 0 ignored. SKIPPED: none in these. Whole suite not run on this head. review: whole diff read. The test arms `LET_GO` on its own thread before the shells are made, so the winner's pipeline that the last `release` lets go is caught there and never reaches `late_release`'s `HELD`. It then checks that exactly the winner was let go, once, drops that reference and keeps the original `(0, 0, 1)` check, so it still proves the loser is released and nothing leaks. `LET_GO` is cleared at the end, as the test above it does. Both releases run on the test's thread, so the capture does not depend on timing. Nothing outside `mod tests` changes. performance: none, test-only. verdict: safe to merge hardware / tool and model: RTX 5070 Ti 16 GB (617.42), Ryzen 7 9800X3D, 32 GB, Windows 11 26300, rustc 1.100.0, debug / Claude Code (Claude Fable 5.2 ran the tests, read the diff and wrote this) - Tiago
vasanex commented 2026-11-29 23:52:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vasanex on 2026-11-29T23:52:45Z.


merge-check
base: 53e85fb124eae624641e9884517e4f3c4a7d8794
head: 54544682011e89267ed230e19c064b8ff589a3aa
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2793 passed, 0 failed, 49 ignored; SKIPPED: 28 lines (22 no wave64, 3 per-lane f16/f32 forms refused, 2 heap windows opt-in, 1 driver cache needs Developer Mode); failing: none. On the base alone the same command gave 2792 passed, 1 failed, 49 ignored here, the one failure being this PR's test (standin.rs:459, left (0, 1, 1), right (0, 0, 1)) in 4 of 4 whole-suite runs. With the PR: cargo test -p xcl --lib standin::tests -> 7 passed, 0 failed, 5 runs in a row.
review: none. Five lines inside one test in standin.rs, nothing outside mod tests. The test now takes what let_go is given on its thread (LET_GO, as set_private_data_validation_and_per_shell_set_name does), asserts it is the winner's pipeline and releases it, then clears the thread-local. The shells are released on the test's own thread, so the thread-local sees the call; the loser's pipeline is still asserted at 0 references before that, so the test keeps checking that the loser is released at once.
performance: none - test-only.
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 3080 10 GB, driver 32.0.16.2140 (621.40), AMD Ryzen 9 7950X, Windows 11 26200, rustc 1.100.0, debug / Claude Code (Claude Fable 5.2)

Tier 0 (test-only diff): no retail run. A second card for @tiagonleal's check above; the failure on plain main reproduces here on every run, and is gone with this.

<!-- greyfinch-sync:ivall/xcl:comment:7264794666 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3474#issuecomment-7264794666). Originally posted by [vasanex](https://github.com/vasanex) on 2026-11-29T23:52:45Z. --- ```text merge-check base: 53e85fb124eae624641e9884517e4f3c4a7d8794 head: 54544682011e89267ed230e19c064b8ff589a3aa merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2793 passed, 0 failed, 49 ignored; SKIPPED: 28 lines (22 no wave64, 3 per-lane f16/f32 forms refused, 2 heap windows opt-in, 1 driver cache needs Developer Mode); failing: none. On the base alone the same command gave 2792 passed, 1 failed, 49 ignored here, the one failure being this PR's test (standin.rs:459, left (0, 1, 1), right (0, 0, 1)) in 4 of 4 whole-suite runs. With the PR: cargo test -p xcl --lib standin::tests -> 7 passed, 0 failed, 5 runs in a row. review: none. Five lines inside one test in standin.rs, nothing outside mod tests. The test now takes what let_go is given on its thread (LET_GO, as set_private_data_validation_and_per_shell_set_name does), asserts it is the winner's pipeline and releases it, then clears the thread-local. The shells are released on the test's own thread, so the thread-local sees the call; the loser's pipeline is still asserted at 0 references before that, so the test keeps checking that the loser is released at once. performance: none - test-only. verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 3080 10 GB, driver 32.0.16.2140 (621.40), AMD Ryzen 9 7950X, Windows 11 26200, rustc 1.100.0, debug / Claude Code (Claude Fable 5.2) ``` Tier 0 (test-only diff): no retail run. A second card for @tiagonleal's check above; the failure on plain `main` reproduces here on every run, and is gone with this.
Parakeet-Wheat commented 2026-11-30 01:56:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Parakeet-Wheat on 2026-11-30T01:56:06Z.


merge-check
base: 9335bc0d86
head: 5454468201
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2802 passed, 0 failed, 50 ignored; SKIPPED: 29 (22 no wave64, 3 wave32 per-lane form refused (#1426), 2 no heap windows, 1 driver cache needs Developer Mode, 1 no GPU_UPLOAD heaps); failing: none
review: Run alone, concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline fails in 5 of 5 runs on the base and 0 of 5 runs on the merge. Each base failure is the same assertion at standin.rs:459: left: (0, 1, 1), right: (0, 0, 1). The diff adds 5 lines to the test module of standin.rs and changes no runtime code. On the base, the last shell's drop calls let_go, and let_go gives the pipeline to late_release::hold_pipeline. That hold keeps one reference to the winner's pipeline, so the old assertion finds one reference left. The test now turns on the thread-local LET_GO capture, checks that let_go got only the winner's pipeline, and releases that pipeline itself. The test releases both shells on its own thread, so the capture sees the last drop. pipelines_of_one_key_share_a_driver_pipeline_while_one_of_them_lives and a_shell_has_the_drivers_interfaces_and_its_own_references_and_private_data use the same capture and reset. The description names set_private_data_validation_and_per_shell_set_name as the model, but that test does not use LET_GO. standin.rs and late_release.rs have no changes between 53e85fb1 and the base.
performance: No runtime change: the PR changes only a test. This check made no title run.
verdict: safe to merge (test-only; the stand-in race test now passes on our RTX 3070, where it fails on main)
hardware / tool and model: RTX 3070 8 GB (610.88), AMD Ryzen 5 5600X, Windows 11 Home 26300, Rust 1.95.0, debug / Claude Code, Claude Opus 5.5 (merge, build, suite, base and merge reruns, and review)

<!-- greyfinch-sync:ivall/xcl:comment:7266564415 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3474#issuecomment-7266564415). Originally posted by [Parakeet-Wheat](https://github.com/Parakeet-Wheat) on 2026-11-30T01:56:06Z. --- merge-check base: 9335bc0d86dbdc17c0e322bca617f35375b3e289 head: 54544682011e89267ed230e19c064b8ff589a3aa merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2802 passed, 0 failed, 50 ignored; SKIPPED: 29 (22 no wave64, 3 wave32 per-lane form refused (#1426), 2 no heap windows, 1 driver cache needs Developer Mode, 1 no GPU_UPLOAD heaps); failing: none review: Run alone, `concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline` fails in 5 of 5 runs on the base and 0 of 5 runs on the merge. Each base failure is the same assertion at `standin.rs:459`: `left: (0, 1, 1)`, `right: (0, 0, 1)`. The diff adds 5 lines to the test module of `standin.rs` and changes no runtime code. On the base, the last shell's drop calls `let_go`, and `let_go` gives the pipeline to `late_release::hold_pipeline`. That hold keeps one reference to the winner's pipeline, so the old assertion finds one reference left. The test now turns on the thread-local `LET_GO` capture, checks that `let_go` got only the winner's pipeline, and releases that pipeline itself. The test releases both shells on its own thread, so the capture sees the last drop. `pipelines_of_one_key_share_a_driver_pipeline_while_one_of_them_lives` and `a_shell_has_the_drivers_interfaces_and_its_own_references_and_private_data` use the same capture and reset. The description names `set_private_data_validation_and_per_shell_set_name` as the model, but that test does not use `LET_GO`. `standin.rs` and `late_release.rs` have no changes between `53e85fb1` and the base. performance: No runtime change: the PR changes only a test. This check made no title run. verdict: safe to merge (test-only; the stand-in race test now passes on our RTX 3070, where it fails on main) hardware / tool and model: RTX 3070 8 GB (610.88), AMD Ryzen 5 5600X, Windows 11 Home 26300, Rust 1.95.0, debug / Claude Code, Claude Opus 5.5 (merge, build, suite, base and merge reruns, and review)
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!3474
No description provided.