gastownhall/beads · error

timeout (%s) waiting for process exit

Error message

timeout (%s) waiting for process exit

What it means

Error "timeout (%s) waiting for process exit" thrown in gastownhall/beads.

Source

Thrown at internal/storage/dbproxy/proxy/endpoint.go:936

		// A different birth token proves the recorded process exited, even
		// when the numeric PID has since been recycled.
		return nil, true, nil
	}
	return nil, false, fmt.Errorf("open verified process handle: %w", err)
}

func waitForRecordedProcessExit(pf *pidfile.PidFile, timeout time.Duration) error {
	deadline := time.Now().Add(timeout)
	for {
		matched, err := procid.Verify(pf.Pid, procid.Token(pf.Birth))
		if err != nil {
			return err
		}
		if !matched {
			return nil
		}
		if time.Now().After(deadline) {
			return fmt.Errorf("timeout (%s) waiting for process exit", timeout)
		}
		time.Sleep(shutdownConfirmPoll)
	}
}

func killSpawnedChild(child *spawnedProxyChild) error {
	select {
	case <-child.done:
		return nil
	default:
	}
	if child.handle == nil {
		// No verified handle could be opened at spawn time. The child is our
		// own un-reaped process, so its PID cannot have been recycled and a
		// direct kill is safe; the alternative is leaking a live proxy child.
		if err := child.cmd.Process.Kill(); err != nil && !errors.Is(err, os.ErrProcessDone) {
			return fmt.Errorf("kill spawned proxy child pid %d: %w", child.cmd.Process.Pid, err)
		}

View on GitHub (pinned to 71377f2769)

When it happens

Trigger: Thrown at internal/storage/dbproxy/proxy/endpoint.go:936 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30). Data as JSON: /api/errors/54f094633c3610a7. Report an issue: GitHub.