cpu: terminate the exe_start fixtures after the body returns #583
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/589"
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 R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-22T14:28:31Z.
Change
This is the follow-up to #281 that @R0Y00 requested there:
cpu_exe_start_originalandcpu_exe_start_no_tlsnow end the native process after the body returns, which removes the intermittent exit-0-after-~30 s hang. #394's wrapper,tests/cpu/exe_startup.asm, is reused unchanged: the image entry isnative_startup, the body isnative_entry, andfinish_execallsExitProcessonly when the image is the host module. In the mapped image,pe_map_runtherefore still returns the body's result.TLS callback order, the no-TLS control and the existing failure branches are unchanged.
native_exe_start_check.pynow expects the wrapper'scpu_exe_io.dll!finish_exebinding in addition tomix_args, for both original and no-TLS.Observations kept separate.
exe_start.asmexportsbody_status(sentinel0xFEEDFACE, set before the body returns). The reference launches run throughobserve_native, which reports separately:ReadProcessMemoryat module base + export RVA, polled up to 10 s);A lingering process therefore gets its own diagnostic.
exe_process.launch()gains an optionalon_unfinishedcallback, with the default behaviour unchanged, and re-checks the handle afterwards so that a late exit is not reported as lingering.Deterministic controls:
0x60d/0x20dand the mapped host regains control with the same value.process exited 0x0orlingering process).finish_exebuild must reportbody returned 0x60d … lingering process.Refs #281. AI-assisted (Claude Code).
Verification
Windows 11 (10.0.26200.9974), VS Build Tools 2026 (MSVC 19.51), dev preset, commit
64e2371onbbebcad.ctest --preset dev --no-tests=error -R "^cpu_"ctest --preset dev --no-tests=error -R "^cpu_native_exe_start$" --repeat until-fail:40ctest --preset dev --no-tests=error(on68723ab, before the last rebase onto a pixel_aot-only commit)bvh_wave64_hardware,bvh_wave64_warp,wave_shuffle_warpprocess exited 0x0 after 2061.6 ms, expected 0x60dDiagnosis on unpatched
5889876: I ranexe_process.launch()in a loop: 4,626 launches, 2 failures, both in the no-TLS variant. One process was not signaled after 10 s although its entry thread had exited0x20d, and it had one live thread starting at the same ntdll offset as a normal threadpool worker. The other process exited0x0after 30.0 s. This supports the parallel-loader-worker mechanism discussed in #281 but does not prove it. The worker is identified only by its start address.Evidence and follow-up
ExitProcessafter the entry returns, which I measured only on build 26200.🤖 Generated with Claude Code