carlos / platform Public

Flagship US: carlos-instance-control OOM-killed (MemoryMax=64M) during a four-host HA take; 6 x 503 on a customer app open

Incident 2026-11-19, v0.40.1 flagship window (release session ae1750d9; full stop report on #421). US move 2 drained i-08f388e2 (still v0.40.0). The already-rolled member i-0ec920b3 (v0.40.1, t4g.medium) took the four drained hosts at once (cherry-clover-45-ha, g3r-ha, held-1, held-2). At 20:38:59Z the kernel OOM-killed carlos-instance-control inside its own cgroup (CONSTRAINTMEMCG, oommemcg=/system.slice/carlos-instance-control.service; killed pid total-vm 1.3 GB, anon-rss 18 MB). The takes failed with 'start unit: instance control socket /run/carlos-control/control.sock: Post ...'. systemd restarted it, and the next take started all four at 20:39:11-12Z. Impact: cherry-clover-45-ha 6 x 503 (20:38:57-20:39:08Z) and one unacknowledged POST; four UNCLEAN markers (txid=0) on the failed takes, then CLEAN; 40 x 503 on held-1/held-2 in the probe. The verb refused move 2 and returned the member. Paul's decision: cancel-drain only, stop the window. The console, apt, seeds, US re-pin and member 2 wait. Unit file: internal/host/units/carlos-instance-control.service MemoryMax=64M, unchanged since c15a7b8e (the edge fence #990 added nft work in v0.35.3). Earlier four-host takes on these members passed (v0.39.1 window, PPv2 replacements, v0.40.0 window), so it's a margin problem, not a cliff. Next: measure instance control's peak memory during a multi-host start (it and its children, nft among them, share the cgroup), size MemoryMax with headroom, and check whether v0.40.x (the generations build) added memory on the start path. Owner: platform-fd (cf231fa) unless someone closer takes it.

Cause, from the code (investigation 2026-11-19; the tmpfs idea was wrong, since /run/carlos-control/exe holds only symlinks): every root registry read starts a fresh /opt/carlos/carlos _registry-child (openServiceRegistryReadOnly, registrychildunix.go) inside the control unit's cgroup. A generation start makes at least two such reads (HostApp in stagedexe.go and the whole-registry list in Egress.AssertStart), and nothing limits how many overlap. At roughly 10-17 MB per child plus a ~20 MB main process, four overlapping starts reach 60-68 MB against MemoryMax=64M. Nothing on that path changed in v0.40.x. Mitigation at ~21:45Z with Paul's OK: a runtime MemoryMax=256M on both flagship US members (peaks had already reached 38.8 and 44.8 MB) and both dev IE members (see #421). Fix in progress on branch instance-control-memory-1291: the unit at 256M, and claimunit.go's two literal 'MemoryMax=64M' replacements made robust (one silently drops the demo build workers' 1 GiB / GOMEMLIMIT if it misses). Follow-up still open: bound the children themselves, with one read-only registry child per start shared by HostApp and the egress list, or a small concurrency cap.