#1 [high] Change: what PR #736 does, size, files
PR #736 (open, head 500b7746, base main, 11 files +601/−25) is byte-for-byte the same size and file list as closed PR #735 (+601/−25, same 11 files). Files:
- helios/src/cuda.rs (+5):
Stream::with_contextwrapper aroundDriver::with_context(cuda.rs:1128). - helios/src/scheduler.rs (+2): new field
reclaimed_snapshot_pages: Vec<u32>(scheduler.rs:669, init :772). - helios/src/scheduler/cache_memory.rs (+42): push in
release_snapshotwhenpage_snapshot_refs[page]hits 0 (cache_memory.rs:822-835, push at :831);take_reclaimed_snapshot_pages(:837-846); new test :2856+. - helios/src/execution/transport.rs (+128):
zero: StreaminResources(:573),enqueue_zero_kv_pages(:1357),sync_zero_kv_pages(:1379),zero_kv_pages(:1386),coalesce_page_runs(:1442-1465),enqueue_zero_cache_pages(:1467-1505), zero stream drained inclose(). - helios/src/execution/threaded.rs (+66): per-cache-owning-peer
peer_zeros: Vec<(CacheGeometry, Stream)>,zero_kv_pages(:1217), forget-on-poison teardown. - helios/src/execution/parallel.rs (+100): new tag
ZERO_KV_PAGES/ZEROED_KV_PAGES(wire.rs:27-28),zero_kv_pages(:288),apply_peer_messagerefactor (:99-146) extracted frompoll()so READY/COMPLETE still processed while waiting for ZEROED replies;serve_rankhandler (:747). - helios/src/execution/ranks.rs (+14): dispatch to Local/Parallel/Threaded.
- helios/src/server/runtime.rs (+49):
Worker::zero_reclaimed_kv_pages(:1788),admitbecomes#[cfg(test)]andadmit_with_executor(Option<&mut RankExecutor>)added (:1796-1804), flush points inrun()(:1618, 1622, 1624, 1626), end of admit (:1857), end of plan/publish path (:2161), insubmitafterreserve_and_packbeforeexecutor.submit(:3219), and insideadmit_with_host_storeright beforestore.fetch(:3998-4001); new closure paramzero_kv_pages: impl FnMut(&[u32]) -> Result<()>(:3859). - helios/src/server/runtime/phase_tests.rs (+149): new test asserting zero-before-fetch ordering and that zero error suppresses fetch.
Undeclared/notable behavioural details beyond the description:
zero_kv_pagesfor TP is synchronous: rank zero sends to peers, zeroes locally, then blocks waiting forZEROED_KV_PAGESper peer with the 120sTIMEOUTand a per-peer deadline (parallel.rs:288-330); any error poisons the whole executor (self.poison = Some).- In
a..._with_host_store, taking the page list beforefetchbut afteradmit_planned_with_checkpoint_accountingmutates scheduler state; a failed zero returns Err from admission, which the description says is intentional (fatal worker error). Stream::with_contextalso wrapped aroundsynchronize()calls in threaded local/peer paths, so a save/restore of the CUDA context happens on the worker hot path when the coordinator thread has a different current context.- The description claims zeroing happens "never during steady-state KV page allocation or reuse between requests", but the queue is global and drained by the worker loop at 6 different points, so any snapshot release on any path (cancel, preemption, eviction, publish) triggers zeroing.
- phase_tests:12317 etc. rely on
scheduler.share_snapshot_pagesalias ranges set up manually.
Patch is a single commit (500b7746, author ebfio, date 2026-12-04), no CI checks configured (orientation packet: "no checks"), 0 reviews, 0 comments.
#2 [high] Related work: #181 (closed draft) is the same fix by a different mechanism
PR #181 "Clear released snapshot-alias pages before their first KV use" by mark-yong (CONTRIBUTOR), opened 2026-11-03, closed 2026-11-15 without merge, +353/−53, 18 files, labels area:caching, area:memory, model:qwen3.8-27b, triage:verify-for-closure; "Fixes #116".
Mechanism: scheduler marks a page when its last alias is released; when commit first moves a marked page from a request reservation into its KV pages, the submission carries the page id and the mark clears. Every executor zeroes listed pages with cuMemsetD8Async on the model stream, after input copies and before the step's graph. TP PREPARE frames carry the list to every rank (handshake layout 7), peers validate before READY. Explicit rationale in its description: "Pages are not cleared at release, where inbound host restores could still be writing, or at reservation, which may be returned unused."
That is the exact design point PR #736 reverses: #736 clears at release (inside release_snapshot queue) and adds an explicit zero-before-store.fetch barrier (runtime.rs:3998-4001) to cover the inbound-restore race #181 avoided by construction. #736 also clears before executor.submit (runtime.rs:3219) rather than inside the submission, and adds dedicated NON_BLOCKING streams instead of the model stream.
Same files touched by both: helios/src/cuda.rs, execution/parallel.rs, execution/parallel/tests.rs, execution/parallel/wire.rs, execution/ranks.rs, execution/threaded.rs, execution/transport.rs, scheduler.rs, scheduler/cache_memory.rs, server/runtime.rs — 10 of 11 files overlap. #181 additionally rewrote helios/src/runtime_package/cache_memory.rs and docs; #736 instead touches server/runtime/phase_tests.rs.
Note: #181's file list uses runtime_package/ naming that no longer exists on main (runtime_core/), i.e. the code moved underneath it.
Discussion on #181 (per read_item #181): 2026-11-05 original-el8 says the need for scheduler-level page clearing "should be re-established after the attention masking fixes"; FlashInfer PRs local-inference-lab/flashinfer#73 and #74 fix leading-window and MSA tail masking; labelled triage:verify-for-closure. 2026-11-08 refresh: main 86c217a0 pins FlashInfer 07c41f32 which contains window-lower-bound masking in attention/paged_decode/_kernel.py and MSA visible-extent checks, so the older triage note no longer applies; still wants the remaining DeepSeek/SM121 repro repeated. 2026-11-13 merge conflicts in helios/src/scheduler.rs. 2026-11-15 mark-yong "Closing this PR". So #181 was abandoned for staleness, not because the bug was disproven.
#3 [high] Why: issue #116 (open, P1, triage:partial) is the underlying bug report
Issue #116 (open, P1, labels area:caching, area:kernels, bug, model:deepseek-v4.1, model:qwen3.8-27b, triage:partial) by shadowpa0327, opened 2026-10-27, last updated 2026-11-19, 8 comments. Title: "Released snapshot aliases hand KV pages back with stale row bytes; masked attention turns them into NaN (device error 6 under KV pressure)".
Mechanism in the issue matches #736's premise exactly: snapshot rows borrow KV page bytes; when the last owner releases a snapshot, release_snapshot returns pages to the free list without clearing; a request receiving such a page as its partly filled tail page keeps old row bytes past its last token; masked positions still contribute 0 × NaN = NaN to P·V; target logits non-finite; commit reports INVALID_SPECULATION (device error 6).
Environment: DGX Spark GB10 (SM121), single GPU, CUDA 13.0, Qwen3.8-27B-NVFP4 qwen38_dense defaults, FP8 KV, adaptive MTP verification, Flare ca1f960e; code unchanged on main at 6256cf08.
Evidence in #116: "Released alias pages zeroed before reuse | no failures in 143 of 143 prompts. Default memory also passes 143 of 143, where it failed at prompt 67 before". Zeroing-on latency unchanged: 8k N=1..32 27.6/50.4/93.0/159/242/305 tok/s vs 28.2/49.0/92.8/154/244/308 tok/s without. The author's tested implementation was a single-GPU fork branch (shadowpa0327/flare-local-inference@b83d347a) using a global page list and pinned-zero H2D copies, explicitly not covering the multi-process TP executor, and referenced as reference not patch. Issue's three proposed fixes: (1) zero pages leaving alias use, (2) clear only dead tail, (3) make masked positions inert in kernels.
Data points in comments: fahrenhe1t 2026-11-03 RTX PRO 6000 Blackwell SM120 + DFlash2, 32 mid-stream device error 6 failures over ~15 min agentic traffic, mostly batch=1 width-8 packed rounds; mark-yong 2026-11-04 poison-test matrix on SM120 FlashInfer 3c2729e7 saying all SM120 kernels he tested mask K correctly but four kernels leak masked V/MLA rows into P·V (b12x paged_decode #201, paged_tma #202, selected-block prefill #203, sparse_mla #204) and explicitly "Not covered: SM121 and SM103 paths" and "CUDA graph replay; all runs were eager"; jwnand 2026-11-05 DeepSeek-V4.1-Flash GB10 SM121 TP4 4x DGX Spark failure too; yatesdr and mark-yong 2026-11-19 discussing scripts and speculation.py:412-428 / :674-703.
Significance for #736: #116 is the single linked report of the bug in-repo, it is labelled triage:partial (not closed), it was reproduced on SM121 (GB10) and SM120, and the kernel-level fixes proposed there (flashinfer P·V masking) are the competing remedy. #736 targets SM103 (GB300/GB10*? actually CC 10.3) which #116's poison matrix explicitly did not cover.
#4 [high] Related work: kernel-masking fixes (#14, #201, #202) are the competing remedy, SM103 never covered
Same-class bug was already fixed in kernel/masking space for SM120, and project triage preferred that route. Chain (all closed, all explicitly "SM121 and SM103 not exercised"):
- #14 (closed, area:kernels, bug, model:qwen3.8-27b, triage:verify-for-closure) by Maxrio9, 2026-10-22: paged-attention decode propagates NaNs from unused V-cache tails on SM120; native repro 11/72 requests fail with status code 1 (invalid distribution) with prefix-cache reuse; fixed by local-inference-lab/flashinfer#43 merged into FlashInfer 1f8ed8a3; re-exported package gives 72/72. Comment by original-el8: "Existing packages embed the old kernels, so they need a re-export."
- #201 (closed) b12x paged_decode V rows past cache_seqlens; closed as fixed by FlashInfer 1f8ed8a3 + flashinfer#73 (ae3494d3). original-el8: "SM121 and SM103 were not exercised."
- #202 (closed) SM120 FP8 TMA paged prefill (paged_tma) V rows past length reach P·V; explicitly posed the "Decision needed" question: FlashInfer relaxes the finite-padding contract or "Flare enforces the contract: guarantee finite bytes in every slot... at every cache lifecycle boundary (release, snapshot-alias handoff, restore). #181 is the current form of this for released alias pages." Closed 2026-11-05 after 1f8ed8a3 made the repro clean 87/87 rows; mark-yong's conclusion: "Flare does not need to enforce finite bytes in unused slots for this path."
- #203/#204 (closed) further b12x kernel leaks.
Consequence for #736: the project's own precedent (#202's decision, #181/#116 triage notes) was that the finite-padding contract would be met in the kernels, not by clearing cache pages in Helios. #736's own isolation matrix shows that on SM103 the trtllm FP8 FMHA path still lets masked V tail bytes reach P·V (B_v_nan: 100% NaN across every backend/mode/window/seq_len, inf 0) — i.e. the SM103 kernel has not received the masking fix SM120 got, and #736 works around it at the cache layer instead. Nothing in the repo issues/pulls reports an SM103 kernel fix in flight (search for "SM103" + V-cache tail returns only #735/#736).
Corollary advantage of #736's approach: it is scheduler/runtime-side, so it applies to already-exported cores without re-export (contrast #14's comment that kernel fixes require re-export).
#5 [high] Change: things the description does not say
Verified from diff + head commit 500b7746 (single commit, author ebfio, 2026-12-04):
- A new CUDA stream is created unconditionally for every
GraphExecutorat construction (transport.rs:626 let zero = Stream::open(...), stored at:720,Resources.zero:573) and drained inclose()— even for cores with no snapshot aliasing. One extraCU_STREAM_NON_BLOCKINGper rank per process regardless of feature use. - TP zeroing is synchronous and blocks the coordinator:
TensorParallelExecutor::zero_kv_pagessends ZERO_KV_PAGES to every peer withnonblocking(false), zeroes locally, then blocks inpeer.channel.wait(false)per peer with a per-peerTIMEOUT(120 s) deadline (parallel.rs:288-330); any error setsself.poisonfor the whole executor. - Threaded (single-process TP) zeroing synchronizes every peer stream after enqueue (
threaded.rs:1235-1245) and holdsWatchdogCallGuard::enter(&self.watchdog_state, !self.pending.is_empty())(:1227), so a snapshot release can stall the coordinator loop mid-frame. - Rank control protocol gains two message tags with no version/layout bump:
ZERO_KV_PAGES = 14,ZEROED_KV_PAGES = 15(parallel/wire.rs:27-28); an old peer rank would hit=> return Err(invalid("unexpected rank command"))(parallel.rs:752). Page-id payload capped atMAX_PACKET64 MiB (wire.rs:500-509). coalesce_page_runstreats an out-of-range page id as a fatal error (transport.rs:1442-1463: "reclaimed KV page {page} exceeds cache page capacity {capacity}"), which then poisons the executor — a scheduler bookkeeping bug becomes a fatal worker error.- Construction ordering dependency: peer zero streams are opened before rank zero's
GraphExecutorspecifically so rank zero's CUDA context stays current on the coordinator thread (threaded.rs:873-880comment). - Teardown asymmetry: clean
close()drains + clearspeer_zeros; poisoned teardownstd::mem::forget(std::mem::take(&mut self.peer_zeros))socuStreamDestroy_v2is never called on a wedged context (threaded.rs:1297-1308). Worker::admitis now#[cfg(test)]-only and delegates to the newadmit_with_executor(Option<&mut RankExecutor>)(runtime.rs:1796-1804);admit_with_host_storegained a closure parametermut zero_kv_pages: impl FnMut(&[u32]) -> Result<()>(runtime.rs:3859), a fairly invasive signature change for a single caller.GraphExecutor::zero_kv_pagesreturns silently when the manifest has no cache geometry (transport.rs:1366-1369 Ok(false)), andThreadedExecutorskips peer sync for caches with emptyplanes.
#6 [high] Claims and evidence: 4 CPU tests verified; GPU path and SM103 numbers unbacked in-repo
Claims vs backing (no CI checks exist on head 500b7746; verified from the PR text and repo state): Backed:
- 4 new CPU unit tests exist exactly as named:
release_snapshot_records_only_reclaimed_pages_and_drains(cache_memory.rs:2856-2883, checks refcount 1→0 queueing, shared page not queued, drain-once),coalesce_page_runs_sorts_dedups_merges_and_bounds_checks(transport.rs:2163-2180),zero_kv_pages_wire_roundtrip_and_truncation(parallel/tests.rs:837-854, includes 3-byte truncation rejection and a real channel roundtrip),admit_with_host_store_zeros_reclaimed_snapshot_pages_before_fetch(phase_tests.rs:12250-12396, asserts event order["zero","fetch"], that the inbound ticket reused a reclaimed page in 4..16, and that an injected zero error yields["zero"]withstore.inner.fetchedempty). - The claim that zeroing runs only for VMM-aliased snapshot pages holds structurally:
release_snapshotonly queues whensnapshot_pages.get(id)isSome(cache_memory.rs:824), andsnapshot_pagesis empty unless the core declares alias ranges (share_snapshot_pagesat cache_memory.rs:272; called from runtime.rs:1082 with the core'scache.snapshot_pages). Not backed by anything in the repo: - No GPU/CUDA test for the actual memset path. All four new tests are CPU-only (
CUDA_VISIBLE_DEVICES=""per the description), and no#[ignore]d CUDA test or cuda_* harness was added — contrast #181, which shipped a hardware VMM-alias CUDA test on RTX PRO 6000 (SM120). Soenqueue_zero_cache_pages(transport.rs:1467-1505), real cross-plane memset, and per-peer context switching are unexecuted by repository tests. - The SM103 isolation matrix (A_zero/B_k_nan/B_v_nan/B_kv_nan/C_bf16_bytes, 8,215,432 poison NaNs vs 0 control) and the 75/75 + 152/152 GB300 soak numbers come from the author's own hardware and scripts that are not in the PR or repo; the description itself states they "were not re-run for this submission" and come from one GB300.
- The ~27 µs overhead figure is an arithmetic estimate (≈212 MiB / 8 TB/s), not a measurement: no timing instrumentation or benchmark is added anywhere in the diff.
- The "802 passed, 0 failed, 10 ignored" figure is a filtered lib run (
-- cuda:: scheduler:: execution:: server::runtime::); the description honestly discloses that fullcargo test --libhas 6 failures from a missingFLARE_TEST_TEMPLATE_DIRfixture (python tests/frontend/prepare_templates.py) both before and after the patch, and that feature-matrix warning counts (5/7/2) match clean main. git apply/cargo checkclaims cannot be checked here; orientation packet shows no CI configured, so nothing independently confirms the compile matrix.
#7 [high] People: author ebfio (first-time contributor, SM103/GB300 operator); no engagement on #735 or #736
Author ebfio, GitHub association FIRST_TIME_CONTRIBUTOR; 0 merged PRs in 180 days, 1 closed PR, 4 open PRs/issues:
- #735 (closed, pr) — the same patch, opened 2026-12-05 01:33 and closed 2026-12-05 01:37 (4 minutes later, by the author), 0 comments, 0 reviews. #736 was opened the same day with identical title/body/size (+601/−25, same 11 files) and head moved from f45ab4d to 500b7746. So #736 is a re-open of #735; nothing on either records why.
- #698 (open, pr) "Open host prefix store before RankExecutor::new()" — Autobot review round 2 recommended Close because merged #709 already landed the identical reorder +
close_storehelper on main; explicitly credits @ebfio's GB300cuModuleLoadDatadeadlock diagnosis (labelled bug, duplicate, performance, triage:superseded). - #701 (open, issue) "helios/selene: --lossless-kv-compression gpu (GKV1) shares rank.execution_context() Green Context — 6.9–12.4 MB/s encode, ~100x decode collapse, and B>=2 hang on SM103" — P1 SM103 issue filed from the same GB300.
- #699 (open, pr) "Avoid double-counting preallocated /dev/shm selene-manager regions against Linux MemAvailable".
- #682 (open, pr) "docs(preparation): document logind RemoveIPC risk for unattended exports". Pattern: an SM103/GB300 operator submitting targeted bug fixes against helios memory/startup paths, with substantive but self-reported hardware evidence; the one prior PR that reached review was superseded by maintainer work, with credit recorded. Sign-off line "Discord: ebfio" on each.
Who normally works these areas (commit counts last 180 days, helios/src): Luke Alonso (249), Martin Vit (52), yatesdr (52). The touched files' recent owners: transport.rs — lukealonso (#645 prefill scheduling/two-frame pipelining, #613 deferred_prefill/shared_pages/teardown, #507, #430); scheduler/cache_memory.rs — lukealonso (#595 TLA+ invariant + retain_snapshot cache wipe + DispatchRing race, #568), original-el8 (#473 KV plane granule padding + two-row snapshot selection), yatesdr (#674 snapshot packing, #346, #354), FujitsuPolycom (#309); server/runtime.rs — jcartu (#621, #691, #692, #705), lukealonso (#709, #711, #729), yatesdr (#663, #694).
Engagement on this PR: none. pr_comments returned "No comments"; orientation packet: "Reviews: none yet", "CI on the head commit: no checks". Closed #735 also had 0 comments. No reactions anywhere.
#14 [high] Connection: #735→#736 is a 4-minute close/reopen of the identical patch; #116 link missing
#735 vs #736 — same patch, two records. The public record therefore contains the identical description twice:
- #735: opened 2026-12-05 01:33, closed 2026-12-05 01:37 (4 min), head f45ab4d, 0 comments/reviews, "closed" (not merged). Nothing says why.
- #736: opened 2026-12-05, head 500b7746, same branch name
fix/zero-reclaimed-snapshot-kv-pages, same 11 files, same +601/−25, same body verbatim including the "Submitting agent verification commands" block and "Validation limits". Practical consequence for a reader: the head moved from f45ab4d to 500b7746 between the two, so the four-minute close/reopen may have been a rebase onto be4092d7 (the description names be4092d7 as the clean-apply base while #735's parent was presumably older). No diff review can tell the two apart from the metadata alone; anything learned about #735 (e.g. a review or triage label) would apply to #736 — and #735 has none.
Also worth recording: the PR never links #116, the only open issue describing this exact root cause (P1, triage:partial, 8 comments, reproductions on SM121 GB10 and SM120). #116's own proposed fix #1 is this change, and its "what fixes it" A/B ("Released alias pages zeroed before reuse | no failures in 143 of 143 prompts") was measured with a single-GPU implementation that #116's author explicitly says "doesn't cover the multi-process tensor-parallel executor". #736's contribution beyond #116's experiment is precisely the multi-executor + TP-wire + host-restore-ordering coverage.
#15 [high] Research summary
I prepared the case file for PR #736 (open, head 500b7746, 11 files +601/−25) with 14 scratchpad entries covering every angle.
What the change does, verified from the diff: it adds a reclaimed-page queue to RequestScheduler (scheduler.rs:669, pushed at cache_memory.rs:831 when page_snapshot_refs drops to 0, drained via take_reclaimed_snapshot_pages :844), a dedicated CU_STREAM_NON_BLOCKING zero stream per GraphExecutor and per cache-owning peer in ThreadedExecutor, coalesced cuMemsetD8Async over cache planes, new ZERO_KV_PAGES/ZEROED_KV_PAGES rank wire tags, and six flush points in Worker's loop plus a zero-before-store.fetch barrier in admit_with_host_store (runtime.rs:3998-4001).
Highest-value findings a reader could not get from the description:
- #735 and #736 are the same patch. #735 was opened 2026-12-05 01:33 and closed 01:37 (head f45ab4d, no comment), and #736 re-opens the identical body and file set at 500b7746. #735 has 0 comments/reviews; #736 has 0 comments, 0 reviews and no CI checks.
- The PR never links #116, the open P1 (
triage:partial) issue that reports exactly this root cause with an A/B where "released alias pages zeroed before reuse" passes 143/143 prompts and zeroing-on latency is unchanged. #116's tested implementation was single-GPU and explicitly did not cover the multi-process TP executor — which is precisely what #736 adds. - #181 (closed, draft, by mark-yong) was the same fix and is unreferenced. It cleared page ids carried in PREPARE frames at first commit, on the model stream, and its description states the design rule "Pages are not cleared at release, where inbound host restores could still be writing" — the exact choice #736 reverses (release-time queueing plus an explicit pre-
fetchbarrier). 10 of 11 files overlap. - Project precedent pointed at the kernel, not the cache. #14 → #201 → #202/#203/#204 were closed as fixed by FlashInfer masking commits (1f8ed8a3, flashinfer#73), and #202's "Decision needed" section exists to settle whether Flare should guarantee finite padding bytes; it closed with "Flare does not need to enforce finite bytes in unused slots for this path." #736's own matrix (B_v_nan 100% NaN, 0 Inf) shows SM103 still lacks that masking; no SM103 kernel fix is filed anywhere in the repo.
- Undeclared behaviour: the
zerostream is created for every executor including cores with no aliasing (transport.rs:626); TP zeroing is synchronous and blocks rank zero on each peer with a 120 s deadline, poisoning the executor on any error (parallel.rs:288-330); an out-of-range reclaimed page id is fatal (transport.rs:1442-1463); poisoned teardownmem::forgets peer streams;Worker::admitbecomes#[cfg(test)]-only. - Evidence split: all four new tests exist and are CPU-only — no GPU/CUDA test was added, unlike #181. The SM103 isolation matrix, 75/75 and 152/152 GB300 soak numbers, and the ~27 µs figure (≈212 MiB ÷ 8 TB/s arithmetic) rest on the author's own hardware and are not re-run ("were not re-run for this submission", one GB300). The PR honestly discloses that full
cargo test --libhas 6 pre-existing fixture failures. - Reach/conflict: all three executor topologies and cross-node TP peers must implement the new tags (an unpatched peer fails with "unexpected rank command"); no operator-visible surface or docs change; the six flush insertions sit inside the loop body that open PR #705 rewrites, and nine other open PRs touch
server/runtime.rs/transport.rs. Pool-tier fetches go through the sameHostStorebut have no dedicated zero barrier likestore.fetchdoes. - People/process: author ebfio is a FIRST_TIME_CONTRIBUTOR with 0 merged and 4 open PRs plus 1 superseded (#698, whose Autobot review credited their GB300 diagnosis). Area owners are lukealonso (249 commits), Martin Vit (52), yatesdr (52). No community engagement of any kind. The body contains an agent-generated patch-pack apply/verify block (material, not followed).
#16 [high] Why: six-week, three-hardware-class, four-reporter history behind one PR
Timeline (how long wanted, how widely):
- 2026-10-22: #14 (closed) reports the same NaN-in-V-tail symptom on SM120 via b12x paged fallback, and notes "Native packages are exposed because continuation snapshot rows alias physical KV backing (helios/src/runtime_package/cache_memory.rs), so reused pages can hold non-KV bytes. In random bytes, roughly 2/256 decode as E4M3 NaN."
- 2026-10-27: #116 opened (P1) naming the scheduler-level root cause (
release_snapshotreturns pages unscrubbed) and stating "This may also explain #61. That issue fails the same way (verification rejects the row, then the commit reports INVALID_SPECULATION), and its failing target column sits in a newly granted page." - 2026-11-03: #181 (draft fix PR) opened against it; the same day fahrenhe1t adds an SM120/DFlash2 data point (32 failures in ~15 min agentic traffic); 2026-11-05 jwnand adds a GB10/SM121 TP4 DeepSeek-V4.1 data point (4x DGX Spark, RoCE ring).
- 2026-11-04: mark-yong's poison matrix narrows it to V (not K) in P·V, across SM120 kernels.
- 2026-11-05..15: project triage redirects to FlashInfer masking (#201/#202 closed as fixed; #181 marked triage:verify-for-closure, hit merge conflicts, closed unmerged 2026-11-15). #116 stays open with triage:partial.
- 2026-12-05: #735 then #736 submitted for SM103 (GB300, CC 10.3). So: reported ~6 weeks before this PR, on three hardware classes (SM120, SM121/GB10, SM103/GB300), by four independent reporters, at P1, with the one prior code fix abandoned rather than refuted. Reach of the bug: prefix-cache/agentic workloads that fill the KV pool — "long multi-turn and agent workloads, the ones the prefix cache is for" (#116).
#8 [medium] Project fit: charter #210/#397/#404/#267 vs the change; docs untouched
Charter (read_charter) relevant lines, as facts:
- "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over main on a served workload (#210). Bug fixes need to address the root cause; don't just swallow, skip, or retry an unexplained error (#397)." — #736 is presented as a bug fix for a diagnosed root cause (stale bytes surviving snapshot release) and adds an explicit zero-before-restore barrier rather than swallowing an error, which lines up. Its ~27 µs overhead is an estimate, not a speedup claim.
- "Keep the runtime small and model-agnostic. Helios ... shouldn't accumulate per-model branches (#267, #334)." — the change is in shared scheduler/executor code keyed off alias ranges and FP8-in-general, no model branch. Lines up.
- "Solve the right problem in the right place... Look for the smallest footprint in shared code, or a way to solve it without new code at all. Good ideas in the wrong place will be declined (#404)." and "GPU kernel code: ... report concrete defects only—do not propose designs for it." The competing locus of the fix is the attention kernel (#202 asked exactly this: kernel-side finite-value guarantee vs Flare-side contract enforcement), so 'right place' is a live question rather than settled.
- Goals: "Prepare supported model recipes with Ignition and serve captured CUDA graphs from Rust on SM103, SM120, and SM121." SM103 is an explicit target, so an SM103-only cast of the same bug is in scope.
- "Bug fixes need to address the root cause; don't just swallow, skip, or retry an unexplained error" — note the countervailing in-repo precedent: #202's resolution was to fix the contract in FlashInfer and state "Flare does not need to enforce finite bytes in unused slots for this path", i.e. page clearing was framed (in #181's triage) as a "broad page-clearing workaround".
Documentation: docs/runtime-core-design.md:942-951 qualifies native/DCP startup and says "GPU tests preserve snapshot bytes while released KV pages are overwritten. These checks do not constitute model-quality evaluation." — the design doc documents released-KV-page overwrite but says nothing about snapshot-backed pages being zeroed after release; #736 does not update any doc (docs/runtime-core-design.md and docs/prefix-cache-offload.md are untouched, while #181 did touch docs/runtime-package-design.md).
Also docs/runtime-core-design.md:1011-1014 documents flare_snapshot_backing_pages / flare_free_snapshots semantics that this change leaves intact; no new metric or config key is added.
helios/src/runtime_core/cache_memory.rs:2110 — "Zero each physical byte once, before any graph or transfer can read an alias" is the existing startup-time zeroing; #736 adds a second, release-time zeroing pass. That invariant comment is the documented premise the bug breaks.
docs/core-design.md:3 and docs/cli-design.md:6 confirm SM87/SM103/SM120/SM121 as supported targets.
#9 [medium] Reach/evidence: the race barrier covers store.fetch but pool-tier fetches go through the same HostStore
Code verification of the design's safety argument (from source, not a code review of style):
- The description says the ordering is race-free versus Selene's async host-to-GPU DMA because
admit_with_host_storezeroes beforestore.fetch(hit, ticket)(runtime.rs:3998-4005). Verified structurally:take_reclaimed_snapshot_pages()+zero_kv_pagesoccur immediately beforestore.fetch, and the new test asserts the["zero","fetch"]order (phase_tests.rs:12386-12390). Whatfetchdoes is enqueue (selene/src/memory.rs:4202-4204 →fetch_chain), so ordering of enqueue is respected, which is what the description claims. - The safety comment in
enqueue_zero_cache_pages(transport.rs:1493-1496) justifies the write as "all reclaimed pages were retired past their last GPU fence beforerelease_snapshotfreed them, and no new kernel or host restore has been submitted against them yet". The first half is the substantive claim:release_snapshotis only reached viaapply_completion/release_snapshotcall sites that follow retirement. Worth noting that #181's author rejected clearing at release precisely because "inbound host restores could still be writing" then; #736 accepts that and compensates with the pre-fetchbarrier plus flushes at 6 worker-loop points. - The
zerostream isCU_STREAM_NON_BLOCKINGwith the same default priority as model/copy streams (Stream::openat cuda.rs:780-794 usesSTREAM_NON_BLOCKING, no priority), so memset traffic is not deprioritized against model work;open_lowest_priorityexists (cuda.rs:807-828) but is not used here. - Coverage versus
.fetch():begin_pool_lookup/issue_pool_lookup(runtime.rs:3699-3770) issues pool lookups/fetches through the sameHostStore, and the worker flushes reclaimed pages only at the end ofadmit_with_executor(:1857) — i.e. after the admission loop has already run pool lookups for pending requests. Whether pool-tier restores can be enqueued against a page taken fromfree_pagesin the same pass is not shown to be covered by a dedicated barrier the waystore.fetchis; worth a reader's attention, since the description's race-freedom argument names onlystore.fetch. - Repeated cost: the queue is drained at 6 sites per loop iteration, and any of the ~14
release_snapshotcall sites (scheduler.rs:2011, 2055, 2172, 3078, 3102, 3136, 3188, 3240, 3412, plus checkpoints.rs:165) can populate it, so a snapshot release during a busy loop can force up to 6 synchronization points against a 120 s peer deadline each.
#10 [medium] Reach: Local/Threaded/Parallel executors and cross-node peers; no operator surface; conflicts with open runtime.rs PRs
Reach in code (who/what is touched):
- Every serving topology must implement
zero_kv_pages:RankExecutorInner::Local | Parallel | Threaded(ranks.rs:87-97), so single-process TP (ThreadedExecutor), multi-process/multi-node TP (TensorParallelExecutor +serve_rank), and single-rank cores are all affected. Cross-node TP peers must speak the new protocol tags, so mixing a patched rank zero with an unpatched peer rank fails atunexpected rank command. GraphExecutor::newallocates the extrazerostream for every core, including cores with no alias ranges (transport.rs:626), and drains it inclose()/Drop— a small always-on resource/VMM change rather than a conditional one.- Operators: no new CLI flag, config key, Prometheus metric, wire format for request/response, or on-disk format. No doc update. Existing exported cores work unmodified (unlike the FlashInfer-kernel route, which requires re-export per #14's comment).
- Configuration that activates the path: only cores whose
CacheGeometry.snapshot_pagesis non-empty (wired at runtime.rs:1082 viascheduler.share_snapshot_pages). Pure-KV cores and cores with no continuation aliasing never enqueue a page, so they pay for the stream only. - Failure semantics change: an out-of-range reclaimed page id, a peer timeout (120 s), or a peer reply mismatch sets
TensorParallelExecutor::poison/ThreadedExecutor::poison(parallel.rs:326-330, threaded.rs:1253-1256) — the whole executor becomes unusable, which the description frames as intended ("fatal worker error rather than ... per-request admission rejection"), but it upgrades a scheduler/cache bookkeeping inconsistency into a serving-wide failure. - Compatibility with the PRs in flight: #705 (open, jcartu) rewrites
Worker::service_storeand the outcome match in the same file/loop; #715 (open, original-el8), #718 (open, fakoli), #483 (open), #576, #548, #549, #554, #334, #301 all touchhelios/src/server/runtime.rs; #554 and #334 touchexecution/transport.rs. #736's 6 flush insertions inWorker::runsit directly in the loop body #705 changes, so a merge-order conflict is likely. - Feature gating: the new API is
#[cfg(feature = "server")](parallel.rs:287, threaded.rs:1216, ranks.rs:90,201) andwire::encode_page_ids/decode_page_idsare#[cfg(any(feature = "server", test))](wire.rs:501,515) — so the change is inert under--features runtime-corealone.
#11 [medium] Process: ready-for-review, no CI checks, no reviews, no issue link, agent-generated patch
Process facts:
- #736 open, described as "ready for review", opened and last updated 2026-12-05 (same day as #735's open/close), base main, head 500b7746 (single commit "fix(helios): zero reclaimed VMM-aliased snapshot KV pages before reuse", author ebfio, dated 2026-12-04). 11 files, +601/−25.
- CI: "no checks" on the head commit (orientation packet). No reviews, no comments, no labels, no linked issue — the PR does not say "Fixes #116", although #116 is the open P1 report of exactly this bug, and the closed sibling #181 carried "Fixes #116".
- Description includes the charter-expected four parts (why, what changed, claimed result, evidence) plus an unusually explicit "Validation limits" section volunteering that the full
cargo test --libstill has 6 pre-existing fixture failures and that the feature-matrix warning counts match main. - The description also contains a "Submitting agent verification commands" block referencing a generated patch pack ("/01-hyperflare-inference-zero-reclaimed-snapshot-kv-pages/01-...patch"), i.e. the patch was produced by an external agent/packaging workflow and then re-applied to a checkout; the bash block is instructions to a human/agent runner, not a record of executed output. Same pattern as #698 ("Submission validation" + "Suggested test command").
- Branch name for both #735 and #736: fix/zero-reclaimed-snapshot-kv-pages. #735 head f45ab4d, #736 head 500b774.
- No prompts/injection attempts found in the PR body or (absent) comments. The description does contain instructions ("Submitting agent verification commands", a clone-and-apply recipe) addressed to whoever runs the checks — noted as content to treat as material, not as instructions to follow.
- Age: <1 day at time of review.
#12 [medium] Related work: #674, #621, #659, #729, #705 and other runtime.rs PRs
Adjacent items checked and judged not directly competing, with reasons:
- #674 (merged, yatesdr) "improve prefix-cache hit rate, L1 retention, NVMe throughput, and GPU snapshot packing": rewrote
scheduler/cache_memory.rssnapshot packing and addedrow_restore_latency; #736's description cites the samerow_restore_latency/admit_with_host_storearea and #736 is built on top of the post-#674 tree (main includes def91796). Not overlapping in intent: #674 packs snapshots tighter; #736 scrubs pages after release. - #621 (merged, jcartu) "Validate scheduler admission against the core parameter declarations": touched admission in the same function family (
admit_with_host_store,scheduler/cache_memory.rs); #736 builds on the post-#621admit_with_host_storeshape (it threads a new closure through it). No conflict beyond signature. - #659 (merged, lukealonso) "alias null continuation row zero onto a single zeroed VMM granule": same VMM-alias mechanism and same "zero once, before any graph or transfer can read an alias" invariant (
runtime_core/cache_memory.rs:2110), but it is a startup allocation optimisation for null row zero. It increases reliance on the same assumption #736 is patching (that alias bytes are zeroed before use), so the two are complementary; #659 changesruntime_core/, which #736 does not touch. - #549 (open, WynnD) "Report KV pages held by active requests", #548/#560 (metrics), #718 (prefill-only KV handoff), #715 (packed multi-request prefill), #576 (thread pinning), #483 (Gemma 4 image prep), #554/#334 (Engram RDMA): touch
server/runtime.rs/execution/transport.rsbut on unrelated features; only merge-conflict risk. - #703 (open issue) helios/selene CPU retry storm under DRAM prefix-cache spill saturation, and #705 (open PR) fixing it: both rewrite
service_store, which #736 now callszero_reclaimed_kv_pagesaround (runtime.rs:1623-1624). Real conflict surface in the same loop body, unrelated root cause. - #729 (merged, lukealonso) "preserve KV across grammar transitions, fix KV codec batching/locking, stratify Mixed graph costs": touches
server/runtime.rsandsnapshot_backing_pages; adds KV preservation across grammar transitions, i.e. more snapshot reuse — plausibly increases exposure to the bug #736 fixes, but no stated link. - #517 (closed issue) Xid 31 in
_checkpoint_pageson Qwen3.8 Flash Next TP4/SM120 — mentioned from #201's referrers; different failure (fault address past the last legal snapshot row), not the same defect.
#13 [medium] Recent activity: main moved (#723/#729) after the PR base; no prior landing of this fix
Recent activity in the touched areas (default branch, last 60 days, per orientation packet + module history):
- cfb72093 (2026-12-04, Luke Alonso) "helios,heliopause,selene,ignition: fleet-wide 2-way codec green contexts, R580/VMM fallbacks, packed dedup, graph SM bounds, and ScratchArena reserve_sms floor (#723)" — the tip of main at the time #736 was prepared (500b7746's parent chain: cfb72093 ← 6efbd126 ← be4092d7). Mentioned
helios/src/cuda.rsDriver::with_contextbehaviour (context save/restore) which #736'sStream::with_contextwraps; #723 is where the "R580/VMM fallbacks" and green-context work landed, i.e. the same CUDA-context discipline #736 relies on. - 6efbd126 (2026-12-04, Luke Alonso) "helios: preserve KV across grammar transitions, fix KV codec batching/locking, and stratify Mixed graph costs (#729)".
- be4092d7 (2026-12-05, Joshua Cartu) "#691 reused prompt tokens" — the commit the PR description names as its clean-apply base ("Clean upstream apply & feature-matrix compile (be4092d7...)").
- dbe61dd4 (#692 jcartu) "count output-layer stream failures under requests_failed_total"; 624c6e43 (#621 jcartu) admission validation; these are the
server/runtime.rsneighbours. - Orientation packet: "Commits on the default branch since this pull request branched (cfb7209), touching its changed files: none" — so #736 currently applies cleanly with no upstream drift, but it is built on a base (be4092d7) that is one merge behind main (cfb72093/#723 landed after).
- The change does not build on any single predecessor PR; it is additive to the scheduler's alias-refcount machinery, which was shaped by #473 (original-el8, KV plane granule padding + two-row snapshot selection), #346 (yatesdr, prefix-sum alias costs), #595 (lukealonso, retain_snapshot cache wipe / TLA+ invariants), and #674 (yatesdr, snapshot packing). Nothing in that series reverses or is reversed by #736 except the abandoned #181.
- The
WatchdogCallGuardAPI #736 uses inThreadedExecutor::zero_kv_pages(threaded.rs:1227) is pre-existing; #430/#645 added the watchdog/green-context machinery. - No commit in the last 60 days touches the zeroing/clearing of released snapshot pages, i.e. the bug #116/#181 describe has been open without a landed code fix on main.
#17 [medium] Community: nothing found (no comments, reviews, labels, reactions, or maintainer engagement)
Community angle — explicitly nothing found: pr_comments on #736 returns "No comments." The orientation packet records "Reviews: none yet" and "CI on the head commit: no checks". Closed sibling #735 also has 0 comments/reviews (read_item #735: "Discussion (0)"). No labels on #736 (no area:/triage: label, unlike merged helios PRs such as #659 which carried area:memory, performance, triage:validation). No reactions anywhere. No maintainer (lukealonso / original-el8 / yatesdr / jcartu) has engaged. For contrast, the neighbouring #705 (jcartu) drew three Autobot review rounds within two days and #659 drew an Autobot review plus author follow-ups — so the absence of any engagement on #736 is a factual gap in the record, not a signal of judgement.
Also nothing found for: no documentation update anywhere in the diff (docs/ untouched), no new tests other than the four listed, no changelog entry, no feature flag or config key, no dependency or pin change, no wire-format version bump beyond the two new u8 tags, no metric added, and no evidence of prompt-injection content beyond the patch-pack apply instructions in the body.