Skip to content

[upstream #1817] Tests: a failed copy scratch check no longer aborts the lib test binary - #320

Open
ufoptg wants to merge 1 commit into
mainfrom
upstream-pr/1817
Open

ufoptg wants to merge 1 commit into
mainfrom
upstream-pr/1817

Conversation

@ufoptg

@ufoptg ufoptg commented Nov 25, 2026

Copy link
Copy Markdown
Owner

a_new_list_takes_no_copy_scratch_of_an_earlier_one asserted while holding the COPY_SCRATCH lock. 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

Regression run
scripts/linux/smoke.sh (#257) under Wine, retail title, 120 s each, fresh data folder each time. Both runs end with exit: 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 the test-only label?

main:

xcl-smoke v1
commit: b9b6ea62080cc62fc19e212033372d01c6214e5c
gpu: NVIDIA GeForce RTX 5060 Ti
title: fd4a6bcd
seconds: 120
exit: killed (no exit)
frames shown: 3236 (PresentX 3236)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

PR:

xcl-smoke v1
commit: 809932d140fee722e5a12a2dd12d8662b8bf5920
gpu: NVIDIA GeForce RTX 5060 Ti
title: fd4a6bcd
seconds: 120
exit: killed (no exit)
frames shown: 3258 (PresentX 3258)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

Not tested

  • Windows, AMD, Intel: no such machine. The suite and both smoke runs ran under Wine only.

AI use

  • Claude Code, Claude Opus 5.5:
    • found the abort and its cause from the test output;
    • wrote the change and the commit message;
    • ran the suite and the smoke runs;
    • wrote this description.
  • I read the diff and checked the results before opening the PR.

🤖 Generated with Claude Code


Mirror of xcl-dev#1817 (auto-synced, do not edit).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants