stablyai/orca · error · Error
Owned IBus processes survived cleanup: ${evidence.ibusGroupA
Error message
Owned IBus processes survived cleanup: ${evidence.ibusGroupAfterCleanup.join('; ')} What it means
After the test runs, the finally block calls stopOwnedProcessGroup(ibusProcess.pid) to kill the whole IBus process group and returns surviving member PIDs. If any survive, the harness fails the run — a leaked IME daemon would corrupt subsequent tests or pollute the host. The surviving PID list is included in the message and in test-results/terminal-ibus-hangul-native-processes.json.
Source
Thrown at config/scripts/run-terminal-ibus-hangul-e2e.mjs:233
closeSync(ibusLogFd)
closeSync(windowManagerLogFd)
mkdirSync(path.join(projectDir, 'test-results'), { recursive: true })
copyFileSync(
ibusLogPath,
path.join(projectDir, 'test-results', 'terminal-ibus-hangul-native-ibus.log')
)
copyFileSync(
windowManagerLogPath,
path.join(projectDir, 'test-results', 'terminal-ibus-hangul-native-xfwm4.log')
)
writeFileSync(
path.join(projectDir, 'test-results', 'terminal-ibus-hangul-native-processes.json'),
`${JSON.stringify(evidence, null, 2)}\n`
)
}
if (evidence.ibusGroupAfterCleanup.length > 0) {
throw new Error(
`Owned IBus processes survived cleanup: ${evidence.ibusGroupAfterCleanup.join('; ')}`
)
}
if (evidence.windowManagerGroupAfterCleanup.length > 0) {
throw new Error(
`Owned window-manager processes survived cleanup: ${evidence.windowManagerGroupAfterCleanup.join('; ')}`
)
}
return testExitCode
}
async function runOuter() {
if (process.platform !== 'linux') {
throw new Error('The native IBus Hangul E2E runner requires Linux/X11')
}
const evidenceDir = mkdtempSync(path.join(os.tmpdir(), 'orca-terminal-ime-e2e-'))
const runtimeDir = path.join(evidenceDir, 'runtime')View on GitHub (pinned to 1136503c6a)
Solutions
- Inspect test-results/terminal-ibus-hangul-native-processes.json for the surviving PIDs and their names.
- Disable DBus autostart for ibus-daemon in the session env (IBUS_DAEMON_NO_RESTART / unset the .service autostart) so it cannot respawn.
- Make stopOwnedProcessGroup escalate to SIGKILL after a short grace and re-check; if it already does, widen the grace window.
- Run inside a PID namespace (unshare -p) so the whole tree is reaped deterministically.
Example fix
// before // ibus-daemon respawns via DBus activation after group kill // after // in the session env block, disable autostart: IBUS_DISABLE_AUTOSTART: '1'
Defensive patterns
Strategy: validation
Validate before calling
// post-cleanup leak guard with context
const remaining = await stopOwnedProcessGroup(ibusProcess.pid)
if (remaining.length > 0) {
console.error('IBus survivors:', remaining, '(check processes.json)')
// optionally escalate: pkill -9 each
} Try / catch
try { /* test body */ }
finally {
const survivors = await stopOwnedProcessGroup(ibusProcess.pid)
if (survivors.length) throw new Error(`Owned IBus processes survived cleanup: ${survivors.join('; ')}`)
} Prevention
- Disable DBus autostart for ibus-daemon in the session env to prevent respawn.
- Run the session inside a PID namespace so the whole tree is reaped.
- Have stopOwnedProcessGroup escalate SIGTERM -> SIGKILL and re-verify.
When it happens
Trigger: ibus-daemon or one of its helper processes (ibus-x11, ibus-portal, the hangul engine) was reparented out of the process group, refused SIGTERM/SIGKILL, or was re-spawned by the session manager after the group kill.
Common situations: ibus-daemon restarts itself via DBus activation after being killed; a process escaped the group via setsid; container/cgroup shielding blocks the signal; slow shutdown exceeding the kill grace period.
Related errors
- Owned window-manager processes survived cleanup: ${evidence.
- Owned X11 session processes survived cleanup: ${remaining.jo
- Failed to configure IBus Hangul ${key}: ${result.stderr.trim
- ibus-daemon exited early with code ${ibusProcess.exitCode}
- Timed out while selecting the IBus Hangul engine
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/38114c64a9438014.
Report an issue: GitHub.