{"record":{"id":"fd3182a37b138be8","repo":"deepseek-ai/deepseek-harness","slug":"subprocess-e2b-remote-process-group-processgrou","errorCode":null,"errorMessage":"subprocess-e2b: remote process group ${processGroupId} remained live after force termination","messagePattern":"subprocess-e2b: remote process group (.+?) remained live after force termination","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/e2b/subprocess-e2b/src/process.ts","lineNumber":640,"sourceCode":"    }\n    this.terminationSignal = 'SIGKILL'\n    await this.forceKillGroup(sandbox, handle, processGroupId)\n    this.markQuiescent()\n  }\n\n  private async forceKillGroup(sandbox: Sandbox, handle: CommandHandle, processGroupId: number): Promise<void> {\n    try {\n      await signalRemoteGroups(sandbox, this.controlEnvs, [processGroupId], 'KILL')\n    } catch (_processGroupKillFailure) {\n      // SDK kill and the final liveness probe remain independent cleanup paths.\n    }\n    try {\n      await handle.kill()\n    } catch (_sdkKillFailure) {\n      // The final liveness probe, not either transport's self-report, proves cleanup.\n    }\n    if (await this.waitForGroupExit(sandbox, processGroupId)) return\n    throw new Error(`subprocess-e2b: remote process group ${processGroupId} remained live after force termination`)\n  }\n\n  private async waitForGroupExit(sandbox: Sandbox, processGroupId: number): Promise<boolean> {\n    const deadline = Date.now() + this.spec.graceMs\n    while (await this.groupAlive(sandbox, processGroupId)) {\n      if (Date.now() >= deadline) return false\n      await waitTick(this.pollMs)\n    }\n    return true\n  }\n\n  private throwTerminationFailure(): void {\n    if (this.terminationFailure !== undefined) throw this.terminationFailure\n  }\n\n  private async groupAlive(sandbox: Sandbox, pid: number, signal?: AbortSignal): Promise<boolean> {\n    const result = await sandbox.commands.run(\n      `set -o pipefail; ps -eo pgid=,stat= | awk '$1 == ${pid} && $2 !~ /^[ZXx]/ { live=1 } END { if (live) print \"live\" }'`,","sourceCodeStart":622,"sourceCodeEnd":658,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/e2b/subprocess-e2b/src/process.ts#L622-L658","documentation":"Error \"subprocess-e2b: remote process group ${processGroupId} remained live after force termination\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/e2b/subprocess-e2b/src/process.ts:640 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}