Repository navigation
fix(sandbox): free idle compute, bound helpers, admit by memory and disk - #4098
Conversation
|
Independent review of PR #4098 at
MEDIUM: the memory guard runs on every local Docker spawner, but the docs say an explicit
LOW
INFO
Checked and correct:
Repairs go through the manager. I'll re-review the next exact head. |
ec0b477 to
7b4bd0b
Compare
|
Independent re-review of PR #4098 at
MEDIUM 1 (previous): an explicit
MEDIUM 2 (new): a waiter whose re-ask is slow loses its first-come place [source, re-read by me; the timing is not reproduced].
LOW / INFO [source, review agent; re-read by me where marked]
Disposition of the previous review
Checked and correct
Repairs go through the manager. I'll re-review the next exact head together with #4099. |
7b4bd0b to
85851d1
Compare
The session sweep only stopped a session after the full 30 min idle window or its 24 h lifetime, so warm containers held capacity long after their work was done, and three kinds of compute were never freed at all: - a released session (its turn or run settled, nothing holds it) now stops once idle for SANDBOX_SESSION_RELEASED_IDLE_MS (5 min by default), through runnerd's claim so a turn that acquires it meanwhile keeps it; Docker-in- sandbox agent sessions keep the full window, as their resume re-pulls; - a running session whose runnerd has not answered five sweeps in a row is stopped instead of holding its slot until the TTL; - containers that exited or died outside the spawner (a host reboot, an OOM-killed init) and Failed Pods are removed, fenced to their incarnation, with their workspace kept; on Docker they had pinned the inner image volume. The sweep probes at most eight daemons at a time and a pass still running is joined rather than stacked. At capacity each create reclaims a released session of its own, idle-longest first, so a burst is admitted at once instead of one per retry. The build-cache reconcile after adoption runs beside the API and only for agent sessions, and a caller that hangs up on an exec or attach no longer costs a backend liveness check. Every sweep stop is fenced to the incarnation it judged.
Creates polled runnerd every 500 ms and inspected the container on every miss, though runnerd answers ~0.3 s after docker run: readiness is now polled every 100 ms with the exit check every fifth miss. Removing a session's inner Docker volume ignored the command's exit status, so a refused or timed-out removal left a multi-GB image store with nothing logged.
Every live exec and attach stream holds one fetch to its runnerd for its whole life, and Bun runs at most 256 fetches at once by default (measured in the spawner image): past that, health probes, creates and cancels queued behind the streams until they timed out. The image now sets BUN_CONFIG_MAX_HTTP_REQUESTS=1024.
The GC rule meant to keep the per-organization BuildKit cache under 20 GB capped nothing: BuildKit reads keepBytes as reservedSpace, a floor it never reclaims below, and the rule's 7-day keepDuration shielded every younger record from its space limit. Measured on v0.33.1, a cache over the limit was never pruned, so it held everything built in a week, per organization, on the disk every session shares. Two rules now apply in order: cache mounts, build contexts and git checkouts unused for two days go, then everything else least recently used first until the cache is under 20 GB and the disk keeps a tenth free (verified to prune an over-cap cache about a minute after a build). A guard holds the shipped file to that shape, and the spawner's test task now hashes the files it reads from the BuildKit and runtime workspaces.
An organization's privileged builder and its three registry mirrors ran with no memory, CPU, process or log limits, although every build's RUN steps execute in the builder, outside the cgroup of the session that asked for them: one organization's parallel builds could take the host, and under memory pressure the kernel killed sessions (OOM score 500) before the builder (0). The builder now runs under one agent session's limits, each mirror under 512 MB and one CPU, all at the sessions' OOM score with capped logs. The idle sweep stopped at the first organization whose helpers it could not judge or stop, so one wedged builder kept every later organization's helpers running; each organization's failure is now logged and retried on its own. Only agent sessions count as using the helpers: a crawler render or script session kept them running for nothing.
Every session Pod requested a flat 500m CPU and 1 GiB, about 17 times an idle session's ~60 MB and a CPU share it never used, so the scheduler capped each node's sessions far below what it could hold. A Pod now requests its profile's typical working set (agent 250m / 512Mi, 1Gi with Docker inside, crawler render 100m / 256Mi), overridable for every Pod with SANDBOX_K8S_CPU_REQUEST / SANDBOX_K8S_MEMORY_REQUEST and never above the limit (an agent memory below 1Gi used to make the apiserver refuse every create). A crawler render, created for one batch and never resumed, gets a sized emptyDir instead of a provisioned 4Gi claim per batch. fsGroupChangePolicy OnRootMismatch stops the kubelet from re-chowning a whole workspace on every resume, and the transparent-egress sidecar carries resources so a namespace ResourceQuota admits the Pod.
When a node drain, PodGC or a manual delete removed a session Pod, its Secret stayed behind, and every later create or resume of the session failed with a 409 on the Secret name, forever, until the workspace itself was destroyed. A Pod-less Secret older than a whole create's budget, which no create of a peer replica can still be making, is now removed by its UID and the create retried once. A Pod create that timed out client-side but was stored anyway met its own Pod on the retry, took it for a peer's and deleted the Secret that Pod needed, leaving it stuck in CreateContainerConfigError. A 409 on the Pod whose creation stamp is this create's own now carries on to the readiness wait.
Admission counted sessions only, against a fixed default of 8, while a session's memory limit is a ceiling rather than a reservation: an idle session uses ~60 MB and an agent turn a few hundred. A large host ran far below what it could hold, and raising the count on any host risked overcommitting it until the OOM killer picked sessions. Where the spawner can read the Docker host's memory (the local socket, and the same kernel and total as the daemon reports), a create is admitted only while the host keeps SANDBOX_MIN_FREE_MEMORY free (a tenth of it, at least 1 GiB), with every create still starting counted at its planned working set. Short of it, the create reclaims a released idle session, then answers 429 host_memory. The decision is taken under the admission lock from a reading at most a second old, so a burst sees each create admitted before it, and the id is still reserved at once for a sibling acquire. Unset, SANDBOX_MAX_SESSIONS is sized from that memory at boot (one session per 768 MiB beyond the reserve, 8 to 256); Kubernetes, remote daemons and devices keep 8 or their explicit value.
Every docker call is a forked CLI process of ~28 MB and a dozen threads, with nothing bounding how many run at once, inside a spawner capped at 512 MB and 512 pids: a burst of creates at a raised session capacity could exhaust it and fail creates mid-way. At most 12 run at once now and the rest wait their turn, and the spawner's caps are 1 GB and 1024 pids in compose.yml and the CLI generator alike.
Every session's public traffic goes through one tinyproxy whose MaxClients was 100 for the whole fleet: a handful of parallel package installs or page loads saturated it. It now accepts 1000. tinyproxy runs a thread (~50 KB, measured) per connection and threads count against the pids limit, so the egress container's pids cap is 2048, and compose.yml now carries the same caps as the CLI generator.
Admission decided on the last host-memory reading whatever its age: the first create after a quiet spell could be judged on an hour-old figure. The probe now refreshes its reading every second and concurrent reads share one. A session that just started keeps part of its planned working set reserved for 90 seconds, decaying linearly, since MemAvailable shows only its idle footprint while its turn grows; a destroyed session gives its share back at once. Auto capacity sizes a slot at a whole Docker-in-sandbox turn where agent sessions run Docker inside, and a boot that cannot read the host's memory sizes it at a later sweep instead of staying at 8 for the process lifetime; a Docker CLI that could not answer is asked again within 30 s rather than ten minutes. The docs no longer promise that admission stops sessions already running from growing.
After a host reboot every session container has ended, and adoption removed them one by one before the spawner served any request, /health included. The removal now runs in the background with the sweep's concurrency, sharing the stop handles so a create or a destroy still waits for it. A sweep that cannot probe a session's runnerd (it is pinned, or an exec runs through this spawner) now starts its unreachable streak over, so an hour of working execs after four blips no longer lets one more blip stop the session.
A call waited for one of the twelve CLI slots before its timeout started, so a 5 s probe (/health, an inspect, the memory refresh) queued behind long image pulls could take minutes. The wait now comes out of the call's own budget, and a call whose time runs out in the queue answers as a timeout (exit 124) without starting a process.
Docker prints `<no value>` for a missing label through `index`, so the fenced stop of a container without `tale.created` (adopted with a stamp of 0) always failed as a changed incarnation, and the sweep, which now stops through the fence, could never remove it. `with` prints nothing.
BuildKit turns a minFreeSpace shortfall into a cut of the whole deficit from each builder's own cache. With many organizations on one disk, a disk that session workspaces filled pruned every building organization's cache to nothing, again after each build. The size rule now keeps at least 2 GB (reservedSpace) and prunes for disk space below 5% free, as BuildKit's own defaults do; measured on v0.33.1, an unmet minFreeSpace now stops at the floor instead of emptying the cache.
The builder is shared by all of an organization's agent sessions, yet was capped at one session's budget: two heavy builds at once could be OOM-killed. It now gets an agent session's CPUs and twice its memory, or SANDBOX_BUILDKITD_CPUS and SANDBOX_BUILDKITD_MEMORY. Running helpers were reused as they were, so a busy organization's builder kept the old image (and its old, non-capping cache policy) and no limits at all. Each helper now carries a stamp of its image and bounds. One with another stamp gets the bounds in place (docker update); the builder is recreated on the current image once `buildctl debug histories` shows no build under way, keeping its cache volume. Mirrors keep serving, since a recreate would cut off the pulls through them.
A render session runs Chromium from its first moment: measured in the runtime image, 170 MB with the browser up and 365 MB after five modest pages. Its Kubernetes Pod requested 256Mi and 100m, so the scheduler packed renders above their request, the first Pods the kubelet evicts under memory pressure. It now requests 512Mi and 250m, and Docker host admission plans a starting render at 512 MiB too.
A first Secret create that timed out on the client can still have been stored; its retry then met a 409, found no Pod and a Secret too young to be an orphan, and failed the create as a conflict for about four minutes. A Secret carrying this create's own creation stamp now counts as this create's, and the create goes on to its Pod, as it already does for a Pod of its own.
|
Post-merge independent reevaluation of #4098 at My earlier MEDIUMs, now on
My earlier LOWs:
New in the final head
Next owner: the manager, for follow-up issues: the explicit-capacity override (root's guidance), the waiter line, and the disk-relief pause. They are on |
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
An attach stream that runnerd has answered counts as an exec running through the spawner, so a turn the platform follows by attach keeps its session busy: the sweep skips its health probe and stops no session that streams. An attach runnerd never answers still proves nothing. Exec and attach streams share one cleanup, which takes a stream's key out of the entry it registered in while the key still holds its controller, so a stream that ends while a failed destroy holds its session out leaves no key behind. A create or a reactivation refused for memory stops a released warm session only when the latest reading itself is short. A refusal made of reservations (creates in flight, the young-session reserve, waiters ahead) answers 429 host_memory and stops nothing. The EN/DE/FR references, the sandbox README and the sessions guide say so. Spans measured from wall-clock timestamps survive the clock stepping back (wall-clock.ts). Memory, disk, pressure and capacity readings, verdicts and cached answers stamped in the future are stale, and a newer read replaces an older one by the order the reads began. Reservations, places in line, heavy-phase leases and the last start that host pressure paces by count from the present, and back-offs counted from the future are over. The reclaim walk judges each back-off by the clock as its candidate comes up. A drifted build helper is recreated only when a second read of its build history, at least 3 s after the first, shows no build running and none started between them. No create waits for it: the provisioning that holds the helper has a follow-up provisioning read again 3 s later in the background. Once a helper has been held for a minute, the first read with no build under way recreates it, so a busy organization does not keep a helper that may fail its builds. The hold ends with its drift. A provisioning that finds no running helper drifted, or that starts, launches or recreates the builder, forgets it, so a later drift is confirmed anew. The follow-up queues for the organization's lock, however the work ahead of it ends, and looks at the hold only there. It provisions with a budget of its own and no create lease, so nothing is provisioned after an idle stop, the disk relief's removal or a teardown, and no teardown is refused for it. A queued Docker call whose slot comes free with less than a second left, of its own budget or of its operation's, is refused without starting the Docker CLI and hands the slot on. Its message names what was left of both budgets. The egress proxy lowers MaxClients to what its open-file limit holds, at least 1, and logs it. Each host_disk refusal is logged with the disk that refused it, its free space and its floor. The spawner's size settings also take the Kubernetes spelling (10Gi, 512Mi) and a t suffix. The gateway's memory keeps compose's spellings, because compose.yml hands it to mem_limit, which refuses 4Gi. The sandbox README records how each finding is settled, including the two accepted ones: an aborted idle prune may finish in the helper, and a remote DOCKER_HOST needs no locality check because a daemon that does not share the session root fails the workspace bind. The EN/DE/FR references, .env.example and the egress README follow. Closes #4124 Task: TALE-63
Why
The owner's report: sandboxes use a lot of resources, do not free them, and cannot run many at once. Measured first (Docker Desktop, real spawner argv): a session container is ready ~330 ms after
docker runand idles at ~20 MiB cgroup / 60 MB RSS. The container is not the heavy part, and every stronger isolation runtime (gVisor +20–50 MB, Kata +130–320 MiB) costs more per session, not less, while process sandboxes in a shared container weaken isolation between organizations. What actually wasted resources and capped parallelism was in the spawner: warm sessions held 30 min after their work, compute that was never freed at all, uncapped build helpers, a flat cap of 8 sessions, Kubernetes requests 17× the idle footprint, and shared bottlenecks (Bun's 256-fetch cap, a 100-connection egress proxy, unbounded docker CLI fan-out).Part of the sandbox resource work: the runtime half is #4097, and #4099 (platform) makes no-room starts wait.
What changes
Free what nothing uses (
session-routes.ts)SANDBOX_SESSION_RELEASED_IDLE_MS(5 min), through runnerd's claim; Docker-in-sandbox agent sessions keep the 30 min window./healthdown for N removals.docker inspect; every sweep stop is fenced to its incarnation (a missing creation label now reads as empty there, not<no value>).Bound what runs
keepBytes + keepDurationrule pruned nothing used within a week — verified on v0.33.1) and prunes further below 5% free disk, never under a 2 GB floor: each builder prunes its own cache by the whole shortfall, and without the floor a disk other data filled emptied every building organization's cache (measured: an unmet minFreeSpace now stops at the floor).SANDBOX_BUILDKITD_CPUS/SANDBOX_BUILDKITD_MEMORY), mirrors under 512 MB, at the sessions' OOM score with capped logs. Each helper carries a stamp of its image reference and bounds, and is also compared with the image its reference names now (tale deployre-tags:latestin place). One launched otherwise gets its CPU and process bounds in place (docker update; never a memory cut, which on cgroup v2 OOM-kills a running build — measured), and the builder and its mirrors are recreated on the current image and bounds oncebuildctl debug historiesshows no build running, keeping their volumes. One organization's failing helper no longer stalls the idle sweep; only agent sessions keep helpers.SANDBOX_K8S_CPU_REQUEST/_MEMORY_REQUEST), never above the limit; renders get a sizedemptyDirinstead of a PVC per batch;fsGroupChangePolicy: OnRootMismatch; sidecar resources; an orphaned Secret no longer makes a session unresumable forever; a create meeting its own stored Pod or Secret (a timed-out first attempt) goes on.Admit by what the host can hold
SANDBOX_MIN_FREE_MEMORYfree (a tenth, ≥ 1 GiB), counting starting sessions at their working set and sessions started in the last 90 s at what they are still growing into; short of it: reclaim, then 429host_memory. The reading is refreshed every second, so a create after a quiet spell is never judged on an old one. The docs say plainly that this cannot stop running sessions from growing.SANDBOX_MAX_SESSIONSis sized from host memory (8–256; a slot holds a whole Docker-in-sandbox turn where agents run Docker inside); a boot that cannot read the memory sizes it at a later sweep, and a Docker CLI that could not answer is asked again within 30 s, a host once verified keeping its verdict meanwhile.MaxClients1000 (threads, ~50 KB each, pids 2048).Hardening after a load-and-failure review
SANDBOX_BUILDKITD_IDLE_CACHE(5 GB), so stopped organizations do not each keep 20 GB.sessionExists, helper inspects, host-memory checks) get a priority lane of 4 reserved slots instead of queueing behind long pulls; a "no slot" answer is never cached as unhealthy.MaxClientscomes fromSANDBOX_EGRESS_MAX_CLIENTS(default 2000), with pids 4096 and nofile 16384 in both compose pipelines.session_quotaorhost_memory) waits in a line by session id, in the order of its first refusal; freed room goes to the oldest waiters still asking (a slot each, and memory for their planned working sets, except for a waiter the host could never fit), and each 429 carriesqueue: { position, waiting }with aretry-afterof 5 s plus 5 s a place, up to 60 s. A waiter that stops asking gives its place up; the line lives in memory (a restart starts it afresh; each Kubernetes replica has its own). fix(platform): wait for sandbox room instead of failing the run #4099 makes the platform come back when told.SANDBOX_BUILDKITD_CACHE_RETENTION(14 days;offkeeps them) and that no session may use loses its helpers, network and cache volumes, as its deletion does; its next build starts cold.statfsevery 5 s and keepsSANDBOX_MIN_FREE_DISKfree (a twentieth of the disk, 2–20 GiB;0turns it off): below it every create answers 429host_diskand waits in the first-come line (no idle session is reclaimed for it, since a stopped one keeps its workspace), and the disk going below its floor and coming back is logged once each. Meanwhile each build-cache upkeep removes the helpers and caches of organizations whose helpers are all stopped and that no session or create may use, the longest-stopped first, at most three a run and only while the disk stays short; a removal that frees nothing on that disk (the caches live on another one) pauses the removals for six hours. Docker backend only: Kubernetes workspaces are fixed-size volumes.SANDBOX_EGRESS_MAX_CLIENTSon the egress Deployment and names the node'spodPidsLimitas the bound on its threads.Load test (this machine's Docker Desktop: 12 CPUs, 7.75 GiB VM, other deployments running)
Combined runtime + spawner build, real
tale-sandbox-runtimeimage, Docker inside off:SANDBOX_MAX_SESSIONS=40: 7 admitted at once, 23 refusedhost_memoryand told their place (positions 0–12 sampled, hints 5–60 s); all 30 created within 221 s (p50 96 s), 130 attempts in all — the line paced them in order while young-session reservations decayed.sleep 300and exits: p50 134 ms; 1.5 s later 30/30 leftovers gone./healthafter 1 s and re-adopted the session still running.Behaviour changes to note
SANDBOX_MAX_SESSIONSon a local Docker host now means "sized from memory" (never below 8); set it to keep a fixed value. Kubernetes, remote daemons and devices keep 8 / their value.Verification
services/sandbox: 740 tests on currentmain(with the disk floor: admission refusing withhost_diskand admitting once space is freed, an unknown disk never refusing, the floor off at0, the probe's readings, sharing and logs, the oldest-first cache removal under pressure — never a live organization or a running helper, at most three a run, paused when a removal frees nothing; the egress entrypoint's raised limit under a 256 soft limit); earlier counts: 690 (new: sweep and adoption hygiene incl. the background ended-reap and the streak reset, memory-aware admission incl. young sessions, host-memory probe incl. refresh/shared reads/failed-judge retry/kept verdict/DinD sizing, CLI concurrency incl. the slot-wait budget, BuildKit limits/stamp/drifted-builder recreate with its mirrors/re-tagged image and per-org sweep, GC policy guard, builder bound variables, K8s requests/emptyDir/orphan Secret/own Pod/own Secret); new tests fail on the old code. Lint and typecheck clean; CLI compose tests, docs lint,lint:linksandlint:manualgreen.SANDBOX_MIN_FREE_MEMORY=7g→ 429host_memory; restart re-adopts; idle sessions ~17 MiB.buildkitd.tomlparses (reserved 2 GB, min free 5%, max 20 GB); a running build shows asSTARTEDinbuildctl debug histories. tinyproxy: 300 connections = 272 threads, 15 MiB.