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(supervisor): Docker stop takes 5s because the supervisor never reads one of its boundary control connections #5719
Observed: StopSandbox takes ~5.2 s every time. DeleteSandbox is fast (~0.2 s). The sandbox is idle.
docker events: the supervisor container gets kill signal=15 and exits with code 137 exactly 5.0 s later, with no Docker SIGKILL. Then the sandbox container gets signal=15 and exits 1 within ~20 ms.
strace of the supervisor (PID 1 of the supervisor container):
SIGTERM, then within 1 ms an exchange of TLS records with openshell-sandbox over a connection accepted on /.openshell/channel/control/supervisor/control.sock, with replies received
periodic 5 s work continues: the provider-snapshot push to the boundary, and a new connection to the gateway on port 17670
after exactly 5.000 s a futex wakeup, the supervisor closes its sockets and calls exit_group(137) itself
Stuck connection: the supervisor holds two control-socket connections to openshell-sandbox. One is drained. On the other, the supervisor’s receive queue stays at 239 bytes for the sandbox’s lifetime, with 1536 bytes queued on the boundary’s side, and strace shows no reads on that fd before or after SIGTERM:
Boundary logs: nothing shutdown-related until its own SIGTERM, then sandbox boundary received SIGTERM before supervisor confirmation.
Hypothesis: the supervisor starts the stop handshake but waits for a reply on, or depending on, the connection it never reads, so it always hits its 5 s bound. Separately, exiting with 137 makes the bounded shutdown look like a SIGKILL.
Impact / Why This Matters
A 5s delay for stopping an idle sandbox is a performance problem and adversely affects user experience/acceptance.
Acceptance Criteria
With a workload that exits promptly on TERM, or an idle sandbox, stop completes in well under a second.
Reproduction Steps
openshell sandbox create
openshell sandbox stop $SB_NAME (stop command completes only after 5s)
Activity