Skip to content

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

Merged
throny merged 1 commit into
xcl-dev:mainfrom
Pipodi:test-pso-no-fake-pipeline
Dec 1, 2026
Merged

throny merged 1 commit into
xcl-dev:mainfrom
Pipodi:test-pso-no-fake-pipeline

Conversation

@Pipodi

@Pipodi Pipodi commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

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 53e85fb 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 20de241 on main f3bb664.
  • 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 Tests: name the trailing VGPRs in the D16 resinfo kernel test #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).

@github-actions github-actions Bot added area:d3d12 D3D12.X runtime, command lists, resources, sparse memory area:shaders Shader cache, PSO compilation, pipeline libraries, precompilation gpu:both Code affects both AMD and NVIDIA GPUs (scope tag; see needs:*-test for remaining checks) labels Nov 30, 2026
graphics_first_use_carries_the_exact_serialized_recipe_identity submits a
lazy pipeline whose job returns the fake pointer 0x4332 and calls
released(standin) at once. If a build-ahead worker has already taken the
job, released() marks the build an orphan and complete() Releases the fake
result (pso_async.rs 3019-3020), which aborts the lib process: a
misaligned-pointer panic in windows-core, 0xc0000409, on thread
xcl-pso-ahead-N.

Measured on main 53e85fb: 2 aborts in 24 runs of the hle::d3d12x subset,
both on xcl-pso-ahead workers, and one of two workspace runs. It is a race
and cannot be shown on demand.

The job returns 0, so there is nothing for a worker to Release. The test
checks the recipe identity only and does not use the pipeline value.
Test-only; no runtime code changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ettehn

ettehn commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

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.

@Pipodi
Pipodi force-pushed the test-pso-no-fake-pipeline branch from 137179f to 20de241 Compare November 30, 2026 09:28
@github-actions github-actions Bot added needs-pr-check Failing the PR description check (CONTRIBUTING.md) and removed needs-pr-check Failing the PR description check (CONTRIBUTING.md) labels Nov 30, 2026
@Foniass

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Review (head 20de241, 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

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

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

Foniass commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

merge-check
base: 6bfb5c5
head: 20de241
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.

@github-actions github-actions Bot added needs-2nd-check Has 1 safe merge-check; needs second independent check (#3041) needs:amd-test Needs a test report or merge-check on an AMD GPU labels Dec 1, 2026
@throny

throny commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

merge-check claim
head: 20de241

@throny

throny commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

merge-check
base: f07e426
head: 20de241 (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

@github-actions github-actions Bot added ready-to-merge Has 2 independent safe merge-checks on current head (#3041) and removed needs-2nd-check Has 1 safe merge-check; needs second independent check (#3041) needs:amd-test Needs a test report or merge-check on an AMD GPU labels Dec 1, 2026
@throny
throny merged commit ffcd8b2 into xcl-dev:main Dec 1, 2026
5 of 7 checks passed
@throny

throny commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:d3d12 D3D12.X runtime, command lists, resources, sparse memory area:shaders Shader cache, PSO compilation, pipeline libraries, precompilation gpu:both Code affects both AMD and NVIDIA GPUs (scope tag; see needs:*-test for remaining checks) ready-to-merge Has 2 independent safe merge-checks on current head (#3041)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants