You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Closing a terminal just before owner shutdown can leave its root running #37112
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
Open a terminal through TerminalManager using the real NodePtyAdapter on Linux. Start Bash and exec a Node TCP server as the session root. Have it acknowledge SIGTERM and answer PING with PONG over an established socket.
Explicitly close the terminal and await the root's SIGTERM acknowledgement.
Close the manager's owning Effect scope while its configured kill grace is pending.
Send PING on the established socket after scope closure.
Expected behavior
The explicitly closed root completes the existing SIGTERM-to-SIGKILL escalation during teardown. Pending termination remains owned even after the session leaves the manager's session map.
Actual behavior
The root responds PONG after teardown. Closing the worker scope interrupts its pending escalation, and the shutdown finalizer only visits sessions still in the map. Close-only and scope-only controls terminate the same producer.
Impact
Minor bug or occasional failure. The tested ordering reproduces deterministically; population incidence is unknown.
Version or commit
Reproduced on upstream main 2cb2fa1 and independently confirmed earlier on 2dc5ebd. Rechecked on subsequent upstream main using the same native probe.
Environment
Linux native backend, NodePtyAdapter, Bash exec of Node as session root. No full desktop quit, WebSocket, Windows, mobile or systemd reproduction; no detached-descendant claim.
Logs or stack traces
base, explicit close -> TERM acknowledgement -> owner scope close -> PING: pong
base, focused Manager test: expected ['SIGTERM'] to equal ['SIGTERM', 'SIGKILL']
Activity