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(sandbox): runnerd refuses every exec into a full session even when none is running #4718
Runnerd refuses POST /execs with 429 session_memory_busy once the session's working set reaches TALE_EXEC_ADMISSION_MEMORY_PERCENT (default 90 %) of its memory limit (services/sandbox-runtime/daemon/src/main.ts:344-358, session-memory.ts:130-139). The refusal exists to protect the execs that are running — but it applies just the same when execManager.liveCount() is 0. Verified on main at 73d03a9.
A session can sit above the threshold with nothing running: containers the agent started on the session's inner Docker engine and the engine itself, tmpfs/shmem pages, and active page cache (the working set subtracts only inactive_file, so cache from a big build that is still on the active list counts until the kernel needs it). In that state every start is refused. The platform's session client retries a few times, then the lane waits for "sandbox room" and keeps asking (services/platform/backend/core/node_only/sandbox/helpers/session_client.ts:2230-2246, core/automations/agent_host.ts:1409). Each refused request also enters the activity gate with markUsed (main.ts:584, activity-gate.ts:30-33), clearing released, so a release-based reclaim cannot free the session either. The run waits out its deadline although no work in the session could ever finish and free the memory.
Suggested fix
Admit the exec when execManager.liveCount() === 0: no running exec can lose to it, and the kernel reclaims cache for the new one under the limit.
Optionally, before refusing, ask the kernel to reclaim (memory.reclaim, Linux 5.19+) and read again.
Report a full-but-idle session distinctly so the platform can recycle it instead of waiting.
Unit test with a fake cgroup root (TALE_CGROUP_ROOT) at 95 % and no live exec: the exec is admitted.
Activity
fix(sandbox): admit an exec into a full session with nothing running