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

zat.dev/zlay

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

0
0
78 lines · 3.4 KB Raw History

operator reply 2026-06-12 — shutdown-GPF core symbolized: third door, but your mechanism

ran your exact gdb triage against the kept core (core.zlay.1781157122.1040178, b49a95a binary extracted from buildah storage to /var/crash/zlay-b49a95a). the answer is neither of your two decision branches — but it confirms the mechanism of your leading suspect (live backend threads racing glibc exit-time teardown).

crashing thread (verbatim)

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007d2a302b150f in __GI_____strtold_l_internal (nptr=<optimized out>,
    endptr=0x0, group=<optimized out>, loc=<optimized out>)
    at ../stdlib/strtod_l.c:1093
#1  0x00007d2a249c3250 in ?? ()
#2  0x00007d23990aa6c0 in ?? ()
#3  0x0000000000000001 in ?? ()
rip  0x7d2a302b150f  <__GI_____strtold_l_internal+4287>
  • not free/_int_free → not an allocator double-free
  • not __call_tls_dtors/_IO_cleanup/pthread_* → not the exit machinery crashing on its own
  • it's a worker thread doing live parsing work — locale-aware string-to-float (strtold_l, note the loc= argument) — faulting at full speed. the unwind above frame 0 is garbage, consistent with the thread's surroundings being torn down while it ran.

all-threads histogram (top frame, 2,800+ threads at death)

1947  Io.Threaded.Syscall.finish     <- idle pool threads, parked
1066  add_region                     <- glibc internal
   3  __GI___strverscmp
   2  __GI_____strtold_l_internal    <- incl. the crasher
   2  getifaddrs_internal
   1  findidx                        <- glibc locale collation internal
   1  __GI_memcpy
   1  math.rotl__anon_33657
   1  Io.Threaded.unlockStderr

reading (confirmed vs hypothesis)

confirmed:

  • all ~2,800 backend threads were alive at crash time — your "Io.Threaded backends never deinit'd" observation is visible in the core itself.
  • the fault is inside glibc locale/parse internals on a worker thread, not in zlay/zat code and not in exit machinery.

hypothesis (consistent, not proven): the 1,066-thread add_region + getifaddrs_internal + strverscmp/findidx cluster is glibc getaddrinfo/DNS machinery — i.e. at SIGTERM, host workers were mid-reconnect (likely a reconnect burst as connections dropped during teardown), grinding through DNS/locale paths, when exit-time cleanup freed shared libc state (locale data being the prime candidate given where the crasher died). one thread dereferenced it first and took the SIGSEGV (kernel logs it as a GPF).

implication: your _exit(0)-after-cleanup direction kills this class outright — no libc teardown under running threads. independently, stopping host reconnect attempts before process exit would shrink the racing population from ~1,000 to ~0, which matters if any cleanup must still run. both are your calls; the evidence supports either or both.

housekeeping

  • core + extracted binary stay in /var/crash until you say done (36 GB total — tell me when I can reclaim).
  • stall-window logs (06-11 16:15–17:40Z): unrecoverable — at prod log volume the node retains ~20 minutes of rotated pod logs and nothing upstream collects them. if the stall investigation needs log evidence, we'd need it to recur with collection in place; say the word and I'll add a lightweight log sink first.
  • canary: still zero traps, settled-RSS read coming after its first quiet day, then the collection-backfill hammer.

— operator