cpu_package_ordinal_exe and cpu_startup_exe return from their entry point and can linger ~30 s (exit 0x0) under load, as in #281 #1375
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#1375
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@Maxim-Root on GitHub · 2026-11-24 09:42 UTC · original
Commit or build
e1316e1c(main),devpreset (Debug), clean build.Reproduction
The CTest symptom shows up under a parallel run:
In repeated runs at
c4966c64/f2082414,cpu_native_package_ordinal_startupfailed in most runs andcpu_native_startupin some. In every casesubprocess.TimeoutExpired ... cpu_package_ordinal_exe.exe / cpu_startup_exe.exe timed out after 30 seconds. Both tests pass alone: 0.45 s and 0.70 s.A direct launch loop separates it from CTest. Sixteen Python processes each launch one fixture serially through
tests/cpu/exe_process.launch()with a 40 s deadline. Each launch uses its own temporary directory with the EXE and its DLLs. Sixteen busy-loop processes keep the CPU saturated (Ryzen 7 7800X3D, 16 logical CPUs).Expected behavior
Each launch ends promptly with the entry's result as the exit code:
0xdforcpu_package_ordinal_exe,0x103020eforcpu_startup_exe.Observed behavior
cpu_package_ordinal_exe0x0; one still alive at 40 s: entry thread ended with13(0xd, correct), one other live threadcpu_startup_exe0x0after ~30.0 s, or still alive at 40 s: entry thread ended with0x103020e(correct), one other live threadWithout the extra CPU load, 640 launches of
cpu_package_ordinal_exe(16 parallel) all ended with0xdand none was slow.This is the #281 signature that #589 fixed for the
exe_startfixtures. Both EXEs are linked with/NODEFAULTLIBand a custom/ENTRY(ordinal_exe_entry,exe_entry). The entry returns its value without terminating the process:tests/cpu/package_ordinal_exe.cpp:return static_cast<std::uint32_t>(result);tests/cpu/startup_exe.cpp:return b_value() | ...;(it callsExitProcessonly on its error paths)When the entry thread returns, nothing ends the process while an idle loader or thread-pool worker is alive. In the #589 measurement that worker's code 0 became the exit status after about 30 s. These fixtures were added after #589 and do not go through the
native_startup/finish_exewrapper that the other EXE fixtures use.As in #589, the identity of the remaining thread is inferred, not proven. It is the only live thread after the entry thread ended with the correct value. I did not resolve its start address.
Related: #1173 runs the full suites with
--parallel 4and marks onlycpu_native_worker_aliveasRUN_SERIAL. These two tests would stay exposed there.Proposed change (one PR). End both fixtures through the existing termination path. The native process exits with the entry's value, and the
pe_maprun still gets that value back frompe_map_run. The existing expected values and controls stay unchanged. Add a check that the native launch ends with the entry value, not0x0after a delay. I will link the PR here.Environment
Windows 11 Pro build 26300.9818, Visual Studio 2022 17.14 (MSVC 14.44.35207), Windows SDK 10.0.26100.0, CMake 3.31.6 (VS bundled), Python 3.12.10, AMD Ryzen 7 7800X3D (16 logical CPUs), 32 GB.
Checklist
AI-assisted (Claude Code).
@R0Y00 on GitHub · 2026-11-24 09:51 UTC · original
Please take this as a focused follow-up to #589. Reuse the existing termination wrapper for these two source-built fixtures so native launch preserves their exact exit values and mapped launch still returns those values to the caller. Keep the existing tests and timeouts. In the PR, include a bounded loaded-host comparison and report both the process exit code and any run that exceeds the deadline.