mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1578] STRATA_ROUTE_RESIDENT faults with illegal memory access on a two-GPU layer split (works with --pipeline-windows 0) #632
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#632
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tokyorave on GitHub (Oct 8, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1578
Environment
BUILD.json:source: local,archs: [86])--pipeline-windows 2,--kv q4_0+--kv-resident 32768, MTP draft onRepro
STRATA_ROUTE_RESIDENT=0.5(also tried1.0)."Say hi.",max_tokens: 8).What still works
Same config with
--pipeline-windows 0serves cleanly, including a full LC32 (33,561 prompt tokens / 256 gen): 92.5 tok/s, 80.2% drafts accepted — on par with our tuned baseline (91.7). So the flag itself is viable on a split; only the decode-pipeline combination faults.Analysis
Two independent halves; I fixed the first, the second needs your eye.
Half 1 (fixed locally, patch below): counter placement.
RouteResidentCfg::stats()(src/core/verify.cpp) does one process-widecudaMallocwith no device scoping. Verifier inits run per stage underOnDevice, but the 8×uint64 block lands on whichever device is current at the first init. On a split without P2P the other stage's kernels fault on it. The residency tabled_resright next to it is correctly replicated per device ingenerate.cpp— this counter was missed. You never saw it because the flag was only measured on single cards (5070, 3060).Half 2 (open): the decode pipeline. With per-device counters in place,
pipeline-windows 2still faults while0is clean. Suspects, in order:stats() + (n <= 8 ? 4 : 0)call) picks the block by host current device, not by the kernel's stream device. The pipeline's second verifiers (ver_bon CUDA0,gs.ver_bon the later card) share one stream per card — a stage-1 kernel can easily be handed the stage-0 block.ids_rewrite (id[r] = bestinroute_resident_k) interacting with the even/odd parity verifiers that share buffers.The async fault surfacing at "layer 31, then layer 0" is consistent with either — I stopped here rather than restructure the launch path blind.
Patch (half 1)
<map>is already included inverify.cpp. Bitwise behaviour on single GPU is unchanged (same bytes, one device in the map).Measurements (LC32: 33,561 prompt tokens, 256 gen, greedy)
Baseline config ("tuned baseline" above) — engine flags:
--layer-split 32 --pool-workers 15 --spec 4 --spec-min-p 0.60 --suffix-draft 6 --mtp-max-t 2 --pipeline-windows 2 --pcie-frac 0.00 --max-context 131072 --kv q4_0 --kv-resident 32768 --vram-reserve-mib 400; env:STRATA_STAGE_TRIM=1 STRATA_TSUM=1 STRATA_QFUSE=1 STRATA_LFUSE=1. All three rows use this exact base; only the flagged row/param differs.Note: ROUTE_RESIDENT changes answers by design (I did not evaluate quality beyond acc). Found with agentic assistance; all runs are real measurements on the hardware above, engine built from source with the patch.
issue was generated by AI
@tokyorave commented on GitHub (Oct 8, 2026):
Update: the fault is intermittent, not deterministic
Further testing on the same setup corrects the repro above: most requests pass
with the vector on, including a full cold LC32 prefill (33,561 tokens, 0 reused:
366 tok/s in, 94.8 tok/s out, MTP 52/61). Short probes, 4K–32K sweeps and 512-token
decodes all pass most of the time. The
never rangpair (layer 31unspecified launch failure, then layer 0illegal memory access) appearsrarely — 2–3 times over an evening of heavy testing.
What the failures have in common so far:
graphs are still being captured. The last one followed this sequence:
capturing the 1-token window (49 MiB of VRAM free)… down tocapturing the 4-token window (31 MiB of VRAM free), then the fault.request fails (a retry succeeds). So this reads as a poisoned window/graph,
not a dead context.
--vram-reserve-mib400/500/700/900,prompt size (4K–33K pass; small prompts failed twice), decode length.
Local patch status (8 added lines, on top of 0.1.41): per-device route-resident
counter blocks (the single shared block was allocated without a device context,
unreachable without P2P), the shared residency table pinned to the first card,
and a checked allocation with a null fallback. The rare fault persists with the
patch, so the root cause is deeper — possibly in the capture-time interaction
of the second (odd-window) verifier pair with the split.
STRATA_VERIFY_TRACE=1is now on; I will attach the handshake trace from the next occurrence here.
issue was generated by AI
@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.