Skip to content

fix(proxy): overload manager back to fixed_heap; default memory limit 512Mi - #139

Merged
bpalermo merged 2 commits into
mainfrom
fix/overload-fixed-heap
Jun 11, 2026
Merged

bpalermo merged 2 commits into
mainfrom
fix/overload-fixed-heap

Conversation

@bpalermo

@bpalermo bpalermo commented Jun 11, 2026 •

Copy link
Copy Markdown
Owner

Incident

Deploying #138 (rev 64, ~12:50Z) took the entire data plane down for ~13 minutes: every proxy aborted at bootstrap with No supported cgroup memory implementation found and crash-looped. Recovered at rev 65 by disabling the overload manager via values (--set proxy.overload.enabled=false — ConfigMap-only, picked up on the next crash retry).

Root cause (config bug)

cgroup_memory reads /sys/fs/cgroup/memory.{current,max}. Under docker — where the pre-merge validation ran — containers get a private cgroup namespace, so the path is the container's own leaf cgroup and the monitor works. The aether-proxy DaemonSet is a privileged pod, which gets the host cgroup namespace: /sys/fs/cgroup is the host root cgroup, which has no memory.max. Envoy treats the failed probe as fatal at bootstrap. The docker validation was a false positive about the runtime environment, not the config.

Root cause (blast radius — the more important lesson)

The outage was cluster-wide instead of canaried: supervisors watch the bootstrap config (fsnotify) and hot-restarted every node simultaneously into the poisoned ConfigMap, bypassing the DaemonSet rollout safety entirely. Old pods didn't survive to keep serving — their own in-place hot restarts crashed them.

Planned follow-up hardening (separate PR): the supervisor pre-validates a changed bootstrap with envoy --mode validate on the node before forking the new epoch, and keeps the old config serving (+ logs/metric) on failure. Node-local validation would have caught this — the same probe fails in the same environment — converting a cluster-wide outage into a no-op with alarms.

This PR

  • Monitor back to fixed_heap (tcmalloc-internal — no cgroup access, environment-independent validation); ConfigMap comment documents exactly why cgroup_memory must not be reintroduced while the proxy is privileged (revisit if the proxy drops privileged or gains a private cgroupns).
  • Default proxy memory limit lowered 1Gi → 512Mi (request == limit, Guaranteed): steady-state RSS is 67–148Mi post-fix(agent): bound idle connections and per-connection buffers #136, so 512Mi keeps ~3.5× headroom, halves the node reservation, and engages the overload ladder earlier on a real leak. Heap budget scales with it: maxHeapSizeBytes 384Mi = 75% of the limit (top rung 0.98×384 ≈ 376Mi + non-heap extras stays under the cgroup kill line).
  • Ladder, thresholds, and the health-gateway bypass_overload_manager unchanged.
  • Rendered bootstrap re-validated against the pinned image (configuration OK); chart tests pass.

Cluster is currently at rev 65 (#138 chart, overload disabled). Merging this re-enables the overload manager safely on the next deploy.

🤖 Generated with Claude Code

bpalermo and others added 2 commits June 11, 2026 10:06
…tal in privileged pods

Deploying #138 (rev 64) took the entire data plane down for ~13 minutes:
every proxy aborted at bootstrap with "No supported cgroup memory
implementation found" and crash-looped until the overload manager was
disabled via values (rev 65).

Root cause: the cgroup_memory monitor reads
/sys/fs/cgroup/memory.{current,max}. That works under docker — private
cgroup namespace, the container sees its own leaf cgroup, which is where
the pre-merge validation passed — but the aether-proxy DaemonSet is a
PRIVILEGED pod and gets the HOST cgroup namespace: /sys/fs/cgroup is the
host root cgroup, which has no memory.max. Envoy treats the failed probe
as a fatal bootstrap error.

The outage was cluster-wide rather than canaried because the supervisors
watch the bootstrap config (fsnotify) and hot-restarted every node into
the poisoned ConfigMap at once, bypassing the DaemonSet rollout safety
entirely. A follow-up hardening (supervisor pre-validates new bootstrap
config with `envoy --mode validate` on the node before hot-restarting,
keeping the old config serving on failure) is planned separately — node-
local validation WOULD have caught this, unlike the docker-side check.

fixed_heap is tcmalloc-internal (no cgroup access), so its validation is
environment-independent. The 768Mi = 75%-of-limit budget and its
rationale are restored, and the ConfigMap now documents exactly why
cgroup_memory must not be reintroduced while the proxy is privileged.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Steady-state proxy RSS measured 67-148Mi post-#136 (e2e 2026-06-11), so
512Mi keeps ~3.5x headroom while halving the node memory reservation
(request == limit, Guaranteed) and engaging the overload ladder earlier
on a real leak. Heap budget scales with it: 384Mi = 75% of the limit
(top rung 0.98x384 ~= 376Mi + non-heap extras stays under the cgroup
kill line).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@bpalermo bpalermo changed the title fix(proxy): overload manager back to fixed_heap — cgroup_memory is fatal in privileged pods fix(proxy): overload manager back to fixed_heap; default memory limit 512Mi Jun 11, 2026
@bpalermo
bpalermo merged commit c25d376 into main Jun 11, 2026
9 checks passed
@bpalermo
bpalermo deleted the fix/overload-fixed-heap branch June 11, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant