Skip to content

waits: a stopped file-process check frees its slot before the process ends #107

Closed

Description

@scuttletoby

Follow-up from the final review of #106 (#106 (comment)), medium.

Problem: when a file check that runs as its own process (fileChild) is stopped (cancel, waits off/on, wait ends), its slot is freed as soon as the kill signal is sent, not when the process has ended. A process stuck in an uninterruptible read on a dead network drive (mostly macOS) may not die. Each cancel and re-register then leaves one more stuck process, with no limit. The server's own file threads are not affected.

Came in with: fix round 1 (81c7c27).

Fix (one line): take "fileChild" out of STOPPABLE_POOLS in apps/server/src/waits/WaitService.ts, so the slot is held until the child really exits, as for in-process file checks.

Test: a probe that registers and cancels a stuck file-process check repeatedly and counts live children: 6 at the #106 head, 2 before round 1. It must stay at 2.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions