Tests: a failed copy scratch check no longer aborts the lib test binary #1817
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1817
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1817/head"
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?
@AlbanianReaper on GitHub · 2026-11-24 21:07 UTC · original
AlbanianReaper:tests/copy-scratch-lock-poison→main· +8 −4 · 1 files · 1 commits · merged 2026-11-25 19:22 UTCa_new_list_takes_no_copy_scratch_of_an_earlier_oneasserted while holding theCOPY_SCRATCHlock. If one of its asserts fails, the lock is poisoned. The test's command list is then dropped while the test unwinds. Its Release hook (real::cl_release→on_release→release_copy_scratch) panics on the poisoned lock, and because a panic there can't unwind, the whole lib test binary aborts ("thread caused non-unwinding panic. aborting.", exit status 9). Every other result of that process is lost. The test now reads both values under the lock and asserts after releasing it.What is in it
crates/xcl/src/hle/d3d12x/list_x.rs: only the test changes (+8 −4); no runtime code is touched.Tested
scripts/linuxfrom #257); rustc 1.100.0, release, targetx86_64-pc-windows-gnugpu_more_atomics_sub_dword_scratch_valuhangs the GPU and the device is removed (already reported in #42). After that, fences read as complete, so this test's "stays until the fence" assert fails. On main the lib binary then aborted in 2 of 2 runs. With this change it runs to the end and lists the failures.cargo test --release --workspace --no-fail-fast -- --test-threads=4on809932dwith vkd3d-proton master (ec207194):device_x::tests::gpu_depth_buffer_created_for_unordered_access_is_placed, which also fails on main.gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64),pso_measurement_compiles_an_exact_synthetic_record(no Developer Mode under Wine).vram::tests::d32s8_targets_take_their_own_size_of_video_memoryandreservable_agrees_with_the_driverhang under Wine. Both wait onVRAM_TEST_LOCK, so the binary was stopped after 20 min. They hang on main too.e2e(cloaking under Wine),pls_quota(#810) andpredication_e2e(#1272), which fail the same way on main.Regression run
scripts/linux/smoke.sh(#257) under Wine, retail title, 120 s each, fresh data folder each time. Both runs end withexit: killed. The title logs "XCL_RUN_SECONDS: 120 s – ending the title" and "process ends" at 130 s, after "D3D12 queue drain: GPU fences still pending after 10 s". After that the Wine process doesn't exit on this NVIDIA setup, even with the default 120 s grace. Main does the same, so the change doesn't cause it. Because only a test changes, could a maintainer add thetest-onlylabel?main:
PR:
Not tested
AI use
🤖 Generated with Claude Code
a_new_list_takes_no_copy_scratch_of_an_earlier_one asserted while it held COPY_SCRATCH. When an assert failed, the lock was poisoned; the test's command list was then dropped during unwinding, its Release hook (real::cl_release -> on_release -> release_copy_scratch) panicked on the poisoned lock, and a panic there is non-unwinding, so the whole lib test binary aborted ("thread caused non-unwinding panic. aborting.", exit status 9). Every test result of that process was lost. Measured under Wine 11.22 + vkd3d-proton v3.1 on an RTX 5060 Ti, where gpu_more_atomics_sub_dword_scratch_valu hangs the GPU and the device is removed for later tests (the fence then reads as complete, so this test's "stays until the fence" check fails): main aborted in 2 of 2 runs; with this change the binary runs to the end and reports the failures. The checks are now read under the lock and asserted after it is released. Assisted-by: Claude Code (Claude Opus 5.5) Co-Authored-By: Claude Opus 5.5 <[email protected]>@fromthemoonx on GitHub · 2026-11-24 21:30 UTC · original
Passes on native Windows, and the abort it fixes reproduces there too.
Tested
stable-x86_64-pc-windows-msvc; debug809932d140fee722e5a12a2dd12d8662b8bf5920(baseb9b6ea6):cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4: 889 passed, 0 failed, 42 ignored. Merged onto currentmaine9e94ce(no conflict): 892 passed, 0 failed, 42 ignored.cargo test -p xcl --lib -- --test-threads=4:mainb9b6ea6:thread caused non-unwinding panic. aborting., and the binary ends with0xc0000409and no results.839 passed; 1 failed; 22 ignored, with the failure being onlya_new_list_takes_no_copy_scratch_of_an_earlier_one.a_new_list_takes_no_copy_scratch_of_an_earlier_one, 10 runs: 10 of 10 passedNot tested
AI use
@futurepro62 on GitHub · 2026-11-24 22:22 UTC · original
Adding an AMD GPU (RDNA2, native wave64) to the report above, which has none, with an NVIDIA run alongside. Tested exact head
809932d(on its baseb9b6ea6).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip pso_measurement_compiles_an_exact_synthetic_record: 887 passed, 0 failed, 42 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.#[test]functions in the diff.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 889 passed, 0 failed, 42 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipon NVIDIA. Both fail on main7f7e768too, not because of this PR: underXCL_REQUIRE_GPU=mesh,runner::skip_testturns their skips into failures.heap_window_out_of_memory_falls_back_to_the_switch_formskips whenXCL_HEAP_WINDOWSis unset (#1651), andshaders::tests::pso_measurement_compiles_an_exact_synthetic_recordskipped because Developer Mode was off. Developer Mode was turned on before the AMD run, and therepso_measurement_compiles_an_exact_synthetic_recordran and passed.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 00:39 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@JJAutoCompare on GitHub · 2026-11-25 03:15 UTC · original
PR #1817 verification on STOR-WINLAB
Commit
809932d140fee722e5a12a2dd12d8662b8bf5920(exact fetched head). The test-only change inlist_x.rsdrops theCOPY_SCRATCHmutex guard before asserting. This prevents a failed assertion from poisoning the mutex and triggering a second panic in the command list's Release hook during unwind.Tested
DoublePrecisionFloatShaderOps=0, and nod3d12SDKLayers.dll. Rust 1.100.0 (0ef1bc386), DXC/DXIL 1.9.2609.5, unoptimized builds with debug info and incremental compilation disabled.cargo build --workspaceandcargo test --workspace --no-runsucceeded.cargo test -p xcl copy_scratch -- --nocapturereported 2 passed, 0 failed, 0 ignored, 0 skips. The changed list-reuse test and the scratch-budget test also passed in the full suite.cargo test --workspace --no-fail-fast -- --test-threads=4ran once under the shared Arc lock and exited 1. All 20 targets emitted summaries. Summed libtest totals were 871 passed, 18 failed, 42 ignored, with 4SKIPPEDlines inpr1817-suite.log. Libtest includes those four early returns in its pass count. They provide no coverage.Failures and skips
CreateComputePipelineStateerror0x80070057, including FP64 cases. Four reported mismatches in FMA overflow, implicit-LOD sampling, f16 high-half preservation, and pixel-shader wave reductions.0x887A002D).Not tested
Forced copy-scratch assertion failure, comparison against
main, retail-title smoke, release profile, and other adapters. The run does not establish which suite failures also occur onmain.AI use
T3 Code / Codex (
gpt-6.2-sol,reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity,gemini-4-neon) verified counts againstpr1817-suite.logand published this report.@ivall on GitHub · 2026-11-25 19:22 UTC · original
Merging: read under the lock, assert after it, so a failure no longer aborts the whole binary.
Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug,
main2898511with 27 test PRs merged locally, this one included: the whole suite 3 times, 1419 passed, 2 failed, 46 ignored each time (fuzz_validate_and_gpu_1and_3, which fail the same way onmain);hle::d3d12xon 16 threads 5 times, no failure.AI use: Claude Code (Claude Opus 5.5) reviewed and tested this and wrote the comment on the maintainer's behalf.