xcl run: a panic on any thread is written to xcl.log #2005
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!2005
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2005/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?
@Royalflamejlh on GitHub · 2026-11-25 00:38 UTC · original
Royalflamejlh:arch/log-panics→main· +28 −0 · 2 files · 2 commits · merged 2026-11-25 18:14 UTCA panic on any thread of the host is now written to
xcl.logas an ERROR line, as well as to stderr. Until now it went to stderr only, so the file a report carries had nothing of it. One of XCL's own threads that panics is gone for the rest of the run, and the run then reads like any other stall.Seen in a retail title run of ours (Linux through Wine and vkd3d-proton, RTX 4060 Ti 16 GB, a local tree at
c3af1d7): stderr hadthread 'xcl-sync-watchdog' (2032) panicked at crates/xcl/src/hle/d3d12x/list_x.rs:1374:55: called Option::unwrap() on a None valueat the first bridged GPU wait (97.6 s), andxcl.loghad no line of it. The log has 8 bridged waits after that and noreleased on CPU to prevent GPU hangline, and the title's own watchdog ended the run at 149.5 s; the run does not show that a release would have changed that end. That panic is the start-up race #1926 fixes; this change does not touch it. It is 1 of the 142 title runs of ours under Wine on 23 and 24 November that bridged a wait (the 134 of 24 November are the ones counted in our comment on #1926); we only found it because the harness keeps stderr.Related to #1452 and #505 (the waits that thread releases); it fixes neither. It is a diagnostic: the next thread that dies shows in the log.
What is in it
crates/xcl/src/log.rs:log_panicsinstalls a panic hook that writesthread '<name>' panicked at <file>:<line>:<col>: <message>at ERROR level (flushed at once, like every ERROR line), then calls the hook that was installed before, so stderr andRUST_BACKTRACEbehave as before. A thread without a name is written asthread ''. A panic that XCL catches (a DXC worker's, DirectStorage's parallel decoding) is logged the same way. Withlog_to_stderron, the line is on stderr twice (XCL's echo and Rust's own).crates/xcl/src/host.rs: the host calls it right afterlog::init. Thexcl shaders,inspectand other commands are not changed.log::tests::a_panic_is_in_the_log: a named thread panics and the log file has its name, the place and the message.Tested
cargo build --release -p xclof0eccc4e(onmain8e87fc7): builds, with 2 warnings, asmain8e87fc7has there.cargo test --workspace --no-fail-fast -- --test-threads=4(debug) on0eccc4e: 987 passed, 4 failed, 45 ignored; the new test passed. The headecda938differs from0eccc4ein comments only (−4 +1 lines). The four failures aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0to_3; the same four failed onmain689f2dbon this machine earlier the same day (971 passed, 4 failed, 45 ignored).main8e87fc7itself was not run.no wave64, 3 wave32 per-lane forms refused, 1no heap windows, 1pso_measurement_compiles_an_exact_synthetic_record(the driver cache cannot be turned off without Windows Developer Mode).ecda938itself:cargo test --workspace -- a_panic_is_in_the_log --test-threads=1(debug), 1 passed, 0 failed (1 run).Regression run
scripts/smoke.ps1, unchanged, 60 s on the same machine, 1 run each. Themainblock isaa9ab8a, the newestmainbuilt there; the head is based on8e87fc7.main:
PR:
Not tested
main8e87fc7.extern "system"functions: Rust runs the hook and then aborts the process, so the line should be the last one in the log. No run showed that case.AI use
@raylitebull on GitHub · 2026-11-25 01:25 UTC · original
Code review on
ecda938:crates/xcl/src/log.rs::log_panics(invoked fromcrates/xcl/src/host.rs) cleanly preserves the previous panic hook viastd::panic::take_hook(), writes thread panic details intoxcl.logatLevel::Error, anda_panic_is_in_the_logverifies off-thread panic logging end-to-end.CIworkflow approved (currently running).Remaining before merge:
PR descriptioncheck.Build and test (Windows, no GPU)finishes green.ecda938.@JoaoPauluu on GitHub · 2026-11-25 02:33 UTC · original
A regression run under Wine on Linux on the retail title: no device removal, no crash, frames level with
main(1367 here, 1357 and 1365 on the twomainruns). No thread panicked in this run, so the new panic logging is not reached; this is a regression run only.Tested
x86_64-pc-windows-gnu.ecda938as it is (based on8e87fc7) andmaincbc296a, no uncommitted changes. Retail title 1.0.2.1,scripts/linux/smoke.sh(#257) for 60 s, no input. Runs in order: main, this PR (with other PRs in between), main.Regression run
main (first run):
this PR:
The second
mainrun: 1365 frames,exit: 0x0, no device removal, no crash. Under Wine,peak commitreads 0 MB, so these blocks do not check memory.Not tested
AI use
@JJAutoCompare on GitHub · 2026-11-25 02:48 UTC · original
Empirical verification — PR #2005 (
ecda9387592078f32ee5e5d02a917ee86d73d29f)Tested clean detached PR head
ecda9387592078f32ee5e5d02a917ee86d73d29fon STOR-WINLAB.Environment
26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB (driver32.0.101.9175, wave sizes 8–32,DoublePrecisionFloatShaderOps=0,d3d12SDKLayers.dllabsent).rustc 1.100.0 (0ef1bc386 2026-11-09)(CARGO_INCREMENTAL=0, debug info 0); DXC/DXIL1.9.2609.5onPATH.Tested
cargo build --workspaceandcargo test --workspace --no-runexited 0 outside the GPU lock.cargo test -p xcl --lib log::tests::a_panic_is_in_the_log -- --exact --nocapture: 1 passed, 0 failed, 0 ignored, 0 skipped (966 filtered out; verified worker threadxcl-diespanic wrote thread name and message to temp log while preserving stderr output; also passed in full suite).cargo test --workspace --no-fail-fast -- --test-threads=4(underInvoke-ArcTest.ps1, exited 101): 965 passed, 26 failed, 45 ignored across 20 test targets, with 23SKIPPEDlines (excluded from coverage; 18 wave64, 3 refused wave32 f16 lowerings, 1 driver-cache disable0x887A002D, 1 heap-window fallback).xcl --libGPU DXIL/recompiler tests (21CreateComputePipelineState0x80070057+ 4 shader result assertions) and 1 ine2e(test_title_runs_and_game_folder_is_untouched,RSSetDepthBiasX#94 blue vs green). All unrelated to the panic hook (no matchedmainbaseline).Not tested
scripts/smoke.ps1main-vs-PR run,XCL_SAMPLE_*(unset), D3D12 debug layer, and inducing an end-to-end panic inside a livexcl runhost process.AI use
gpt-6.2-sol,reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity,gemini-4-neon) verified counts againstpr2005-suite.logand published this report.@DavidM1911 on GitHub · 2026-11-25 03:51 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@thehollowedone on GitHub · 2026-11-25 11:21 UTC · original
Independent Windows run on ecda938. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, debug.
cargo build --offline --locked --workspacepassed.cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --nocapturereported 991 passed, 0 failed, 45 ignored, with 24 runtime skip notices included in Cargo's pass count. The stock panic logging test passed.An isolated fixture released two named workers from one barrier to panic with multiline messages. With logger stderr echo disabled, each wrote one complete error line to the file, and the previous hook ran once per worker. With the new hook omitted, the previous hook still ran twice and the file assertion failed.
cargo test --offline --locked -p xcl --test panic_hook_check -- --nocapture --test-threads=1passed 1/0/0 with the hook installed. This was synthetic coverage outside the title host. AI-assisted. Codex (GPT-6, exact variant unavailable) wrote the fixture, ran the tests, and drafted this report.@oni-swr on GitHub · 2026-11-25 17:33 UTC · original
AMD run on
ecda9387(PR head; it merges cleanly intomain68a284a, but I tested the head as it is, and its base is old, so the suite is smaller than on currentmain).Machine: AMD Radeon RX 7800 XT (RDNA3, native wave64), driver 32.0.31035.1003, Windows 11 Pro 10.0.26200, Rust 1.100.0
x86_64-pc-windows-msvc, DXC 1.8.2502.11 (Windows SDK 10.0.26100.0), debug build, clean checkout, noXCL_SAMPLE_*.Tested
log::tests::a_panic_is_in_the_log: 1 passed, 0 failed.cargo test --workspace --no-fail-fast -- --test-threads=4: 990 passed, 1 failed, 45 ignored, 7SKIPPEDlines (f16 and f32 conversion per-lane forms refused, and one test with no heap windows).gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722:res[30] = 0x1, CPU0x7fffffff); it fails identically onmain68a284a(checked there), so it is not this PR's.Not tested
scripts/smoke.ps1pair. I did not trigger a real panic on a worker thread in a running title to see thexcl.logline.main(only the head was run).AI use: Claude Code (Claude Sonnet 5.5) ran the commands and wrote this report for oni-swr.
@ClosetPie107 on GitHub · 2026-11-25 17:42 UTC · original
Independent AMD RDNA4 / Linux (RADV, native wave64) test report for head
ecda9387592078f32ee5e5d02a917ee86d73d29f(merged locally ontomain68a284a, clean merge).Hardware & environment
experimental-11.0-20261112),vkd3d-protonmasterec207194(3.2.0) +dxil-spirvb540c8a2+ relaxed-vtable patch (-Db_ndebug=true), DXVKv3.1.1-209, DXC1.9.2609.5, Rustx86_64-pc-windows-gnu(debug)Tested (
XCL_REQUIRE_GPU=wave64,VKD3D_CONFIG=ignore_shared_fence,--test-threads=1 --nocapture)log::tests: 1 passed, 0 failed, 0 ignored (0 skipped —a_panic_is_in_the_logpassed)Not tested
AI use