Tests: serialise the stale-blob pipeline test with library builds #3183
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3183"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-28T16:32:44Z.
Part of #3180. #3221 (merged on 29 Nov) already serialises the tests this PR used to lock and made the lock poison-tolerant, so those parts are dropped. The branch is now one commit of two lines.
What is left:
a_stale_blob_the_driver_takes_is_made_with_one_create_and_replacedmakes two pipelines throughPipelines::make_with_cache_path, and every successful make reachespipeline_library::store. The test did not holdBUILD_TEST. When it overlaps a locked test that has a library build active, its pipeline lands in that test's library and the entry count is one too high. This is the class of intermittent failure listed in #3180.It is the only test in the lib test binary that reaches
storewithout the lock. I checked this by reading the callers of themake*functions: the other makes are in tests that already holdBUILD_TEST, thepipeline_librarytests that do not lock useNativeLibrarydirectly, and the two-pass test inreal.rsreturns beforestore.What is in it
shaders.rs: that test takesBUILD_TEST(poison-tolerant, as the other tests do) at its start#[cfg(test)]Tested
cargo test --workspace --no-fail-fast -j 8 -- --test-threads=4on headc3d1bd7d: 2841 passed, 0 failed, 51 ignored (24SKIPPEDlines: 22no wave64, 2no heap windows; the same 24 in both logs).mainf97120dcon the same machine: 2841 passed, 0 failed, 51 ignored.Regression run
scripts/smoke.ps1 -Seconds 60 -Title 9cc6a39e(a retail title), release builds of both commits,mainf97120dcand this PR's headc3d1bd7d, one run each. A second run ofmainafter the PR runs gave 1680 frames.main(f97120dc):This PR (
c3d1bd7d):Not tested
#[cfg(test)]) in a runtime file.AI use
Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-28T21:35:42Z.
I reproduced the builder's 4 instead of 2 failure on Windows WARP and verified this PR's exact diff applies cleanly to merged main
beeb81be. The #3219 hosted run saw 4, and its base run saw 3; both then failed the same three tests on the poisoned lock.I selected the real
builder_deduplicates_names_and_atomically_replaces_outputandsplit_compute_program_prebuilds_and_caches_chain_piecestests. A test-only handshake paused the owner after it opened its replacement library and let the split test reach its first pipeline builds. All waits were bounded. Each row used a fresh process, Ryzen 7 5700X3D, Windows 11, WARP software adapter, debug MSVC. No skips.beeb81be78477c1bBUILD_TESTguard before continuingThe stock overlap added exactly
d64e5342b8bdf90a-cd4-0.chain.psoanddc6482d7869677a9-d50-0.chain.psoto the owner's library. With the guard applied, the schedule released the owner after observing that the waiter could not yet take the lock; the owner verified its two entries and the split test then finished. This supports the existing fix for this pair. No retail run or hardware-GPU result is claimed.AI assistance: OpenAI Codex (GPT-6) prepared and ran the bounded schedule and drafted this note.
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-28T23:09:46Z.
Independent Windows/NVIDIA check of #3183 head
78477c1b, withdb3921dcas its exact parent. Windows 11 build 26300, RTX 3080 Ti / NVIDIA 621.35, Ryzen 7 9800X3D, rustc 1.99.1 MSVC. I built the clean head first so the e2e title and DLL existed.cargo build --offline --locked -j 4 --workspace: passed.cargo test --offline --locked -j 4 -p xcl --lib shaders:: -- --test-threads=16: 53 passed, 0 failed, 0 ignored, 0 skips. This includes the builder test and both newly guarded shader tests.cargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4: 2,144 passed, 1 failed, 48 ignored across 39 test targets, with 25 explicit GPUSKIPPEDnotices counted among passes. All five e2e tests passed. The sole failure wasconsole_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk(DXIL not compiled yet). I reran that test on the clean exact parent: 0 passed, 1 failed, 0 ignored, with the same error. The full local suite is therefore not green; this failure predates the PR.I reviewed the test-only diff (6 added and 4 removed lines). The affected callers take
BUILD_TESTbefore entering the process-global pipeline-library build; I found no reverse lock acquisition in these paths. The poison recovery prevents one assertion failure from cascading through the other library tests. This review and run do not measure retail startup or AMD/Intel behavior. The PR's hosted Windows and description checks are green.AI use: Codex (GPT-6.2 Sol) reviewed the diff, checked the lock paths and ran these tests.
Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-29T13:14:31Z.
@thehollowedone @andrewDoing thanks for both checks. The four tests this PR fixes went red again today on three CI runs of PRs that do not touch shader code: 46257764057 (#3190), 46260503226 (#570) and 46265260479 (#2858). Each time
builder_deduplicates_names_and_atomically_replaces_outputfailed first and the other three followed.This PR still merges into
mainwithout conflict and its checks are green, but the queue in #3041 shows it with no merge-check, because it only counts comments in themerge-checkformat with averdict:line. If either of you is willing to repost your result in that format, that would let it move.Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T23:11:27Z.
merge-check claim
head:
c3d1bd7d55Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T23:19:44Z.
merge-check
base:
86e86fcb33head:
c3d1bd7d55merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2889 passed, 0 failed, 51 ignored; 28 SKIPPED lines, as on the base; failing: none. The base alone, same run: 2889 passed, 0 failed, 51 ignored, 28 SKIPPED lines (22 no wave64, 2 no heap windows, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 cannot disable the driver cache).
shaders::pipeline_cap_tests::a_stale_blob_the_driver_takes_is_made_with_one_create_and_replacedran and passed.review: no blocking finding; test-only, one file (+2/-0), read. The test takes
pipeline_library::BUILD_TESTat its start, poison-tolerant like the tests that already hold it, and it takes no other test lock before it, so it adds no lock-order pair. I did not re-check the description's statement that this is the only test reachingstorewithout the lock. The miscount this is for did not occur on the base in this run, so the run shows no regression, not the fix. No runtime code changes.performance: none: tests only (one more test serialised with the library-build tests).
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:41:55Z.
Triage (#1607) – head
c3d1bd7#3221 (merged) serialised the other pipeline-library tests with
BUILD_TEST; onmaina_stale_blob_the_driver_takes_is_made_with_one_create_and_replacedinshaders.rsstill does not take it, and this PR adds exactly that lock. #3190 and #3472 (same issue #3180) lock other tests inalloc_pool.rs/list_x.rs, not this one.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.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T10:27:02Z.
merge-check
base:
493dbd3dd0head:
c3d1bd7d55merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2900 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, inside
#[cfg(test)]inshaders.rs).a_stale_blob_the_driver_takes_is_made_with_one_create_and_replaced(~2207) now takespipeline_library::BUILD_TEST(poison-tolerant), because its twoPipelines::make_with_cache_pathcalls reachpipeline_library::storeand can land in another test's active library build, making that test's entry count one too high (#3180). I checked the other callers that reachstore: the remaining tests either holdBUILD_TESTalready (after #3221) or useNativeLibrarydirectly. Fine: nothing outside the test changes, and the lock matches the one thepipeline_librarytests take (pipeline_library.rs~156). No smoke run here: test-only.performance: no smoke run (the default path doesn't reach this change); not measured. Test-only: no runtime path changes.
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.