cpu: confirm the worker is alive before the entry returns #382

Merged
thepatrickworld merged 3 commits from upstream-pr/388 into main 2026-11-22 03:51:19 +00:00
thepatrickworld commented 2026-11-22 00:04:47 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-22T00:04:47Z.


What

A deterministic control for the hang in #281. The measurements above agree on the end state: the entry thread is gone, one idle TppWorkerThread remains, and the process handle never signals.

tests/cpu/worker_alive_entry.asm is a CRT-free wrapper built with the same /ENTRY and /NODEFAULTLIB options as the native fixture, and it does not touch the shared entry:

  • original — starts a worker, the entry thread leaves with ExitThread
  • returning — starts the same worker, the entry returns
  • no_worker — no worker, the entry returns

The event

The worker signals a manual-reset event before it sleeps, and the entry waits on that event before it leaves. Without the handshake the fixture races: on a fast machine the entry can return before the new thread has ever run, and that launch would measure a different case. The event turns "a live worker exists when the entry leaves" into a fact rather than a timing assumption, which is the regression criterion you described.

The probe

tests/cpu/hang_probe.py launches a target with a one-byte selector and, for a launch that does not exit, records before terminating the child: whether the process handle is signaled (WaitForSingleObject, zero timeout), how many threads the process still owns, the bytes received on stdout and stderr separately, and whether each stream reached EOF.

With --control it asserts the three fixtures on every launch. Without it, it reports on any EXE — which is what a reporter on a machine that does hang can run. Standard library only; the handle check is ctypes, so nothing has to be installed.

The event handshake has no bearing on pe_map: this runs the fixture as a native process only, so the #249 comparison and pe_map_run returning to its host are untouched.

Measured

Windows 11 26200.9711, MSVC 19.44.35230, commit 4f6c39d. ctest --preset dev -R cpu_native: 15/15 pass, including the new test:

cpu_exe_worker_alive_original.exe:  expected timeout on every launch; deterministic (['timeout', 'timeout'])
cpu_exe_worker_alive_returning.exe: expected timeout on every launch; deterministic (['timeout', 'timeout'])
cpu_exe_worker_alive_no_worker.exe: expected exit on every launch;    deterministic (['exit', 'exit'])
control: PASS

The timeout signature matches the reports in the issue: handle not signaled, one live thread, stdout delivered, no EOF on either stream.

launch 0 selector 0: timeout after 2014 ms
  process handle: not signaled (WaitForSingleObject, 0 ms)
  threads: 1 live (23216)
  stdout: 22 bytes, EOF not reached within the EOF timeout
  stderr: 0 bytes, EOF not reached within the EOF timeout

No existing fixture or target is modified; the three new executables are separate targets and the shared entry stays as it is.

Refs #281

AI-assisted

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6536117473 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/388). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-22T00:04:47Z. --- ## What A deterministic control for the hang in #281. The measurements above agree on the end state: the entry thread is gone, one idle `TppWorkerThread` remains, and the process handle never signals. `tests/cpu/worker_alive_entry.asm` is a CRT-free wrapper built with the same `/ENTRY` and `/NODEFAULTLIB` options as the native fixture, and it does not touch the shared entry: - `original` — starts a worker, the entry thread leaves with `ExitThread` - `returning` — starts the same worker, the entry returns - `no_worker` — no worker, the entry returns ## The event The worker signals a manual-reset event before it sleeps, and the entry waits on that event before it leaves. Without the handshake the fixture races: on a fast machine the entry can return before the new thread has ever run, and that launch would measure a different case. The event turns "a live worker exists when the entry leaves" into a fact rather than a timing assumption, which is the regression criterion you described. ## The probe `tests/cpu/hang_probe.py` launches a target with a one-byte selector and, for a launch that does not exit, records before terminating the child: whether the process handle is signaled (`WaitForSingleObject`, zero timeout), how many threads the process still owns, the bytes received on stdout and stderr separately, and whether each stream reached EOF. With `--control` it asserts the three fixtures on every launch. Without it, it reports on any EXE — which is what a reporter on a machine that does hang can run. Standard library only; the handle check is `ctypes`, so nothing has to be installed. The event handshake has no bearing on `pe_map`: this runs the fixture as a native process only, so the #249 comparison and `pe_map_run` returning to its host are untouched. ## Measured Windows 11 `26200.9711`, MSVC 19.44.35230, commit `4f6c39d`. `ctest --preset dev -R cpu_native`: **15/15 pass**, including the new test: ```text cpu_exe_worker_alive_original.exe: expected timeout on every launch; deterministic (['timeout', 'timeout']) cpu_exe_worker_alive_returning.exe: expected timeout on every launch; deterministic (['timeout', 'timeout']) cpu_exe_worker_alive_no_worker.exe: expected exit on every launch; deterministic (['exit', 'exit']) control: PASS ``` The timeout signature matches the reports in the issue: handle not signaled, one live thread, stdout delivered, no EOF on either stream. ```text launch 0 selector 0: timeout after 2014 ms process handle: not signaled (WaitForSingleObject, 0 ms) threads: 1 live (23216) stdout: 22 bytes, EOF not reached within the EOF timeout stderr: 0 bytes, EOF not reached within the EOF timeout ``` No existing fixture or target is modified; the three new executables are separate targets and the shared entry stays as it is. Refs #281 _AI-assisted_
upstream-sync closed this pull request 2026-11-24 06:42:47 +00:00
abilliontokens commented 2026-11-24 06:48:17 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by abilliontokens on 2026-11-22T02:01:28Z.


Verified on the machine that reproduces #281, from a clean worktree of this PR's head. Everything below was measured here unless marked otherwise.

Environment

  • Windows 11 Pro, display version 25H2, build 26200.9711 (UBR read from CurrentVersion after the run: 9711).
  • MSVC 14.44.35207 (toolchain selected by tools\dev.ps1; ml64 from ...\MSVC\14.44.35207\bin\Hostx64\x64).
  • PR head 74dfca288ce3e3882e25a3a441c8e8a36dcb7b6e (single commit on 4f6c39d, the merge-base with main at the time of this run; GitHub reports the PR mergeable/clean against main at c2fc84c).

Build

git fetch origin pull/388/head:pr-388
git worktree add out/wt-388 pr-388
powershell -NoProfile -Command '& { Set-Location <repo>/out/wt-388; .\tools\dev.ps1 | Out-Null; $ErrorActionPreference="Continue"; cmake --preset dev -B out/build/dev-388 "-DINTAKE_PYTHON=<repo>/out/pe-env/Scripts/python.exe"; cmake --build out/build/dev-388 }'

377/377 build steps, no errors. Fixture SHA-256s:

8876c2beba0967f4bb73f27dabccf72ccf234e85ef728056373987f49adf7be4  cpu_exe_worker_alive_no_worker.exe
35e28e38e0ed6ce19ef028ec6672f3e69d320a21896b1f1b642ddaa5c5c21a59  cpu_exe_worker_alive_original.exe
eb0afb1c18627632febbfd6e93830f2c16ac71d7d95d33711f4b74d1183a6074  cpu_exe_worker_alive_returning.exe

Tests

New test plus the existing native-exe neighborhood:

ctest --test-dir out/build/dev-388 --no-tests=error -R 'cpu_native_worker_alive|cpu_native_exe' --output-on-failure

3/3 passed — cpu_native_exe_chain, cpu_native_exe_start, cpu_native_worker_alive (12.3 s for the latter, consistent with 2 s per timeout launch).

Full suite:

ctest --test-dir out/build/dev-388 --no-tests=error --output-on-failure

147 total: 144 passed, 0 failed, 3 skipped — bvh_wave64_hardware, bvh_wave64_warp, wave_shuffle_warp, the usual capability skips on this GPU.

The control beyond the ctest invocation

The ctest asserts 2 launches per fixture; I ran the PR's own harness at 20 launches per fixture:

out/pe-env/Scripts/python.exe tests/cpu/hang_probe.py --control --launches 20 --timeout 2 --eof-timeout 0.5 ^
  out/build/dev-388/cpu_exe_worker_alive_original.exe ^
  out/build/dev-388/cpu_exe_worker_alive_returning.exe ^
  out/build/dev-388/cpu_exe_worker_alive_no_worker.exe

Deterministic, 60/60 launches matched the documented outcome. No first mismatch — none occurred.

cpu_exe_worker_alive_original.exe:  expected timeout on every launch; deterministic (['timeout' x20])
cpu_exe_worker_alive_returning.exe: expected timeout on every launch; deterministic (['timeout' x20])
cpu_exe_worker_alive_no_worker.exe: expected exit on every launch;    deterministic (['exit' x20])
control: PASS  (process exit code 0)

Process-level signature captured at the timeout, before the child is killed (identical on both hanging variants, e.g. original launch 0):

launch 0 selector 0: timeout after 2002 ms
  process handle: not signaled (WaitForSingleObject, 0 ms)
  threads: 1 live (14960)
  stdout: 22 bytes, EOF not reached within the EOF timeout
    first bytes: 77 6f 72 6b 65 72 2d 61 6c 69 76 65 20 63 6f 6e   ("worker-alive control")
  stderr: 0 bytes, EOF not reached within the EOF timeout

no_worker in probe mode: exit code 0 after ~1 ms, 22 bytes stdout, EOF reached on both pipes within the EOF timeout, 3/3.

Assessment on this machine

The returning variant is the deterministic analogue of what #281 shows intermittently here: the entry thread is gone, exactly one worker remains, the process handle never signals, stdout is delivered but neither pipe reaches EOF. That end state — measured independently on this machine during the #281 investigation (thread capture showing one idle ntdll!TppWorkerThread, entry thread gone) — is exactly what these fixtures produce on every launch, so the control exercises the right end state and the harness reads it correctly. The event handshake does its job: with 20 launches per fixture there was no launch where the outcome could have been a race.

Scope note (inferred vs measured): these fixtures create their worker explicitly, so this control validates the end-state signature and the probe, not the parallel-loader attribution itself — that rests on the MaxLoaderThreads A/B/A already recorded in #281, and #394's wrapper is the fix that shipped. Also noted: the PR branch predates #394 (cpu_native_exe_termination is not in this tree); that is a rebase/merge-order consideration, not a defect — the merge is clean and both tests coexist in the merged tree.

Limits: one machine, no debug layer available here (no kernel-side stacks; thread identity via toolhelp only). probe281_threads.py was not rerun against cpu_exe_original.exe for this comment — the wrapped fixture is already covered by the post-#394 confirmation in #281.

AI-assisted; runs executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7072621551 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/388#issuecomment-7072621551). Originally posted by [abilliontokens](https://github.com/abilliontokens) on 2026-11-22T02:01:28Z. --- Verified on the machine that reproduces #281, from a clean worktree of this PR's head. Everything below was measured here unless marked otherwise. ## Environment - Windows 11 Pro, display version 25H2, build **26200.9711** (UBR read from `CurrentVersion` after the run: 9711). - MSVC 14.44.35207 (toolchain selected by `tools\dev.ps1`; `ml64` from `...\MSVC\14.44.35207\bin\Hostx64\x64`). - PR head `74dfca288ce3e3882e25a3a441c8e8a36dcb7b6e` (single commit on `4f6c39d`, the merge-base with `main` at the time of this run; GitHub reports the PR mergeable/clean against `main` at `c2fc84c`). ## Build ``` git fetch origin pull/388/head:pr-388 git worktree add out/wt-388 pr-388 powershell -NoProfile -Command '& { Set-Location <repo>/out/wt-388; .\tools\dev.ps1 | Out-Null; $ErrorActionPreference="Continue"; cmake --preset dev -B out/build/dev-388 "-DINTAKE_PYTHON=<repo>/out/pe-env/Scripts/python.exe"; cmake --build out/build/dev-388 }' ``` 377/377 build steps, no errors. Fixture SHA-256s: ``` 8876c2beba0967f4bb73f27dabccf72ccf234e85ef728056373987f49adf7be4 cpu_exe_worker_alive_no_worker.exe 35e28e38e0ed6ce19ef028ec6672f3e69d320a21896b1f1b642ddaa5c5c21a59 cpu_exe_worker_alive_original.exe eb0afb1c18627632febbfd6e93830f2c16ac71d7d95d33711f4b74d1183a6074 cpu_exe_worker_alive_returning.exe ``` ## Tests New test plus the existing native-exe neighborhood: ``` ctest --test-dir out/build/dev-388 --no-tests=error -R 'cpu_native_worker_alive|cpu_native_exe' --output-on-failure ``` **3/3 passed** — `cpu_native_exe_chain`, `cpu_native_exe_start`, `cpu_native_worker_alive` (12.3 s for the latter, consistent with 2 s per timeout launch). Full suite: ``` ctest --test-dir out/build/dev-388 --no-tests=error --output-on-failure ``` **147 total: 144 passed, 0 failed, 3 skipped** — `bvh_wave64_hardware`, `bvh_wave64_warp`, `wave_shuffle_warp`, the usual capability skips on this GPU. ## The control beyond the ctest invocation The ctest asserts 2 launches per fixture; I ran the PR's own harness at 20 launches per fixture: ``` out/pe-env/Scripts/python.exe tests/cpu/hang_probe.py --control --launches 20 --timeout 2 --eof-timeout 0.5 ^ out/build/dev-388/cpu_exe_worker_alive_original.exe ^ out/build/dev-388/cpu_exe_worker_alive_returning.exe ^ out/build/dev-388/cpu_exe_worker_alive_no_worker.exe ``` **Deterministic, 60/60 launches matched the documented outcome. No first mismatch — none occurred.** ``` cpu_exe_worker_alive_original.exe: expected timeout on every launch; deterministic (['timeout' x20]) cpu_exe_worker_alive_returning.exe: expected timeout on every launch; deterministic (['timeout' x20]) cpu_exe_worker_alive_no_worker.exe: expected exit on every launch; deterministic (['exit' x20]) control: PASS (process exit code 0) ``` Process-level signature captured at the timeout, before the child is killed (identical on both hanging variants, e.g. `original` launch 0): ``` launch 0 selector 0: timeout after 2002 ms process handle: not signaled (WaitForSingleObject, 0 ms) threads: 1 live (14960) stdout: 22 bytes, EOF not reached within the EOF timeout first bytes: 77 6f 72 6b 65 72 2d 61 6c 69 76 65 20 63 6f 6e ("worker-alive control") stderr: 0 bytes, EOF not reached within the EOF timeout ``` `no_worker` in probe mode: exit code `0` after ~1 ms, 22 bytes stdout, **EOF reached on both pipes** within the EOF timeout, 3/3. ## Assessment on this machine The `returning` variant is the deterministic analogue of what #281 shows intermittently here: the entry thread is gone, exactly one worker remains, the process handle never signals, stdout is delivered but neither pipe reaches EOF. That end state — measured independently on this machine during the #281 investigation (thread capture showing one idle `ntdll!TppWorkerThread`, entry thread gone) — is exactly what these fixtures produce on every launch, so the control exercises the right end state and the harness reads it correctly. The event handshake does its job: with 20 launches per fixture there was no launch where the outcome could have been a race. Scope note (inferred vs measured): these fixtures create their worker explicitly, so this control validates the end-state signature and the probe, not the parallel-loader attribution itself — that rests on the `MaxLoaderThreads` A/B/A already recorded in #281, and #394's wrapper is the fix that shipped. Also noted: the PR branch predates #394 (`cpu_native_exe_termination` is not in this tree); that is a rebase/merge-order consideration, not a defect — the merge is clean and both tests coexist in the merged tree. Limits: one machine, no debug layer available here (no kernel-side stacks; thread identity via toolhelp only). `probe281_threads.py` was not rerun against `cpu_exe_original.exe` for this comment — the wrapped fixture is already covered by the post-#394 confirmation in #281. _AI-assisted; runs executed locally._
R0Y00 commented 2026-11-24 06:48:18 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T02:38:40Z.


In worker_alive_entry.asm, worker calls SetEvent and Sleep directly from thread entry without reserving x64 shadow space or aligning RSP. This makes the worker itself ABI-invalid, including on the path meant to establish the handshake. Please give it a normal nonleaf frame (e.g. sub rsp, 28h with matching unwind metadata and epilogue). Also check WaitForSingleObject returned WAIT_OBJECT_0 before treating startup as confirmed. Please rerun cpu_native_worker_alive together with the now-merged cpu_native_exe_termination. The independent 20-launch results are appreciated.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7073032414 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/388#issuecomment-7073032414). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-22T02:38:40Z. --- In worker_alive_entry.asm, worker calls SetEvent and Sleep directly from thread entry without reserving x64 shadow space or aligning RSP. This makes the worker itself ABI-invalid, including on the path meant to establish the handshake. Please give it a normal nonleaf frame (e.g. sub rsp, 28h with matching unwind metadata and epilogue). Also check WaitForSingleObject returned WAIT_OBJECT_0 before treating startup as confirmed. Please rerun cpu_native_worker_alive together with the now-merged cpu_native_exe_termination. The independent 20-launch results are appreciated.
R0Y00 commented 2026-11-24 06:48:23 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T03:57:09Z.


Merged after Windows CI. I added a standard nonleaf frame to the worker, checked WAIT_OBJECT_0 and moved the ready marker after the handshake so an entry stuck waiting cannot satisfy the expected-timeout control. Local cpu_native_worker_alive and cpu_native_exe_termination both passed.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7073886486 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/388#issuecomment-7073886486). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-22T03:57:09Z. --- Merged after Windows CI. I added a standard nonleaf frame to the worker, checked WAIT_OBJECT_0 and moved the ready marker after the handshake so an entry stuck waiting cannot satisfy the expected-timeout control. Local cpu_native_worker_alive and cpu_native_exe_termination both passed.
thepatrickworld commented 2026-11-24 06:48:36 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-22T17:05:01Z.


@abilliontokens Thanks for this — it arrived while the PR was still open, and it is the reason I did not argue about the timeout behaviour: you produced the end-state signature I had only assumed.

One thing worth adding, because it changes what your report covers: the head you tested (74dfca2) is not the binary that shipped. R0Y00 added a nonleaf frame to the worker, checked WAIT_OBJECT_0 before accepting startup, and moved the ready marker after the handshake. The merged commit is ba7d6b7. The fixture SHA-256s therefore differ from yours:

1FBB9CFFC4D40ACA189C6E8D87D694088410B4E167EB9673235B4069F58F6F08  cpu_exe_worker_alive_original.exe
BBA712C934A8F1EA807A91A3DD4ABD3F8B68CC6EA36F924C6E8EAD9071B4E268  cpu_exe_worker_alive_returning.exe
D722AF472218C4C0E7211EF035F6CAAC2C2E7A697FA12525DBE213C4D4FF5F7E  cpu_exe_worker_alive_no_worker.exe

So I re-ran your protocol on the merged commit, from a clean worktree of ba7d6b7, to check that the ABI fix did not move the observable behaviour — the marker move in particular sits directly in the path your probe reads.

Environment

  • Windows 11 25H2, build 26200.9711
  • MSVC 19.44.35230 (toolset 14.44.35207), Windows SDK 10.0.26100.0, DXC 1.9.2602.17
  • AMD Radeon RX 9070 XT, vendor 1002, device 7550, driver 32.0.32029.2010
  • debug_layer=unavailable here as well (Tools.Graphics.DirectX is NotPresent), so no kernel-side stacks on this run either.

Tests

ctest --preset dev --no-tests=error -R 'cpu_native_worker_alive|cpu_native_exe' --output-on-failure

5/5 passed — cpu_native_exe_chain, cpu_native_exe_frame_chain, cpu_native_exe_termination, cpu_native_exe_start, cpu_native_worker_alive (12.35 s).

cpu_native_exe_termination is worth calling out: your tree predates #394, so this is the first run of the merged fixture set where the worker control and the termination fixture are built from the same commit. They coexist without interference.

Your harness at 20 launches, on the merged binaries

out\pe-env\Scripts\python.exe tests\cpu\hang_probe.py --control --launches 20 --timeout 2 --eof-timeout 0.5 ^
  out\build\dev\cpu_exe_worker_alive_original.exe ^
  out\build\dev\cpu_exe_worker_alive_returning.exe ^
  out\build\dev\cpu_exe_worker_alive_no_worker.exe

60/60 deterministic, control: PASS. Same partition as yours: 20 × timeout, 20 × timeout, 20 × exit.

Signature at the timeout, captured before the child is killed, on both hanging variants:

launch 0 selector 0: timeout after 2000 ms
  process handle: not signaled (WaitForSingleObject, 0 ms)
  threads: 1 live
  stdout: 22 bytes, EOF not reached within the EOF timeout
    first bytes: 77 6f 72 6b 65 72 2d 61 6c 69 76 65 20 63 6f 6e
  stderr: 0 bytes, EOF not reached within the EOF timeout

Identical to what you measured on 74dfca2: one live thread, process handle never signaled, stdout delivered, no EOF on either pipe.

What this settles

The frame reservation, the WAIT_OBJECT_0 check and the marker move are behaviour-preserving for this control. Moving the marker after the handshake does not weaken the expected-timeout arm: the marker still arrives (22 bytes), the process still never signals, and the entry that would be stuck waiting cannot satisfy the control — which is the property that move was meant to protect.

I agree with your scope note and I would not push it further: this validates the end-state signature and the probe, not the loader attribution. #394 is the fix on that path, and it now passes in the same tree as the control.

Limits unchanged and mine too: one machine, one adapter, no debug layer, thread identity via toolhelp only.

AI-assisted; runs executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7082565196 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/388#issuecomment-7082565196). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-22T17:05:01Z. --- @abilliontokens Thanks for this — it arrived while the PR was still open, and it is the reason I did not argue about the timeout behaviour: you produced the end-state signature I had only assumed. One thing worth adding, because it changes what your report covers: the head you tested (`74dfca2`) is **not** the binary that shipped. R0Y00 added a nonleaf frame to the worker, checked `WAIT_OBJECT_0` before accepting startup, and moved the ready marker after the handshake. The merged commit is `ba7d6b7`. The fixture SHA-256s therefore differ from yours: ``` 1FBB9CFFC4D40ACA189C6E8D87D694088410B4E167EB9673235B4069F58F6F08 cpu_exe_worker_alive_original.exe BBA712C934A8F1EA807A91A3DD4ABD3F8B68CC6EA36F924C6E8EAD9071B4E268 cpu_exe_worker_alive_returning.exe D722AF472218C4C0E7211EF035F6CAAC2C2E7A697FA12525DBE213C4D4FF5F7E cpu_exe_worker_alive_no_worker.exe ``` So I re-ran your protocol on the merged commit, from a clean worktree of `ba7d6b7`, to check that the ABI fix did not move the observable behaviour — the marker move in particular sits directly in the path your probe reads. ### Environment - Windows 11 25H2, build **26200.9711** - MSVC **19.44.35230** (toolset 14.44.35207), Windows SDK 10.0.26100.0, DXC 1.9.2602.17 - AMD Radeon RX 9070 XT, vendor 1002, device 7550, driver 32.0.32029.2010 - `debug_layer=unavailable` here as well (`Tools.Graphics.DirectX` is `NotPresent`), so no kernel-side stacks on this run either. ### Tests ``` ctest --preset dev --no-tests=error -R 'cpu_native_worker_alive|cpu_native_exe' --output-on-failure ``` **5/5 passed** — `cpu_native_exe_chain`, `cpu_native_exe_frame_chain`, `cpu_native_exe_termination`, `cpu_native_exe_start`, `cpu_native_worker_alive` (12.35 s). `cpu_native_exe_termination` is worth calling out: your tree predates #394, so this is the first run of the merged fixture set where the worker control and the termination fixture are built from the same commit. They coexist without interference. ### Your harness at 20 launches, on the merged binaries ``` out\pe-env\Scripts\python.exe tests\cpu\hang_probe.py --control --launches 20 --timeout 2 --eof-timeout 0.5 ^ out\build\dev\cpu_exe_worker_alive_original.exe ^ out\build\dev\cpu_exe_worker_alive_returning.exe ^ out\build\dev\cpu_exe_worker_alive_no_worker.exe ``` **60/60 deterministic, control: PASS.** Same partition as yours: 20 × timeout, 20 × timeout, 20 × exit. Signature at the timeout, captured before the child is killed, on both hanging variants: ``` launch 0 selector 0: timeout after 2000 ms process handle: not signaled (WaitForSingleObject, 0 ms) threads: 1 live stdout: 22 bytes, EOF not reached within the EOF timeout first bytes: 77 6f 72 6b 65 72 2d 61 6c 69 76 65 20 63 6f 6e stderr: 0 bytes, EOF not reached within the EOF timeout ``` Identical to what you measured on `74dfca2`: one live thread, process handle never signaled, stdout delivered, no EOF on either pipe. ### What this settles The frame reservation, the `WAIT_OBJECT_0` check and the marker move are behaviour-preserving for this control. Moving the marker after the handshake does not weaken the expected-timeout arm: the marker still arrives (22 bytes), the process still never signals, and the entry that would be stuck waiting cannot satisfy the control — which is the property that move was meant to protect. I agree with your scope note and I would not push it further: this validates the end-state signature and the probe, not the loader attribution. #394 is the fix on that path, and it now passes in the same tree as the control. Limits unchanged and mine too: one machine, one adapter, no debug layer, thread identity via toolhelp only. _AI-assisted; runs executed locally._
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!382
No description provided.