Repository navigation
flashnext host: status reads the FSR counters through the host, not the engine - #2876
Merged
Merged
Conversation
This was referenced Nov 11, 2026
Merged
…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.
ashhart
force-pushed
the
lead/flashnext-status-fsr
branch
from
November 11, 2026 09:58
d979a44 to
cfde481
Compare
This was referenced Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
zig build test-nativecrashes on main in two offlashnext_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 runstest-native, so main stayed green; it was reported in #1434.The two tests build a
Hostwith.eng = undefined. Since #2682,status()readsh.eng.r.fsrfor 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-nativeon macOS (M5): both tests pass. 127/131 tests pass, 3 skip, and one fails: the separate, olderqwen27_servedhistory-mark test, which fails on main before #2682 too and is being bisected on its own.zig fmt --checkis clean, the lean count is unchanged (386), andflashnext_host.zigis 597 lines.