atproto relay implementation in zig zlay.waow.tech
9
fork

Configure Feed

Select the types of activity you want to include in your feed.

tidy repo root: move notes to docs/, repro to scripts/

- NOTES.md → docs/notes.md
- repro_evented.zig → scripts/repro_evented.zig
- update references in Dockerfile, main.zig, stdlib-patches.md
- delete stale build artifacts (check_mutex.o, repro_evented binary)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

zzstoatzz ed90a1b2 3533416f

+4 -4
+1 -1
Dockerfile
··· 19 19 # then copy source and build 20 20 COPY src/ src/ 21 21 # ReleaseFast (not ReleaseSafe): Io.Uring fiber context-switch GPFs under ReleaseSafe 22 - # due to a zig 0.16-dev optimizer+safety interaction bug. See repro_evented.zig. 22 + # due to a zig 0.16-dev optimizer+safety interaction bug. See scripts/repro_evented.zig. 23 23 RUN zig build -Doptimize=ReleaseFast -Dcpu=baseline -Dtarget=x86_64-linux-gnu 24 24 25 25 FROM --platform=linux/amd64 debian:bookworm-slim
NOTES.md docs/notes.md
+2 -2
docs/stdlib-patches.md
··· 99 99 under `ReleaseSafe`, the optimizer's inlining interacts badly with Uring's 100 100 fiber context-switch machinery. the result is a general protection fault 101 101 during normal fiber yield/resume. `ReleaseFast` and `Debug` both work. 102 - `repro_evented.zig` in the repo root reproduces this — three simple fiber 102 + `scripts/repro_evented.zig` reproduces this — three simple fiber 103 103 tests (no-sleep, yield, sleep) that pass under Debug and ReleaseFast but 104 104 GPF under ReleaseSafe. 105 105 ··· 160 160 managed threads. on Evented fibers it's NULL → SIGSEGV or heap corruption. 161 161 162 162 this caused three separate crashes during the migration (crashes 1, 6, 8 in 163 - NOTES.md). the fix pattern is always the same: components that use Threaded 163 + docs/notes.md). the fix pattern is always the same: components that use Threaded 164 164 resources (mutexes initialized with `pool_io`, pg.Pool) must run on plain 165 165 `std.Thread`, not as Evented `io.concurrent()` fibers. 166 166
repro_evented.zig scripts/repro_evented.zig
+1 -1
src/main.zig
··· 54 54 // is NOT patched; subscribers resolve hostnames through pool_io (Threaded) instead. 55 55 // 56 56 // Known issue: Io.Uring GPFs under ReleaseSafe (optimizer + safety interaction). 57 - // Build with ReleaseFast. See repro_evented.zig for minimal reproduction. 57 + // Build with ReleaseFast. See scripts/repro_evented.zig for minimal reproduction. 58 58 const Backend = Io.Evented; 59 59 60 60 var backend: Backend = undefined;