xcl run: end the process when the title's crash filter has not ended it in 30 s #967
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!967
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-967"
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?
@milas6669 on GitHub · 2026-11-24 09:38 UTC · original
milas6669:crash-deadline→main· +165 −0 · 3 files · 1 commits · openAfter an unhandled exception XCL logs the crash and hands over to the title's own crash filter. A retail title's filter (a crash report of a process with tens of GB committed) can take very long or never return, and nothing in XCL ends the process then. On an 8 GB card the run ended with
0xc0000005 in VCRUNTIME140.dll, theprocess endsline never came, and the process stayed "not responding" with 29 GB committed for 4 minutes until it was killed by hand (the same happened in a second run).A thread started with the crash handler waits for the first unhandled exception, then gives the process
XCL_CRASH_EXIT_SECONDS(default 30; 0 turns it off) to end by itself, and ends it through the realNtTerminateProcess(not our hook, whose thread dump could hang the same way) with status 0xC0000005. A process that ends in time is left alone.What is in it
crates/xcl/src/eh.rs:crash_exit_seconds,crash_deadline(takes the end action as a closure, so it can be tested),end_process_now, the thread started ininstall_crash_handler, andCRASHEDset at the top ofunhandled_filter; three unit tests ofcrash_deadline(ends a process that does not end itself; leaves one that ends in time; waits for a crash first)tests/testtitle/src/main.rs:--hang-in-crash-filter(a crash filter that sleeps forever, then a null write)crates/xcl/tests/e2e.rs:a_crash_filter_that_never_returns_does_not_keep_the_process_aliveruns it withXCL_CRASH_EXIT_SECONDS=2, kills the process tree if it is still alive after 120 s, and checks the log for the crash and for the deadline lineTested
cargo test --workspace --no-fail-fast -- --test-threads=4on this commit: 723 passed, 0 failed, 41 ignoredgpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64)eh.rsfrom main, the process is still alive after 120 s and the test fails with "the process was still alive 120 s after the title's crash filter hung" (120.8 s)Regression run (retail title, 60 s, release builds, default settings)
main (
6bac4b4):this PR (
c997205):Not tested
XCL_CRASH_EXIT_SECONDSAI use
@SlopTart on GitHub · 2026-11-24 10:38 UTC · original
Linux / AMD RDNA3 datapoint, with a Wine caveat on the new test.
Merged state: head onto main
6bac4b4(lane merge), clean merge.Full suite,
cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 720 passed, 8 failed, 41 ignored; 7 are the known Wine-lane set from my #42 rows, and the 8th is this PR's new e2e test, failing 3/3 deterministically:a_crash_filter_that_never_returns_does_not_keep_the_process_alive(crates/xcl/tests/e2e.rs) - fails at theunhandled exception 0xc0000005log assert. Diagnosis from the capturedxcl.log: the test title exits ~0.2 s after start, before it ever takes the crash - the log ends atDirectStorage: request #0mid-startup, thexcl-crash-deadlinethread is present and waiting, but no exception is ever logged. The process does exit non-success, so the first assert passes and the crash-logging assert fails.test_title_runs_and_game_folder_is_untouchedfailure on this rig (the testgame's startup path dies under Wine before the deliberate crash), not a defect in the deadline mechanism itself. Thexcl run+ testgame-under-Wine path can't validate this fix on Wine lanes until that e2e family is stable.Counts only, no game data. Full captured log on request.
Not tested: retail titles (none here), Windows, RDNA4.
Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross
x86_64-pc-windows-gnu,XCL_NETWORK=0, release profile,--test-threads=4. My Linux rows: #42 / #718.AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
@raylitebull on GitHub · 2026-11-24 10:40 UTC · original
Code/CI review only (not independently runtime-tested by me): clean merge and
PR descriptiongreen (just awaiting CI workflow approval). Cleanly enforces a 30 s exit deadline inxcl runif a title's crash filter stalls process termination. Recommend approving CI and merging, @ivall.@DavidM1911 on GitHub · 2026-11-24 12:29 UTC · original
Independent verification, merged onto current
main384f7f7locally (clean merge).Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug.
cargo build --workspace && cargo test -p xcl --test e2e: 4 passed, 0 failed — including the newa_crash_filter_that_never_returns_does_not_keep_the_process_alive, which verifies the 30 s crash-filter timeout ends the process (took ~3.4 s total for the suite).AI use: test runs by Devin (Cognition, SWE-2); no code changes.
@DavidM1911 on GitHub · 2026-11-26 03:23 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.