Repository navigation
TEST-899: loader_tls's purge test uses suspended, console-less children (fixes the ctest + Wine hang) - #4091
Conversation
|
Tested e9fe348 on native Windows (the description covers Wine): Windows 11 24H2 (26100), MSVC 19.44 RelWithDebInfo + Ninja. Pass: the suspended, detached children still give the two ownership checks what they need there.
No game files. AI-assisted (Claude). |
|
Tested e9fe348 on Windows 11 26200, MSVC 19.42 (VS 2022 Build Tools), Windows SDK 10.0.28000.0: pass, as the no-regression check on native Windows
What this does not cover: the hang itself. It needs ctest under Wine, which I don't have, so the 19-run comparison in the description is not repeated here. Reading the change: AI-assisted (Claude Code); no game files, no GPU involved in this test. |
|
Independent data point from a different Wine: on Arch Linux with wine-11.22, the Windows build of
So the hang looks specific to the older Wine the CI uses (the Ubuntu and winehq-stable images), not to the purge path in general; this box cannot independently confirm the fix, only that it does not regress Wine 11.22. Worth stating in the PR what Wine version the hang was measured on, if that is not already in the thread. |
|
@YaBulochka thanks for running it. One problem, though: Where the hang was measured:
The hang only shows under ctest, because it waits for EOF on the output pipe that the leftover conhost holds. Running the test directly or through a shell pipe exits cleanly, so the 30 direct runs wouldn't catch it either way. If you can, AI-assisted (Devin). |
|
Tested e9fe348 under Wine 11.21 (Fedora 45) on AMD Radeon 610M iGPU (RDNA2, RADV Mesa 26.2.6) and NVIDIA RTX 4070 Ti (615.78.08), where the hang reproduces at a high rate on
Run directly, all five purge checks still pass ("deleted the clone whose owner process is gone", "skipped the clone another handle holds open", "skipped the clone whose owner process is still alive", and the two setup checks), with On the thread above: this machine reproduces the hang on current AI-assisted (Claude Code); counts copied from the run logs. |
|
@MKmajster @Maraco91 @ddm-j — thank you for the three independent confirmations on
Together with my GTX 1060 / 582.78 Windows run, the fix now has native Windows, Wine, NVIDIA and AMD coverage. No action needed from you. AI-assisted (OpenCode); no game data. |
test_purge_ownership_scoping spawned cmd.exe with CREATE_NO_WINDOW for its dead and live owner PIDs. Under Wine each console child starts a headless conhost.exe, which inherits the runner's output pipe and can outlive a terminated child, so ctest waits on the pipe after the test printed OK. The children are now copies of the test executable started with CREATE_SUSPENDED | DETACHED_PROCESS: they never run, have no console, and still give one dead PID (terminated and waited) and one live PID. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
e9fe348 to
5cc877d
Compare
|
Watcher caught the Runtime CI failure on this branch; I diagnosed both failed jobs and rebased.
I rebased the single commit onto current |
|
Independent Windows 11 / MSVC 2022 (\RelWithDebInfo) check at exact head \5cc877dbad760848bc2d94dd3b9f15864861fb46\ (claim: #5156 (comment)):
Synthetic fixtures only, no game data. AI-assisted. |
|
@soldsawn — thank you for the independent MSVC 2022 RelWithDebInfo check at the exact rebased head |
|
Tested 5cc877d on Intel UHD 770, driver 32.0.101.7088, Windows 11, MSVC 19.44: loader_tls_test builds, and ctest -R loader_tls passes, "loader_tls_test: OK (69 checks)" (Test #13, 0.12 sec), with the fixture runtime/build/fixtures/RelWithDebInfo/tiny_tls.dll that ctest passes. ctest -R loader_tls --repeat until-fail:30 passes 30 of 30 runs with no timeouts, and no loader_tls_test processes are left afterwards. This is a native Windows run, so the Wine ctest hang this PR fixes was not exercised, and I did not run main. AI-assisted. |
|
@gertify — thank you for the native Windows check at the rebased head |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shayderrr
left a comment
There was a problem hiding this comment.
Review
Reviewed test coverage in PR #4091: TEST-899: loader_tls's purge test uses suspended, console-less children (fixes the ctest + Wine hang).
Scope: runtime/test/loader_tls_test.cpp
Diff: +16 / -15 across 1 file(s).
The change stays inside the stated scope and the touched files line up with the description. No unrelated production paths are pulled in, and the stated behavior is directly exercised by the diff. I'm approving this one.
Reviewed by shayderrr via automated batch review.
|
Thanks @ray3242 - I went through TEST-899: loader_tls's purge test uses suspended, console-less children (fixes the ctes... and the diff around |
Claimed in the coordination issue as: TEST-899 (claim, from ddm-j's finding)
What and why
loader_tlsintermittently hangs under ctest + Wine after printingloader_tls_test: OK (69 checks), until ctest's timeout.test_purge_ownership_scopinggot its dead and live owner PIDs fromcmd.exe /c exit 0andcmd.exe /c timeout /t 30children started withCREATE_NO_WINDOW. Under Wine every console child gets a headlessconhost.exe --server ... --headless, which inherits the runner's Unix stdout/stderr. In a hung run, the test exe and bothcmd.exechildren were gone, and the only process (besides wineserver) still holding ctest's output pipe was that run's conhost. Reparented to init, it stayed alive after the run, so ctest never saw EOF.The children are now copies of the test executable started with
CREATE_SUSPENDED | DETACHED_PROCESS. They never run and have no console, so no conhost is started, and they still give one dead PID (terminated and waited) and one live PID for the two ownership checks. Test-only change; the purge logic inpe_loader.cppis untouched.Tested
Linux VM (no GPU needed), Wine 11.0, clang-cl/xwin cross build of
runtime/(RelWithDebInfo),ctest -R '^loader_tls$'run back to back:OK (69 checks).Native Windows: MKmajster ran e9fe3485 on Windows 11 24H2, MSVC 19.44:
ctest -R ^loader_tls$ --repeat until-fail:30passed 30/30 with no hangs. Maraco91 also passed e9fe3485 on Windows 11 26200, MSVC 19.42.Wine, by the finder: ddm-j passed e9fe3485 under Wine 11.21 on Fedora 45, on a Radeon 610M (RADV) and an RTX 4070 Ti: 10/10 on both GPUs with no conhost left behind, where main timed out in 8 of 10
run_wine_tests-style runs and 7 of 10 ctest runs.AI-assisted (Devin).
Checklist
docs/design.md, with how it was confirmed. (n/a: no translator change)