EH: write final report on NtTerminateProcess under Wine (#1461) #1469
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1479"
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?
Imported from ivall/xcl. Originally posted by hajduzsolt on 2026-11-24T16:45:37Z.
Runtime fix verified with unit tests and RX 9070 XT smoke run.
What is in it
crates/xcl/src/eh.rs:hk_nt_terminate_process, checkscrate::util::under_wine()and dispatchescrate::report::write_final(None)before process termination and log flushing.terminate_process_report_invocation_is_safe_under_wineverifying thatwrite_final(None)executes safely without panics or deadlocks in test environments.Tested
cargo test --workspace -- --test-threads=2: passedcargo test -p xcl --lib eh::tests: 7 passed, 0 failedcargo test -p xcl --lib report::tests: 1 passed, 0 failedRegression run
main:
PR:
Not tested
AI use
upstream-sync referenced this pull request2026-11-24 19:06:45 +00:00
Imported from ivall/xcl. Originally posted by Belox17 on 2026-11-24T18:48:53Z.
Test report for
9c400998on Windows (RTX 3060 Ti): passes, but the new test also passes without the changeTested
cargo test --workspace -- --test-threads=4: 771 passed, 0 failed, 41 ignored (baseb7aa9f3: 770). Merged into9e3831e: 777 passed, 0 failed, 41 ignored.hk_nt_terminate_processremoved (test kept),terminate_process_report_invocation_is_safe_under_winestill passes. It callsreport::write_final(None)directly, which exists onmainand returns at once when there is no boot state, so the new branch is never reached. On Windows,under_wine()is false, so nothing in the suite runs that branch.For comparison, #1484 (same issue, #1461) moves this into
on_nt_terminate(status, under_wine, write_final), and its test checks both branches with an injectedwrite_final.Not tested
AI use: Claude Code (Claude Opus 5.5) ran the commands and wrote this report; I checked it before posting.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:53:20Z.
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!
Imported from ivall/xcl. Originally posted by SzczepanGrela on 2026-11-24T18:55:23Z.
Verified under real Wine (Linux /
GE-Proton11-12, Wine Staging 11.0) against baseb7aa9f3: PR head9c40099fixes #1461 for both clean (0) and non-zero (42) exits.Setup. CachyOS, kernel
7.3.0-5-cachyos, AMD Radeon RX 9070 (RADV GFX1201, Mesa26.2.5-arch3.1),GE-Proton11-12(Wine Staging 11.0 +ntsync),vkd3d-protonv3.1-1-g8293130eb, DXC1.9.2602.17. Builtxcl.exeon baseb7aa9f3and PR9c40099withrustc 1.97.1crossx86_64-pc-windows-gnu, release.Test. Minimal synthetic console title (imports
kernelx.dll!XclDefinitelyMissingFunction, calls it once, exits viaExitProcess(0)orExitProcess(42)), run throughxcl.exe run <dir>under Wine withXCL_NETWORK=0:b7aa9f3(report.json)9c40099(report.json)ExitProcess(0)exit_code: 0,called_stubs: []exit_code: 0,called_stubs: [XclDefinitelyMissingFunction (1x)]ExitProcess(42)exit_code: 42,called_stubs: []exit_code: 42,called_stubs: [XclDefinitelyMissingFunction (1x)]In both runs on
9c40099, the log showsreport.jsonwritten insidehk_nt_terminate_processright beforeprocess ends (thread ...)with no crash and intact stack trace.Not tested: full
e2etest title (hits an unrelated Wined3d11.dll0x80000100exception on this prefix), macOS CrossOver, or retail titles under Wine.AI use: Antigravity (Gemini 4 Neon) cross-compiled
b7aa9f3and9c40099, built the synthetic exit title, ran the Wine A/B checks on my machine, and drafted this report; I reviewed the results before posting.Imported from ivall/xcl. Originally posted by hajduzsolt on 2026-11-24T19:19:11Z.
Thank you for checking the test against the reverted change. The termination decision now accepts an injected report callback, and the regression covers Wine and native behavior, other-process handles, and repeated termination.
cargo test --workspace -- --test-threads=2passed (723 library tests passed, 21 ignored). Wine itself was not run in this revision.upstream-sync referenced this pull request2026-11-24 23:06:49 +00:00
Imported from ivall/xcl. Originally posted by pablogonz12 on 2026-11-25T08:17:19Z.
Test report: #1479 at its current head
7036419, under Wine.e2egoes from failing on #1461 to passing.The earlier real-Wine report was on
9c40099; this one covers the reworked head.Setup
cargo xwin,x86_64-pc-windows-msvc, release,+crt-static.Method
e2estops under Wine before it checks the report, so both sides carry the same three open PRs:main568e7db+ #794 (bee31d5) + #890 (76d2ff7) + #1462 (813615c), merged in that order7036419)All merges were clean, and A and B differ only by this PR's
eh.rschange. For the test title's Opus check I also put a locally built libopusopus.dllnext toxcl.exe, on both sides.Results
e2ee2e.rs:164: report.called_stubs: [](3 of 3 dedicated runs, and again in the integration pass)xcl --lib, 4 threadspls_quota,predication_e2efuzz_validate_and_gpu_2,directed_reference_basics,lower_dxil::tests::{f32,f64}_programs_on_the_gpu,gpu_nonfused_mad_and_mac_prevent_fma_contraction,gpu_depth_buffer_created_for_unordered_access_is_placed. (directed_reference_basicscomes from our+crt-staticbuild: the static UCRT'sfmafis not correctly rounded.)termination_reports_once_for_the_current_process_under_wine.integer_ops_match_cpu,uaddc_and_usubb_match_cpu,jumps_to_outer_loop_heads_are_structured.write_report();call inbegin_terminationremoved, the new unit test fails (left: 0, right: 1). So the point raised on the earlier version, that its test also passed without the change, no longer applies.write_final(None), becauseCRASHis filled withget_or_insertandNonedoesn't touch it. I did not run a crashing title.Not tested: a retail title under Wine (so no Wine smoke pair), a nonzero or crash exit on this head, native Windows, and the suite on #1479 without the three other PRs.
AI use: Written with Claude (Anthropic) assistance; tested by me on the hardware listed.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T05:27:36Z.
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
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-26T08:49:09Z.
NVIDIA and AMD full-suite run, to go with the reports above by pablogonz12, since none of them covers NVIDIA. Tested exact head
70364190(on its baseb7aa9f3).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 gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 771 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.termination_reports_once_for_the_current_process_under_wine.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 771 passed, 0 failed, 41 ignored, no skips.--skipleaves out tests that fail on mainb49be183too, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests,const_and_null_mask_operands_agree_with_hlsl_on_the_gpuandmask_ff0_and_flbit_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
Imported from ivall/xcl. Originally posted by vakaobr on 2026-11-29T16:08:49Z.
Mac test of
7036419: fixes #1461 under CrossOver too. Same result as SzczepanGrela's Linux run, on another Wine.Tested
x86_64-pc-windows-gnu.eh::tests::termination_reports_once_for_the_current_process_under_wineon this PR merged withmainbc2cbb7(debug): 1 passed, 0 failed.xcl run, release.maincannot finish the test title on a Mac yet (it stops after the window check, #1462 / #794), so I ran it on my Mac branch (vakaobr/xclmac/integration7a78e50) without and with this PR's two commits cherry-picked. Both runs: 50 checks passed,failures: 0, exit 0.report.jsonafter the exit:called_stubsXclDefinitelyMissingFunction,ID3D12Device14::#47 (console extension)d3d12.presentsvfs.redirected_writesNot tested
42on Linux).AI use: Claude Code with Claude Opus 5.5 ran the tests and the two title runs on my Mac and drafted this report. I checked it before posting.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:53:50Z.
Triage (#1607) – head
7036419#1484 made the same change (call
report::write_finalfrom theNtTerminateProcesshook whenutil::under_wine()), but it is closed; this is the open PR for #1461 and it is not on main.begin_terminationkeeps the existing self-handle / once-only guard, and the test checks both the Wine path and the native path. The PR conflicts with main, which addedpso_async::flush_used_bounded/flush_indirect_split_recordsto the same block; keep them when rebasing. No problems found in the diff.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.