Dev session cannot be killed: forceExit crashes on undefined `pipeline`, orphan watchdog loops forever
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
Direzione di ricerca
Read packages/everything-dev/src/services/dev/session.ts around forceExit and pipeline creation, then inspect orchestrator.ts and the orphan watchdog. Reproduce by starting bos dev and killing its parent process. Done means the session exits cleanly on orphaning or repeated SIGINT without a recurring exception; the issue does not name a test to run.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Symptoms
Killing a running bos dev session (or orphaning it via the parent/wrapper dying) leaves a zombie orchestrator that spams this every 200ms and never exits:
[Dev] Parent process died — force exiting (orphaned service tree)
[Orchestrator] Uncaught exception: ReferenceError: pipeline is not defined
at forceExit (.../dist/services/dev/session.mjs:237:3)
at Timeout._onTimeout (.../session.mjs:246:4)
^C is also swallowed: the second SIGINT escalates into the same broken forceExit, so even repeated ^C just re-prints the error. Only an external SIGKILL (or closing the terminal) ends it.
Root cause — three stacked bugs
1. forceExit references pipeline out of scope — packages/everything-dev/src/services/dev/session.ts:
const forceExit = () => {
controls?.restoreView();
// @ts-ignore
pipeline.flush(); // ← ReferenceError at runtime
console.log("\n[Dev] Force exit");
controls?.emergencyKill(); // ← never reached
process.exit(0); // ← never reached
};
pipeline is created inside the session's Effect.gen block (session.ts:182, per-fiber log pipeline); forceExit is defined at the outer wrapper scope where it does not exist. The // @ts-ignore silences the type error but not the runtime one. The crash happens before emergencyKill() and process.exit(0).
2. The orchestrator swallows the crash — orchestrator.ts:20 registers process.on("uncaughtException", (err) => console.error(...)), so the ReferenceError is logged and the process survives instead of dying.
3. The orphan watchdog re-arms forever — a 200ms setInterval compares process.ppid against the initial value and calls the broken forceExit on every mismatch → infinite crash/log loop.
Introduced
fbe6c6ff (2026-10-19, "refactor(everything-dev): domain-folder layout, Effect-native CLI split, dev-render DIP", #476) — the pipeline.flush() call in forceExit came with that refactor's scope reshuffle. Shipped in [email protected].
Repro
bos devin any v2 child app (observed on a v2-upgraded child running the rc.14 CLI).- Kill the parent/wrapper process (or let it die) so the orchestrator is reparented.
- Watch the 200ms crash loop;
^Cdoes not help.
Fix direction
- Hoist the pipeline (or an
activePipelinehandle) to the wrapper scope — assign when created, clear at teardown — and make the kill unconditional:
const forceExit = () => {
try { controls?.restoreView(); } catch {}
try { activePipeline?.flush(); } catch {}
console.log("\n[Dev] Force exit");
try { controls?.emergencyKill(); } catch {}
process.exit(0);
};
- Belt-and-braces in
orchestrator.ts: if an uncaught exception fires while a force-exit is in flight,process.exit(1)instead of swallowing it.
Workaround until fixed
External kill path (never goes through the in-process forceExit): bos kill --all, or pkill -9 -f "everything-dev.*dev".
- Lingua principale
- TypeScript
- Stelle
- 5
- Fork
- 3
- Merge medio
- 11h 8m
- PR unite (30g)
- 90
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NEARBuilders/everything-dev
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NEARBuilders/everything-dev#400 ·
I maintainer di solito rispondono entro 1 giorno
-
bug needs-triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
NEARBuilders/everything-dev#496 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
NEARBuilders/everything-dev#493 ·
I maintainer di solito rispondono entro 1 giorno
-
ready-for-human
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
NEARBuilders/everything-dev#491 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation ready-for-agent
Difficoltà 3/5 1-2 giorni Idoneità per principianti 54/100
NEARBuilders/everything-dev#490 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di NEARBuilders/everything-dev
Issue simili
-
area:editor bug issue-form:bug P0 platform:windows review: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
1lck/Lithe-IDEA#1388 ·
I maintainer di solito rispondono entro 1 giorno
-
fix(api): isToolAuditEnabled swallows database read errors on auditToolOperations without loggingApertaarea: backend bug priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
snapotter-hq/SnapOtter#3238 ·
I maintainer di solito rispondono entro 1 giorno
-
rig up --plan times out after 5 s and reports an UNKNOWN outcome while the daemon completes the planAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
filesystem: search_files does not expand non-wildcard excludePatterns like directory_tree doesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
modelcontextprotocol/servers#5216 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno