stablyai/orca · warning · AggregateError
Benchmark missing process group recovery failed
Error message
Benchmark missing process group recovery failed
What it means
In signalValidatedProcessGroup, after successfully listing process identities, zero members belong to the target pgid (the entire group exited or was re-parented). The recovery function compensateStoppedGroup is called but also encounters errors. The recovery errors are wrapped in an AggregateError. If recovery succeeds (no errors), the function returns false (group gone, nothing to signal).
Source
Thrown at config/scripts/macos-computer-helper-owner-loss-processes.mjs:248
return false
}
let members
try {
members = operations.processIdentities(true).filter((identity) => identity.pgid === pgid)
} catch (error) {
const recoveryErrors = compensateStoppedGroup(pgid, groupState, operations)
if (recoveryErrors.length > 0) {
throw new AggregateError(
[error, ...recoveryErrors],
'Benchmark process group recovery failed before validation'
)
}
throw error
}
if (members.length === 0) {
const recoveryErrors = compensateStoppedGroup(pgid, groupState, operations)
if (recoveryErrors.length > 0) {
throw new AggregateError(recoveryErrors, 'Benchmark missing process group recovery failed')
}
return false
}
if (members.some((identity) => !identity.command.includes(environmentFragment))) {
const ownershipError = new Error('Benchmark process group no longer belongs to this trial')
const recoveryErrors = compensateStoppedGroup(pgid, groupState, operations)
if (recoveryErrors.length > 0) {
throw new AggregateError(
[ownershipError, ...recoveryErrors],
'Benchmark process group authority recovery failed'
)
}
throw ownershipError
}
if (groupState.anchorPid) {
try {
operations.signalProcess(groupState.anchorPid, 'SIGCONT')
groupState.anchorPid = nullView on GitHub (pinned to 1136503c6a)
Solutions
- Inspect AggregateError.errors for the recovery failures — usually SIGCONT EPERM on a recycled PID
- If the group is genuinely gone, the recovery errors are secondary — reset groupState before the next operation
- Ensure compensateStoppedGroup ignores ESRCH (already does) and consider ignoring EPERM for stale anchors
Example fix
// before: recovery treats EPERM on recycled anchor as a hard error
try {
operations.signalProcess(groupState.anchorPid, 'SIGCONT')
} catch (error) {
errors.push(error) // EPERM on a PID now owned by another user
}
// after: also tolerate EPERM for stale anchor PIDs
try {
operations.signalProcess(groupState.anchorPid, 'SIGCONT')
} catch (error) {
if (error?.code !== 'ESRCH' && error?.code !== 'EPERM') {
errors.push(error)
}
} Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-check: verify the process group still has members
const members = processIdentities(true).filter(id => id.pgid === pgid)
if (members.length === 0) {
// group is gone — no need to signal, just clean up groupState
return false
} Try / catch
try {
signalValidatedProcessGroup(pgid, envFragment, signal, groupState)
} catch (error) {
if (error instanceof AggregateError && error.message.includes('missing process group')) {
// group is gone — check if recovery errors are just stale PID issues
const benign = error.errors.every(e => e.code === 'ESRCH' || e.code === 'EPERM')
if (benign) {
console.warn('Process group gone with stale recovery targets — resetting state')
groupState.stopped = false
groupState.anchorPid = null
return false
}
}
throw error
} Prevention
- Reset groupState (stopped, anchorPid) when the group is confirmed gone to prevent stale recovery targets
- Treat EPERM on recycled anchor PIDs as benign — the PID no longer belongs to the benchmark
- Verify group membership before signaling to avoid operating on empty groups
When it happens
Trigger: All processes in the target pgid have exited (members.length === 0 at line 245), AND compensateStoppedGroup fails to SIGCONT the stopped group or anchor PID for a non-ESRCH reason. recoveryErrors.length > 0 at line 247.
Common situations: The process group was already cleaned up by a prior cleanup stage but the groupState still tracks a stopped/anchor PID that was recycled to another process (EPERM on SIGCONT); race condition where the group exits between identity listing and recovery.
Related errors
- Benchmark process group recovery failed before validation
- Benchmark process group authority recovery failed
- Benchmark exact-command cleanup failed
- Benchmark trial cleanup failed
- Electron trial and cleanup failed
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/5fe6572a05fc8445.
Report an issue: GitHub.