Skip to content

fix(claim-evidence): verifyGradeableEvidence leaks descendant processes on timeout #181

Description

@drewstone

What is missing

verifyGradeableEvidence (src/claim-evidence.ts:265) runs a claim's recorded check through runBash, which calls execFile without detached: true and without a process-group kill.
When the timeout fires, only the shell dies; its descendants keep the stdio pipes open and keep running.

Where it lives today

discovery-lab runner/grade.mjs bounds the call with timeoutMs and documents the leak; discovery-lab tools/oracle-jail.mjs (356 lines) exists partly to kill the process group (see tangle-network/agent-runtime#1040 for the jail as a checker port).

Measured motive

Three CaDiCaL solver processes outlived their grading parent by five days; the lab's grading loop hung twice on this shape (8 h and 1.9 h) before the jail was written.

Acceptance

Spawn the check with detached: true, kill the negative pid (the whole group) on timeout, and add a test that starts bash -c 'sleep 60 & wait' with a 100 ms timeout and asserts no descendant survives.
The lab can then delete its process-group handling.

Activity

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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions