mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4073] [Engine] Ordinary batch: checkpoint-copy OOM after graph-cache growth in v0.2.3.1 #1770
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#1770
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 @gyroid-eth on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4073
Related (closed): #997. The observed failure here is in a later checkpoint-copy operation, after graph-instantiation OOM recovery had already occurred.
What happened
An eight-slot, two-GPU server stopped during asynchronous multi-turn agent traffic. It had logged repeated graph-instantiation OOM recoveries, but subsequently failed while saving a conversation checkpoint. Expected behavior was continued serving with bounded resource use; the instantiate-on-OOM recovery did not protect this later CUDA operation.
Smallest steps or command that reproduce it
This describes one locally observed incident, not a deterministic minimal reproducer:
Area
[Engine] — server and native engine.
Desktop app, Terminal or source?
Source checkout for serving; the original failure used Qwen engine 0.1.48. Patch validation used an isolated native build from the same source revision.
Reproduction status
Reproduced locally: one observed failure. A repeatable minimal reproducer has not yet been established. Source analysis and patched-run observations are separated below.
Strata version
Strata v0.2.3.1, commit
7ddc17a38fe7f31637e895ecfba58c2cd43d65ec; Qwen engine 0.1.48.Graphics card, memory and system
Model, size and settings
Qwen3.8-Flash-Next UD-Q4_K_XL, native pack, int8 KV, solo MTP/spec4, batch-MTP disabled. A steering projection affecting 41 layers was enabled in the original and patched configurations.
Relevant resolved settings:
The resolved layer split was 23, with one serial batch group. Expert caches were 12.82 + 9.89 GiB; native free VRAM after loading was 749 / 817 MiB.
Logs
Final native errors:
Before the failure, there were 13 graph-instantiation OOM recovery messages, reporting 55–57 layout entries kept. There were 126 batch-capture log lines across both stages and 63 distinct slot-row lists. These are log observations, not a direct count of live CUDA graph objects.
Peak sampled NVML memory use was 24,122 / 24,126 MiB. Host MemAvailable remained above 109 GiB, swap was unused, and the saved kernel log contained no Xid, AER or OS-OOM entry.
Source findings at the tested commit
set_batch_graph_limit(64)is conditional on batch-MTP. Ordinary batch retains the default zero limit.Graph pressure is directly observed; its precise causal contribution to the final copy failure is not isolated.
Local patch and validation
Inspired by the bounded-cache proposal in #997, a small local patch wires the existing synchronized LRU limit into both first-stage and downstream-stage verifiers for ordinary batch as well as batch-MTP. Kernels and cache keys are unchanged.
The local patch adds
STRATA_BATCH_GRAPHS: default 16 layouts per verifier, integer range 0–256, with 0 meaning unbounded; invalid input falls back to 16 with a diagnostic. At the limit, a new layout evicts the least recently used graph pair before capture. The budget counts layouts, not bytes; it does not bound other CUDA allocations. The tested settings were 8 and 16.The isolated CUDA 13 / sm_86 build succeeded. CPU parser/LRU checks with CUDA calls stubbed also passed; those checks are separate from GPU validation. One initial replay stopped because its fixture truncated an expected JSON response; that failed attempt was preserved and excluded from the results below. A separate corrected replay used each cap once:
Both runs continued beyond cap eviction on both GPUs; neither invoked graph-instantiation OOM recovery or recorded a native error. Each GPU's NVML p95 and maximum were unchanged across the final two complete five-minute bins. Completed-token throughput was 65.85 / 69.17 tokens/s, respectively, but response lengths and realized histories differed, and run order was fixed. This is not a causal performance comparison.
Both patched runs also used
STRATA_HANDOFF_PIPE=2andSTRATA_HANDOFF_PIPE_WORKER=1; the inherited environment of the original failed process was not saved, so it cannot be confirmed as identical. The persistent-worker contribution has not been measured separately. These warm replays do not establish long-term stability or coverage of long cold-prefill periodic checkpoints.Subsequent normal-service observation
On 2026-10-25, 16:35–17:28 JST (07:35–08:28 UTC), the cap-8 build was run as the normal service with the same eight-slot configuration, reserve values and persistent-worker settings above. The saved observation covers approximately 53 minutes of service uptime, including idle time, rather than 53 minutes of continuous load.
This included an eight-agent file-reading/code-inspection/report-writing workload from 17:02:32 to 17:24:41 JST. Agents were stopped in sequence after crossing an observed 9K output-token budget, so this was not a full 30-minute load or eight simultaneous decoders throughout. The final saved service observation recorded 131 cap evictions per GPU, zero graph-instantiation OOM recoveries and zero native errors, with the service still running. Sampled peak NVML use in the workload/termination-confirmation window was 23,596 / 23,540 MiB. These are cumulative service counters and a bounded observation period, not proof of long-term stability or task completion.
As a separate observational comparison, over equal 18m51s windows before the first budget stop, same-engine-clock admitted→reading medians were 21.42 seconds with the earlier four-slot configuration and 0.0165 seconds with this eight-slot configuration. The earlier cohort had 86 observations out of 96 requests, five deadline-censored and five with no reading endpoint; the later cohort had 117/117 observations. Multiple settings and realized histories differed, so this cannot be attributed to the graph cap or slot count alone. Here, admitted denotes management admission, not completed slot acquisition.
Question
Would applying a configurable budget through the existing LRU to the ordinary batch path be an appropriate upstream fix to investigate? The local default of 16 was a test choice, not a proposal to change the upstream default without review. Is there also a preferred way to retain headroom for checkpoint-copy and other CUDA operations that occur outside graph-instantiation OOM recovery?
@Niko1221 commented on GitHub (Nov 5, 2026):
Thanks for taking the time to report this.
Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.