~ knotless Search/
↑↓ move↵ open⇧↵ all results

zat.dev/zlay

atproto relay in zig · mirror of https://tangled.org/zat.dev/zlay

0
0
68 lines · 3.5 KB Raw History

operator final readout 2026-06-14 — canary track closed: mimalloc is the variable, musl is clean

the isolation step resolved it. the RSS growth is mimalloc, not musl. SIGILL-dead is banked permanently. recommendation: park mimalloc; musl itself is viable for the shutdown-GPF/static-binary goals if paired with a different allocator. full matrix below.

the matrix (RSS at ~2,030–2,080 hosts, same firehose load)

buildlibcallocatorRSS behaviorverdict
prodglibcglibc mallocflat 2.6 GiB, 30h+baseline
canarymuslmimalloc v2.3.2 (default)climb → 2.6 GiB+ slowfails
canarymuslmimalloc v2.3.2, PURGE_DELAY=0climb ~+300 MiB/hretention ruled out
canarymuslmimalloc v3.3.2 (default)climb → 4 GiB OOM crashloopversion not the cause
canaryglibcmimalloc v3.3.2climb → 3.4 GiB+ and risingisolates the cause

the last row is the discriminator: holding the allocator at mimalloc and swapping musl→glibc, the climb persists. holding the allocator at glibc malloc (prod), RSS is flat. the only variable that tracks the climb is mimalloc.

(this pod warm-started at full host scale off the persisted host table, so it hit 3.4 GiB in ~1h rather than the multi-hour cold ramp the earlier pods showed — faster, but the same monotonic shape and the same trajectory toward OOM. restarts=0 at time of writing; left running, but the verdict doesn't need the OOM — the climb at matched scale against flat glibc-malloc prod is the result.)

what this means

  • musl-libc: exonerated. it was never the variable. the static-musl build is sound — RocksDB compiles/links/runs clean, and (criterion #1, banked permanently) zero SIGILL across every musl pod's life at thread scale. the year-old "musl breaks RocksDB" belief is retired with evidence.
  • mimalloc: implicated. it does not return memory to the OS under zlay's ~2,800-thread-heap workload — not v2, not v3, not with immediate purge, not under glibc. your #1111 hypothesis was a good, specific call; it just turned out the v3 fix doesn't cover whatever path our thread model hits. this is consistent with mimalloc's per-thread-heap design meeting a pathological thread count, but i haven't proven the mechanism (MIMALLOC_SHOW_STATS was armed but exit-time output didn't survive the kill path; a deliberate SIGTERM read is available if you want the allocator's own accounting before fully closing this).

recommendation

park the mimalloc track. two clean futures for musl if/when it's worth revisiting, both independent of this result:

  1. static musl + a different allocator (jemalloc segfaulted on musl per your notes; tcmalloc or a tuned glibc-static are the remaining candidates) — only worth it if the static-binary/_exit story needs it.
  2. nothing — glibc prod is flat, cheap, and fine; the SIGILL finding is logged for whenever it matters.

net from the whole exercise: one false belief retired (musl/RocksDB), one allocator ruled out for our workload (mimalloc), prod untouched throughout, and the higher-priority tracks (shutdown-GPF fix, ingestion-stall) are still where the real urgency is.

housekeeping

  • canary infra (own pg pod, 2 PVCs, deployment) is still up as a repro harness. say the word and i tear it down to reclaim the node resources, or leave it for a SHOW_STATS read / future allocator trial.
  • GPF core + b49a95a binary still in /var/crash pending your GPF work.

— operator