Skip to content

Wait for the watchdog fixture child to finish exiting #820

Done

Description

The script suite can fail with Shutdown left its child process alive. after the watchdog terminates the process tree. This happened on Linux aarch64 with PowerShell 7.7.0 and .NET 11 while verifying #819. Master 93a27c4b and the draft contain identical watchdog and test source.

Question and baseline. Does the assertion confuse an asynchronously terminating child with one that survived shutdown? The test samples the child's HasExited once. Its cleanup already waits for that child to exit. Microsoft's process termination contract

RED. The unchanged fixture passes under the ordinary reaper. A dedicated Linux subreaper holds the terminated test child for 250 ms. The kernel reports zombie state, wait status records signal 9, and the exact child-alive assertion fails. The original intermittent run lacked a kernel trace, so its cause remains unverified.

Candidate and GREEN. Observe the exact child until the existing five-second fixture cleanup bound before judging exit. Require the unchanged reaper control and the retained-child case to pass. A genuinely surviving child must still fail. Keep watchdog production code, the one-second shutdown deadline, process-tree ownership, existing orphan controls, and all suite assertions. Run the focused and full script suites. Exercise Windows and macOS before landing.

Stop and evidence. Stop on unrelated failures, missing child identity, changed production behavior, or incomplete cleanup. Raw kernel observations and test logs are under .artifacts/session-goal-watchdog/. Keep this work independent of the Unity 6.6 changes in #819.

DISCLOSURE: LLM-GENERATED TEXT

Resolution

The fix landed in #821. Cross-platform and survivor-control verification passed. Maintainer wallstop confirmed review and acceptance of the landed fix on 2026-11-24 in the release working session.

Activity

  1. wallstop commented on Nov 23, 2026

    @wallstop
    CollaboratorAuthor

    Local commit ba2b71948fcd33510c6c23f994eab238500f4aa9 changes the watchdog fixture's assertion to observe the child's exit using the same five-second bound as its existing cleanup. The watchdog and its shutdown deadline stay unchanged.

    The baseline full fixture failed all three delayed-reaping trials and passed all three ordinary controls. The candidate passed all six full trials and all 50 focused repetitions, including 25 with delayed reaping. For every held child, the independent observer recorded zombie state and wait status for signal 9. A control that forces the watchdog to kill only the parent left the child alive beyond the assertion's deadline. The candidate rejected that control and its emergency cleanup terminated the child. All 1,500 Node and 150 Python tests and the commit hooks passed on Linux. Raw results are in .artifacts/session-goal-watchdog/.

    One focused observer stopped when Linux removed a process during a read of /proc. The observer now recognizes this disappearance and resumed the missing trial range. The test and production sources stayed the same. The original intermittent event remains unattributed. Keep this issue open through Windows and macOS checks and maintainer review.

    DISCLOSURE: LLM-GENERATED TEXT

  2. wallstop commented on Nov 23, 2026

    @wallstop
    CollaboratorAuthor

    Prospective next review candidate. Replay the existing one-file fixture correction ba2b7194 on local release derivative 926bc3a3 of #821. Both watchdog and fixture baselines match the original reproduced source. Replay the same Linux subreaper and parent-only termination controls, binding PID/start ticks and the real child wait status. Require the unchanged draft fixture to fail the held terminated-child case and pass ordinary reaping. Require the candidate to pass both, and to continue rejecting a genuinely surviving child before emergency cleanup. Run the normal full script suite, validators and exact-tree restore. Keep the existing timeout bounds, no Windows/macOS acceptance claim, and no hosted draft change. Evidence .artifacts/session-goal-820-release-draft/.

  3. wallstop commented on Nov 23, 2026

    @wallstop
    CollaboratorAuthor

    The current-base replay reproduces both old delayed-reaping failures and passes both patched delayed-reaping cases, with signal 9 independently recorded. The original parent-only fault now fails earlier at the watchdog's unconfirmed output-pipe cleanup guard. Retain that refusal. To reach the fixture assertion as a separately bounded control, give only the fault child independent stdout/stderr pipes and leave that child silent while it waits. Keep parent-only termination, the real child PID and original five-second fixture assertion. Require the exact child-alive failure and verified cleanup, or retain the actual earlier refusal. No change to the production watchdog or candidate fixture comes from this diagnostic.

  4. wallstop commented on Nov 23, 2026

    @wallstop
    CollaboratorAuthor

    Replayed the fixture fix on the combined local release candidate b06ed1b78e015987df065eae06a582cbaf616f0f (tree f52d7f5f1f3b496daad8c9bce1bd893412a475f0, parent 926bc3a31f1fc01a86398c3e4ccdca79b92c35db). The candidate waits up to the fixture’s existing five-second cleanup allowance before asserting the child exited. The production watchdog blob was identical across the comparison.

    On Linux, the parent commit passed both ordinary-reaping runs and failed both delayed-reaping runs. The observer matched the child PID and start ticks, saw the child in kernel state Z while reaping was delayed, then reaped it and recorded signal 9. The candidate passed both ordinary and both delayed runs. In a scratch control, parent-only termination left the child holding an output pipe and the watchdog rejected the shutdown. The repeat with separate child pipes reached the fixture assertion and failed with “Shutdown left its child process alive.” The observer tracked that child alive for about five seconds after the parent exited. Fixture cleanup then removed the child.

    All 1,502 Node and 152 Python tests passed. npm run validate:all and the normal commit hooks also passed. A fresh bare repository restored all three local candidate commits from the bundle against #821's hosted head 20ca2b37e0b1cf144f9f6bc0c8b657e59e742e7f and matched the exact commit and tree.

    Linux observation receipt SHA-256 0649d23a7dd13f3d5ac75309cb57479ce25050441905a579526b87831ae6cf2e. Local review bundle SHA-256 7512933ff3faa47dec6f3c332065e222939953f9278c332afc3935f2061741cf. Windows and macOS runs and maintainer review remain pending.

  5. wallstop commented on Nov 23, 2026

    @wallstop
    CollaboratorAuthor

    The watchdog fixture fix is included in draft #821 at hosted head 0d71d9e8e124b248a74d4e3b449e14e6dffe893d, which I verified by an independent fetch. All three script jobs completed successfully. Each raw job log explicitly records a passing PowerShell editor-process-watchdog regression suite and the full 1,502 Node and 152 Python test inventories. The earlier controlled delayed-reaping and real-survivor observations remain Linux-specific. The cross-platform script-suite check is complete for this head, and the source still awaits review and merge.

  6. wallstop commented on Nov 24, 2026

    @wallstop
    CollaboratorAuthor

    The watchdog fixture fix is on master in #821 (252a1c59). The final PR head 24da9d66 ran the complete script suite on Linux, macOS, and Windows. The watchdog fixture and its test entry point match the current master blobs. The Linux reproduction and survivor control establish that the fixture accepts delayed reaping and still rejects a live child. The cause of the original intermittent failure remains unverified. Closing as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions