stablyai/orca · error · AggregateError
Benchmark process group recovery failed before validation
Error message
Benchmark process group recovery failed before validation
What it means
In signalValidatedProcessGroup, the initial call to processIdentities(true) (which runs `ps eww -axo pid=,pgid=,command=`) throws an error before the group can even be validated. The recovery function compensateStoppedGroup (sending SIGCONT to stopped/anchor PIDs) also produces errors. Both the ps failure and recovery failures are wrapped in an AggregateError.
Source
Thrown at config/scripts/macos-computer-helper-owner-loss-processes.mjs:238
}
export function signalValidatedProcessGroup(
pgid,
environmentFragment,
signal,
groupState = { stopped: false, anchorPid: null },
operations = processGroupSignalOperations
) {
if (!Number.isInteger(pgid) || pgid <= 0) {
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(View on GitHub (pinned to 1136503c6a)
Solutions
- Check why `ps eww -axo pid=,pgid=,command=` failed — increase maxBuffer or reduce process count
- Inspect AggregateError.errors: errors[0] is the ps failure, errors[1+] are recovery failures
- Ensure the process group's stopped/anchor PIDs are still owned by the benchmark user
- If ps output is too large, consider filtering to the target pgid earlier in the pipeline
Example fix
// before: ps eww may exceed buffer on systems with many processes
const output = execFileSync('ps', ['eww', '-axo', 'pid=,pgid=,command='], {
encoding: 'utf8',
maxBuffer: 20 * 1024 * 1024
})
// after: increase buffer or scope the query
const output = execFileSync('ps', ['eww', '-axo', 'pid=,pgid=,command='], {
encoding: 'utf8',
maxBuffer: 100 * 1024 * 1024
}) Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-check: ensure ps eww will not overflow
const psCount = execFileSync('ps', ['-axo', 'pid='], { encoding: 'utf8' }).trim().split('\n').length
if (psCount > 100_000) {
throw new Error(`Process count (${psCount}) too high for ps eww — reduce before running`)
} Try / catch
try {
signalValidatedProcessGroup(pgid, envFragment, signal, groupState)
} catch (error) {
if (error instanceof AggregateError) {
// errors[0] = ps failure, errors[1+] = recovery failures
const [psError, ...recoveryErrors] = error.errors
console.error('ps eww failed:', psError.message)
recoveryErrors.forEach(e => console.error('Recovery failed:', e.message))
}
throw error
} Prevention
- Increase the ps maxBuffer if the system has many processes
- Ensure the benchmark user has permissions to inspect all processes in the group
- Reset groupState (stopped, anchorPid) between independent operations to avoid stale recovery targets
When it happens
Trigger: processIdentities(true) throws (ps eww fails: output exceeds 20MB maxBuffer, EACCES, or ps binary not found) at line 234. Then compensateStoppedGroup also encounters non-ESRCH errors when trying to SIGCONT the stopped group or anchor PID. recoveryErrors.length > 0 at line 237.
Common situations: System with an extremely large number of processes causing ps eww output to exceed the 20MB buffer; permission restrictions on ps; the stopped/anchor PID was recycled to a process owned by another user (EPERM on SIGCONT); ps not in PATH.
Related errors
- Benchmark missing process group recovery failed
- Benchmark process group authority recovery failed
- Could not read watchdog child RSS for PID ${pid}
- Could not read CPU time for PID ${pid}
- Invalid process CPU time: ${value}
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/02c14172ad0514c4.
Report an issue: GitHub.