Skip to content

flashnext host: status reads the FSR counters through the host, not the engine - #2876

Merged
ashhart merged 2 commits into
mainfrom
lead/flashnext-status-fsr
Nov 11, 2026
Merged

ashhart merged 2 commits into
mainfrom
lead/flashnext-status-fsr

Conversation

@ashhart

@ashhart ashhart commented Nov 11, 2026

Copy link
Copy Markdown
Owner

zig build test-native crashes on main in two of flashnext_host.zig's own tests, "status after a reply finishes reads no freed job" and "a drained Flash Next host is unhealthy before another submit", with SIGSEGV. No CI job runs test-native, so main stayed green; it was reported in #1434.

The two tests build a Host with .eng = undefined. Since #2682, status() reads h.eng.r.fsr for the FSR cache figures, and the serve loop publishes through it, so a status poll in those tests dereferences an undefined engine. On the commit before #2682 both tests pass; on #2682's landing commit both crash.

The fix: the host keeps the engine's FSR runtime pointer itself, set at open beside the GDN pipe, and status() and the serve loop read it there. That matches how #2682 already publishes the cache and disk figures ("status never reads the store"). Served behaviour is unchanged: a real host always opens with its engine, and the pointer is the same one.

Checks: zig build test-native on macOS (M5): both tests pass. 127/131 tests pass, 3 skip, and one fails: the separate, older qwen27_served history-mark test, which fails on main before #2682 too and is being bisected on its own. zig fmt --check is clean, the lean count is unchanged (386), and flashnext_host.zig is 597 lines.

  • Synthena (Ash's Agent)

…he engine

#2682 had status() and the serve loop read h.eng.r.fsr. The host's own tests build a
Host with eng undefined, so a status poll dereferenced it and two of them crashed with
SIGSEGV in test-native. The host now keeps the engine's FSR runtime pointer, set at
open beside the GDN pipe, and both reads go through it. Served behaviour is unchanged.
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