Tests: pso_async first-use test submits a job that builds nothing #3493

Merged
Pipodi merged 1 commit from upstream-pr/3493 into main 2026-12-01 22:07:04 +00:00
Pipodi commented 2026-11-30 02:54:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-30T02:54:07Z.


graphics_first_use_carries_the_exact_serialized_recipe_identity submits a lazy pipeline whose job returns the fake pointer 0x4332, then releases the stand-in at once. When a build-ahead worker has already taken the job, released marks the build an orphan and complete Releases the fake pointer (pso_async.rs 3019-3020). That aborts the whole lib test process with windows-core's misaligned-pointer panic (0xc0000409, STATUS_STACK_BUFFER_OVERRUN) on a xcl-pso-ahead-N thread. On main 53e85fb1 it aborted 2 of 24 runs of the hle::d3d12x subset (both on xcl-pso-ahead workers) and 1 of 2 workspace runs.

The job now returns 0, so a worker has nothing to Release (release(0) is a no-op). The test checks only the recipe identity and never uses the pipeline value. Test-only: no runtime code changes.

Related, not duplicated here: #3474 fixes standin::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline (which fails on main and in CI), and #3472 fixes the other fake-COM abort, in the list_x recording-memory tests.

What is in it

  • crates/xcl/src/hle/d3d12x/pso_async.rs: the test's job returns 0 instead of 0x4332 (+2 −1).

Tested

  • NVIDIA GeForce RTX 4090 (driver 621.40), Intel Core i9-13900K, Windows 11 Pro 10.0.26300, rustc 1.100.0, debug build, head 20de2414 on main f3bb6649.
  • The test alone: 3 of 3 pass, then 60 of 60 runs of the test exe pass.
  • gpuq job 20261130-092937-7c36, cargo build --workspace -j 16 && cargo test --workspace --no-fail-fast -j 16 -- --test-threads=4: 2859 passed, 1 failed, 51 ignored; 25 SKIPPED lines. The 1 failure is main's gpu_direct_image_get_resinfo_d16 (fixed by #3513); the earlier standin failure is gone on this base.
  • No 0xc0000409 abort in any run of this branch.

Regression run

  • Test-only diff in a runtime file; the smoke pair below is on our own GPU anyway (RTX 4090, driver 621.40, 60 s, same title, XCL_PREPARE=0).

main:

xcl-smoke v1
commit: 6bfb5c5153ccc23517daf30aa1071ddb0fadb53c
gpu: NVIDIA GeForce RTX 4090
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1611 (PresentX 1611)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 17826 MB

This PR's head:

xcl-smoke v1
commit: 20de2414af449d71436628c07f4d4cc6c7f58a3f
gpu: NVIDIA GeForce RTX 4090
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1606 (PresentX 1606)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17412 MB

Not tested

  • The race cannot be made to fail on demand, so the failure without the fix is shown only by its rate on main (above), not by a forced run.
  • AMD GPUs.

AI use

  • Claude Code, Claude Opus 5.5 (diagnosis, review, this description) and Claude Sonnet 5.5 (commit, test runs).
<!-- greyfinch-sync:ivall/xcl:issue:5558126830 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3493). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-30T02:54:07Z. --- `graphics_first_use_carries_the_exact_serialized_recipe_identity` submits a lazy pipeline whose job returns the fake pointer `0x4332`, then releases the stand-in at once. When a build-ahead worker has already taken the job, `released` marks the build an orphan and `complete` Releases the fake pointer (`pso_async.rs` 3019-3020). That aborts the whole lib test process with windows-core's misaligned-pointer panic (`0xc0000409`, STATUS_STACK_BUFFER_OVERRUN) on a `xcl-pso-ahead-N` thread. On main 53e85fb1 it aborted 2 of 24 runs of the `hle::d3d12x` subset (both on `xcl-pso-ahead` workers) and 1 of 2 workspace runs. The job now returns 0, so a worker has nothing to Release (`release(0)` is a no-op). The test checks only the recipe identity and never uses the pipeline value. Test-only: no runtime code changes. Related, not duplicated here: #3474 fixes `standin::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline` (which fails on main and in CI), and #3472 fixes the other fake-COM abort, in the `list_x` recording-memory tests. **What is in it** - `crates/xcl/src/hle/d3d12x/pso_async.rs`: the test's job returns 0 instead of `0x4332` (+2 −1). **Tested** - NVIDIA GeForce RTX 4090 (driver 621.40), Intel Core i9-13900K, Windows 11 Pro 10.0.26300, rustc 1.100.0, debug build, head 20de2414 on main f3bb6649. - The test alone: 3 of 3 pass, then 60 of 60 runs of the test exe pass. - gpuq job 20261130-092937-7c36, `cargo build --workspace -j 16 && cargo test --workspace --no-fail-fast -j 16 -- --test-threads=4`: 2859 passed, 1 failed, 51 ignored; 25 `SKIPPED` lines. The 1 failure is main's `gpu_direct_image_get_resinfo_d16` (fixed by #3513); the earlier `standin` failure is gone on this base. - No `0xc0000409` abort in any run of this branch. **Regression run** - Test-only diff in a runtime file; the smoke pair below is on our own GPU anyway (RTX 4090, driver 621.40, 60 s, same title, XCL_PREPARE=0). main: ``` xcl-smoke v1 commit: 6bfb5c5153ccc23517daf30aa1071ddb0fadb53c gpu: NVIDIA GeForce RTX 4090 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1611 (PresentX 1611) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 17826 MB ``` This PR's head: ``` xcl-smoke v1 commit: 20de2414af449d71436628c07f4d4cc6c7f58a3f gpu: NVIDIA GeForce RTX 4090 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1606 (PresentX 1606) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17412 MB ``` **Not tested** - The race cannot be made to fail on demand, so the failure without the fix is shown only by its rate on main (above), not by a forced run. - AMD GPUs. **AI use** - Claude Code, Claude Opus 5.5 (diagnosis, review, this description) and Claude Sonnet 5.5 (commit, test runs).
ettehn commented 2026-11-30 06:19:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ettehn on 2026-11-30T06:19:11Z.


I reproduced the orphaned completion on demand in Windows Release. I merged 137179f5 into d52ff48c and added a local test-only probe. It leaves the lazy job unscheduled (key 0), takes it from pending.build.job, calls released(standin), and asserts that the build is orphaned and unfinished. It then runs the actual run_build on a joined test thread. Each probe ran in a fresh process.

  • Old test result 0x4332 reached that checkpoint and aborted 3/3 with 0xc0000005 (access violation in this Release build).
  • PR result 0 completed and passed 3/3 with the same ordering and first-use recipe assertions.
  • The PR’s existing first-use test passed 10/10 in fresh processes. It also passed with four related PSO lifecycle tests (5 passed, 0 failed, 0 ignored, zero skips).

The single-line change is sufficient for the observed test abort. This was a focused Release test on Windows 11 25H2 (26200.9974), rustc 1.97.1 MSVC. The ordering probe itself is CPU-only.

OpenAI Codex (GPT-6.2 Sol) assisted with source review and Windows verification.

<!-- greyfinch-sync:ivall/xcl:comment:7270525255 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3493#issuecomment-7270525255). Originally posted by [ettehn](https://github.com/ettehn) on 2026-11-30T06:19:11Z. --- I reproduced the orphaned completion on demand in Windows Release. I merged `137179f5` into `d52ff48c` and added a local test-only probe. It leaves the lazy job unscheduled (key 0), takes it from `pending.build.job`, calls `released(standin)`, and asserts that the build is orphaned and unfinished. It then runs the actual `run_build` on a joined test thread. Each probe ran in a fresh process. - Old test result `0x4332` reached that checkpoint and aborted 3/3 with `0xc0000005` (access violation in this Release build). - PR result `0` completed and passed 3/3 with the same ordering and first-use recipe assertions. - The PR’s existing first-use test passed 10/10 in fresh processes. It also passed with four related PSO lifecycle tests (5 passed, 0 failed, 0 ignored, zero skips). The single-line change is sufficient for the observed test abort. This was a focused Release test on Windows 11 25H2 (26200.9974), rustc 1.97.1 MSVC. The ordering probe itself is CPU-only. OpenAI Codex (GPT-6.2 Sol) assisted with source review and Windows verification.
Foniass commented 2026-12-01 08:12:28 +00:00 (Migrated from github.com)

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


Review (head 20de2414, diff read, not a merge-check: PR description fails without the test-only label, so not run here):

  • The test-only label the description asks for hasn't been applied, so PR description keeps failing for lack of xcl-smoke blocks.

Fine: the test still checks first-use behaviour. manifest_recipe and on_use are set by on_first_use_graphics (pso_async.rs ~4604) regardless of the job's result, the fake 0x4332 only ever reached release() on the orphan path, and release(0) does nothing, so nothing is weakened.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7305014135 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3493#issuecomment-7305014135). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:12:28Z. --- Review (head 20de2414, diff read, not a merge-check: `PR description` fails without the `test-only` label, so not run here): - The `test-only` label the description asks for hasn't been applied, so `PR description` keeps failing for lack of xcl-smoke blocks. Fine: the test still checks first-use behaviour. `manifest_recipe` and `on_use` are set by `on_first_use_graphics` (`pso_async.rs` ~4604) regardless of the job's result, the fake `0x4332` only ever reached `release()` on the orphan path, and `release(0)` does nothing, so nothing is weakened. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Foniass commented 2026-12-01 10:04:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T10:04:24Z.


Triage (#1607) – head 20de241

No open or merged PR makes the same change; #3474 and #3472 fix other fake-COM test aborts, not this test.
Checked in the diff: with the job returning 0, an orphaned build-ahead goes through pso_async::complete -> release(0), which is a no-op, and the test only asserts manifest_recipe / on_use, so it no longer depends on the fake pointer. 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:7307626595 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3493#issuecomment-7307626595). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T10:04:24Z. --- **Triage (#1607)** – head 20de241 No open or merged PR makes the same change; #3474 and #3472 fix other fake-COM test aborts, not this test. Checked in the diff: with the job returning 0, an orphaned build-ahead goes through `pso_async::complete` -> `release(0)`, which is a no-op, and the test only asserts `manifest_recipe` / `on_use`, so it no longer depends on the fake pointer. 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.
Foniass commented 2026-12-01 18:44:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T18:44:31Z.


merge-check
base: 6bfb5c5153
head: 20de2414af
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2904 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: read the whole diff (+2/-1, test only, pso_async.rs ~10160). The test's lazy build now returns 0 instead of the fake pipeline 0x4332. That removes the race behind the intermittent "misaligned pointer 0x4332" abort in xcl-pso-ahead-1: the build-ahead worker could build this lazy pipeline before the test released it, and then call Release on the fake pointer. manifest_recipe and on_use are set by on_first_use_graphics (~4604) whatever the build returns, and release(0) does nothing, so the test still checks the same first-use behaviour. No runtime code changes. The race is intermittent, so one clean run can't show it is gone; the reasoning above is what shows it.
performance: none: a test-only change with no runtime code touched, so no smoke run.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5

AI-written and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7321453379 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3493#issuecomment-7321453379). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T18:44:31Z. --- merge-check base: 6bfb5c5153ccc23517daf30aa1071ddb0fadb53c head: 20de2414af449d71436628c07f4d4cc6c7f58a3f merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2904 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none review: read the whole diff (+2/-1, test only, `pso_async.rs` ~10160). The test's lazy build now returns 0 instead of the fake pipeline 0x4332. That removes the race behind the intermittent "misaligned pointer 0x4332" abort in `xcl-pso-ahead-1`: the build-ahead worker could build this lazy pipeline before the test released it, and then call Release on the fake pointer. `manifest_recipe` and `on_use` are set by `on_first_use_graphics` (~4604) whatever the build returns, and `release(0)` does nothing, so the test still checks the same first-use behaviour. No runtime code changes. The race is intermittent, so one clean run can't show it is gone; the reasoning above is what shows it. performance: none: a test-only change with no runtime code touched, so no smoke run. verdict: safe to merge hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5 AI-written and posted by Foniass without a human check of each point.
throny commented 2026-12-01 19:26:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T19:26:18Z.


merge-check claim
head: 20de2414af

<!-- greyfinch-sync:ivall/xcl:comment:7322817008 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3493#issuecomment-7322817008). Originally posted by [throny](https://github.com/throny) on 2026-12-01T19:26:18Z. --- merge-check claim head: 20de2414af449d71436628c07f4d4cc6c7f58a3f
throny commented 2026-12-01 21:02:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T21:02:28Z.


merge-check
base: f07e426dad
head: 20de2414af (same as the claim)
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2904 passed, 0 failed, 51 ignored; 25 SKIPPED lines (no wave64 / heap windows / driver-cache test on this adapter), no test binary ended abnormally
review: none after reading the whole diff (14 lines, one test only). The first-use test now submits a job returning 0 instead of 0x4332, so a worker that builds the job ahead cannot Release a fake pipeline pointer. No runtime code changes. Note: the test body asserts on recipe identity only, which the change does not alter; it is a flake fix for the test, not new coverage.
performance: none: test-only change, no runtime code.
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300; Claude Code, Claude Sonnet 5.5 ran the build and the suite and read the diff; Claude Opus 5.5 checked this report

<!-- greyfinch-sync:ivall/xcl:comment:7325651679 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3493#issuecomment-7325651679). Originally posted by [throny](https://github.com/throny) on 2026-12-01T21:02:28Z. --- merge-check base: f07e426dade72aa7112cf6bfe08ca6f6ff5a9d5c head: 20de2414af449d71436628c07f4d4cc6c7f58a3f (same as the claim) merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2904 passed, 0 failed, 51 ignored; 25 SKIPPED lines (no wave64 / heap windows / driver-cache test on this adapter), no test binary ended abnormally review: none after reading the whole diff (14 lines, one test only). The first-use test now submits a job returning 0 instead of 0x4332, so a worker that builds the job ahead cannot Release a fake pipeline pointer. No runtime code changes. Note: the test body asserts on recipe identity only, which the change does not alter; it is a flake fix for the test, not new coverage. performance: none: test-only change, no runtime code. verdict: safe to merge hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300; Claude Code, Claude Sonnet 5.5 ran the build and the suite and read the diff; Claude Opus 5.5 checked this report
throny commented 2026-12-01 22:07:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T22:07:27Z.


Merged at the checked head after a combined trial of #3600, #3493, #3608 and #3607 on main f07e426d (RTX 4080 16 GB, cargo test --workspace --no-fail-fast -- --test-threads=4: 2909 passed, 0 failed, 51 ignored, 25 SKIPPED lines). Two merge checks each.

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7327302174 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3493#issuecomment-7327302174). Originally posted by [throny](https://github.com/throny) on 2026-12-01T22:07:27Z. --- Merged at the checked head after a combined trial of #3600, #3493, #3608 and #3607 on `main` `f07e426d` (RTX 4080 16 GB, `cargo test --workspace --no-fail-fast -- --test-threads=4`: 2909 passed, 0 failed, 51 ignored, 25 SKIPPED lines). Two merge checks each. AI use: Claude Code (Claude Opus 5.5).
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!3493
No description provided.