xcl run: write final report on NtTerminateProcess under Wine (#1461) #1484
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!1484
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1484/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?
@mahfuzinam0045-spec on GitHub · 2026-11-24 16:49 UTC · original
mahfuzinam0045-spec:fix/wine-report-on-terminate→main· +31 −9 · 1 files · 1 commits · closed without mergingUnder Wine, an executable's TLS callbacks never receive
DLL_PROCESS_DETACH(reason 0) when the process exits. Because XCL writes its finalreport.jsoninsideloader::on_tls_eventupon receivingDLL_PROCESS_DETACH,report.jsonwas left in its initial pre-run state under Wine / Proton (lackingcalled_stubs, subsystem counters, and final exit status), as reported in #1461.In
hk_nt_terminate_process, invokereport::write_final(None)before logging and flushing when running under Wine (util::under_wine()). On native Windows, the hook continues to rely on standard TLS detach notifications, keeping native Windows execution paths unaffected.Fixes #1461.
What is in it
crates/xcl/src/eh.rs: inhk_nt_terminate_process, delegate toon_nt_terminate, invokingreport::write_final(None)whenutil::under_wine()is true.crates/xcl/src/eh.rs: add unit testnt_terminate_writes_report_under_wineverifying thatwrite_finalis invoked under Wine and skipped on native Windows.Tested
cargo test -p xcl --lib eh::tests: 7 passed, 0 failed.cargo test -p xcl --lib: 708 passed, 0 failed, 21 ignored.cargo test -p xcl --test console_dlls_e2e --test e2e: 16 passed, 0 failed.Regression run
eh::hk_nt_terminate_process. Awaiting maintainer review /test-onlywaiver or community Wine smoke run.Not tested
under_wine()is verified by unit assertions).AI use
eh.rs, wrote the unit tests, and drafted this PR.github-bot referenced this pull request2026-11-26 04:59:09 +00:00
@dcastell1 on GitHub · 2026-11-24 16:55 UTC · original
Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on
main@b7aa9f3(baseline 770 passed, 0 failed, 41 ignored on this box):One more than the baseline; the final report written on
NtTerminateProcessis exercised and green.Tree restored afterwards (full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.
@eizispark on GitHub · 2026-11-24 17:12 UTC · original
Hardware test report — commit
408ad5cVerified
408ad5cd797b951e0a05117fe15aa8de1ef767e4(based onmainb7aa9f3bd212088e0d927439284dc5ed325ce3c7, clean merge withorigin/main9e3831e): pass.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09), release + test profilecargo test --workspace --no-fail-fast -- --test-threads=4:752 passed, 0 failed, 41 ignored(GPU tests skipped on this adapter:none), includingeh::tests::nt_terminate_writes_report_under_wineand both wave64 GPU tests (gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware,console_wave64_compute_through_the_pso_hook_dispatch_and_read_back)Regression run
main(b7aa9f3bd212088e0d927439284dc5ed325ce3c7):PR (
408ad5cd797b951e0a05117fe15aa8de1ef767e4):Not tested
DLL_PROCESS_DETACH/NtTerminateProcessexit path under Wine), NVIDIA/Intel GPUs,XCL_SAMPLE_*AI use
@DavidM1911 on GitHub · 2026-11-24 18:53 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
@throny on GitHub · 2026-11-24 19:55 UTC · original
Two contributors checked independently and found that this PR makes the same change as #1479 (for #1461): #1607, group D8. They suggest keeping #1479. If you agree, closing this PR or joining the other one would save the maintainers a review. If the two differ in a way the checks missed, a note in #1607 helps.
This is a hint, not a request from the maintainers; nobody from the project has adopted #1607 so far.
AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
@ivall on GitHub · 2026-11-24 20:43 UTC · original
Closing this as a duplicate: #1479 makes the same change and was opened first (under Wine the final report is written when the process terminates). It stays open and is the one that will be reviewed and merged.
This says nothing about the quality of the code here. I compared the two diffs; the pair was also found by independent checks in #1607. If this PR covers a case #1479 does not, or #1479 is closed without being merged, say so and I'll reopen it. A test that is only here is welcome on #1479.
Thank you for the work.
AI use: Claude Code (Claude Opus 5.5) compared the diffs and wrote this comment; the decision is the maintainer's.
Pull request closed