Skip to content

Tests: account for deferred stand-in pipeline release - #3484

Closed
bmjask wants to merge 1 commit into
xcl-dev:mainfrom
bmjask:tests/standin-late-release-race
Closed

bmjask wants to merge 1 commit into
xcl-dev:mainfrom
bmjask:tests/standin-late-release-race

Conversation

@bmjask

@bmjask bmjask commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

The concurrent stand-in regression test merged in #2369 assumes that releasing the final shell synchronously releases the winning driver pipeline. Production intentionally routes that pipeline through late_release, so the test races deferred cleanup and fails on current main and in unrelated PR CI.

This test-only follow-up captures the deferred release deterministically, verifies the winner remains held until that point, and then releases the captured reference before checking final counts.

What is in it

  • standin.rs test only: initialize the existing LET_GO capture before releasing both shells.
  • Verify the winner is deferred, the loser is already released, and the root signature count is exact.
  • Release the captured winner and verify all final reference counts.

Tested

  • Hardware: NVIDIA GeForce RTX 4090, Windows, debug and release.
  • Failing first on current main: concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline failed with one winner reference left.
  • Fixed test repeated 25 times: 25 passed, 0 failed.
  • .\scripts\test.ps1: 2,793 passed, 0 failed, 49 ignored. GPU skips: 8 no-wave64 aggregate plus 15 reported feature/instruction skips.

Regression run
Base:

xcl-smoke v1
commit: 5b0d5fa3d65d9aa61567f8603154d818a9307846
gpu: NVIDIA GeForce RTX 4090
title: retail-fixture
seconds: 60
exit: 0x0
frames shown: 1516 (PresentX 1516)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16888 MB

Head:

xcl-smoke v1
commit: 1f517a05efdb76b13744ffc1b7a48be3270029b4
gpu: NVIDIA GeForce RTX 4090
title: retail-fixture
seconds: 60
exit: 0x0
frames shown: 1544 (PresentX 1544)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 15473 MB

Not tested

  • AMD hardware.
  • Production behavior is unchanged; only the test harness changed.

AI use
Codex with GPT-5 diagnosed the current-main CI failure, corrected the test harness, and ran the reported verification.

The concurrent stand-in test expected the winning pipeline to be released synchronously with its last shell. Production intentionally routes that pipeline through late_release, so the assertion raced the deferred release and failed in no-GPU CI.

Capture the deferred release deterministically, verify the winning reference, and release it before checking final counts.

Assisted-by: Codex (GPT-5)
@Foniass

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Review (head 1f517a0, diff read, not a merge-check; it conflicts with main, so not built or run):

  • Superseded by main. 5454468 ("Tests: the stand-in race test keeps the let-go pipeline on its thread", on main since 2026-11-30) fixes the same test the same way in the same lines of standin.rs: take LET_GO, check it holds the winner, release it, clear LET_GO. That is why this PR conflicts. Its only extra is a middle check (1, 0, 1) before the winner is released, which is correct but adds little.
  • The commit and PR text say the test raced the deferred release; it failed on every run (no race), as 5454468 says.

Recommendation: close as superseded by 5454468.

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

@throny

throny commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

Closing as superseded: this change is already on main (5454468). 5454468 changes the same test the same way (let_go_taken before, assert the winner is let go, unref it, clear LET_GO); PR adds one extra refs assert after the release

Two independent checks found this: Foniass's close list on #1607 and ours against current main. If something here is still missing on main, say so and reopen it, or ask and I will.

AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

@throny throny added the duplicate This issue or pull request already exists label Dec 1, 2026
@throny throny closed this Dec 1, 2026
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 duplicate This issue or pull request already exists gpu:both Code affects both AMD and NVIDIA GPUs (scope tag; see needs:*-test for remaining checks)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants