[GH-ISSUE #5292] [Engine] dsv41 on sm_75 (RTX 2080 Ti, Windows): cudaStreamSynchronize "illegal memory access" on a short follow-up prefill; prefill stalls forever with --ssd-cache #3155

Open
opened 2026-11-07 14:38:31 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @smirnovdmitrij87-byte on GitHub (Nov 5, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5292

[Engine] dsv41 on sm_75 (RTX 2080 Ti): cudaStreamSynchronize "illegal memory access" on a short follow-up prefill; prefill sometimes stalls indefinitely

Area: engine prompt processing

Summary

Running the DeepSeek-V4.1-Flash pack (dsv41, IQ2 pack) on a single RTX 2080 Ti (Turing, sm_75),
Windows, engine 0.1.56 (build ffa80d731), MTP/dspark enabled, the engine crashed twice inside a
28-minute continuous multi-turn session with:

cudaStreamSynchronize(s): an illegal memory access was encountered

Each time this happened on a short follow-up request (3.5k and 8.0k prompt tokens) right after the
previous turn had completed normally. The wrapper detected the dead engine and restarted it
automatically, which is what kept the session going — but 2 of 25 turns were lost.

Separately (same session, before the crash): a 59,451-token prompt was processed successfully, and a
110,292-token prompt was still reading normally when the client cancelled it (see "Context length is
not the trigger" below).

There is also a second symptom, a prefill stall rather than a crash: with --ssd-cache set the
engine hangs on the very first 33-token prompt and never finishes (details at the end).

Environment

item value
OS Windows 11
GPU NVIDIA GeForce RTX 2080 Ti, 22 GiB VRAM (modified), sm_75
Driver 617.42 (CUDA UMD 13.4)
CPU AMD EPYC 7D12, 32 cores / 64 threads
Host RAM 128 GB
Engine build strata-dsv41 0.1.56 build ffa80d731 (Windows x64)
Model DeepSeek-V4.1-Flash, IQ2 pack (pack_iq2), expert-profile.bin
API port 1236, /health, /v1/chat/completions

Engine launch args (verbatim, as read from the process command line):

--pack <pack_iq2>
--max-context 131072
--expert-profile <expert-profile.bin>
--experts 6
--cpu-threads 32
--vram-experts 0.95
--reserve-mib 1024
--dspark on
--dspark-conf 0.65

Note on --reserve-mib: this was raised from 256 to 1024 during this investigation. With 256 the
engine died differently — emb_upload(...): unknown error / cudaMemsetAsync(...): unknown error on a
50,594-token prompt, after which every subsequent request failed until a manual restart. With 1024 the
unknown error family disappeared completely (verified: 59k and 110k prompts OK, no unknown error in
the log after that restart). The illegal memory access below is a different failure that appeared
only afterwards, during the continuous session.

Symptom 1 — illegal memory access on a short follow-up (the crash)

Failure is always on a short prompt, immediately after a previously successful turn:

# prompt tokens of failing request what happened
1 3,513 previous turn finished normally (380 tokens, 34 s, stop), then the next request died in 8 s
2 7,980 (7,699 requested + reuse) previous turn finished normally (215 tokens, stop), then the prefill stalled ~240 s and ended with the fatal error

Log excerpt from crash #1 (turn N finished cleanly, the very next prefill died):

[strata] done: 380 tokens in 34 s (12.9 tok/s) (stop, cancel=False)
[strata] thinking capped at 300 of max_tokens 600 to leave room for the answer (budget 32768)
[strata] the GPU reported a fatal error and the engine ended: cudaStreamSynchronize(s): an illegal memory access was encountered.
[strata] done: 0 tokens in 8 s (no speed) (error, cancel=False)
[strata] the GPU reported a fatal error (...); the engine ended (exit code None) and is started again; the request that was running failed and can be sent again (1 of 3 allowed in 10 minutes)
[strata] the engine had stopped (exit code None); starting it again (a minute or two) ...
[strata] the engine is running again

Log excerpt from crash #2 (prefill of 7,980 tokens never advances, then the fatal error):

[strata] reading the prompt: 7,980 tokens, 10 s so far
[strata] reading the prompt: 7,980 tokens, 20 s so far
... (identical line every ~10 s, token counter stuck at 7,980) ...
[strata] reading the prompt: 7,980 tokens, 235 s so far
[strata] the GPU reported a fatal error and the engine ended: cudaStreamSynchronize(s): an illegal memory access was encountered.
[strata] done: 0 tokens in 240 s (no speed) (error, cancel=False)

The stall-then-crash pattern is consistent: reading the prompt: X tokens, N s so far repeats with
X frozen for many minutes and then the synchronize reports the illegal access. In crash #2 that frozen
line repeats 23 times before the error.

Context length is not the trigger

To separate this from the usual VRAM-pressure reports, a single-shot test was run against the same
engine:

  • 59,451-token prompt → completed, answer returned, no error
  • 110,292-token prompt → prefill progressed normally (client cancelled it, engine stayed healthy)
  • probe immediately after the 59k request → 2.2 s, healthy

So long prompts are fine on this box. The crash correlates with many sequential turns on the same
engine instance
, not with prompt size.

Reproduction sketch

  1. Start dsv41 with the args above, --dspark on, --max-context 131072.
  2. Send sequential chat turns where the conversation history grows each time (a realistic agent loop:
    system prompt + growing history + a fresh tool result every turn), max_tokens ~600.
  3. Turns completed normally until turn 9 (prompt 3,513) — that request died with the illegal access.
  4. Wrapper auto-restarted the engine; turns 10–24 were fine (prompt 3,914 → 7,699).
  5. Turn 25 (prompt 7,980) stalled and died the same way.

Result: 23/25 turns OK, 2 crashes, 28.2 minutes total. Throughput ~12.9 tok/s on the turns that worked.

Not a hardware fault (for the record)

The card was checked at the time of the failures: nvidia-smi reported 52 °C, 55 W, no Xid errors,
ECC/retired-pages N/A on this consumer card. Windows Event Log showed nvlddmkm events only around the
earlier VRAM-pressure incident, none at the times of these two crashes. The GPU also loaded and served
the 110k-token prompt correctly between the two crashes.

Symptom 2 — prefill stalls forever when --ssd-cache is set

On the same box, adding --ssd-cache 40 --ssd-policy lfu (and --vram-experts 0.85 --reserve-mib 1024)
makes the engine accept the very first request and then hang on it:

[strata] thinking capped at 10 of max_tokens 20 to leave room for the answer (budget 32768)
[strata] reading the prompt: 33 tokens, 10 s so far
[strata] reading the prompt: 33 tokens, 20 s so far
... (33-token prompt, counter never advances) ...
[strata] reading the prompt: 33 tokens, 81 s so far
[strata] the engine did not finish the request after it was stopped (STOP) within 301 s; the server ended the engine.
[strata] done: 0 tokens in 394 s (no speed) (error, cancel=True)

The 33-token prompt is the trivial "Say ALIVE" probe, and it never leaves the prompt-reading stage.
Process state at that point: ~35.6 GB working set, CPU usage climbing (615 s accumulated), GPU idle.
Removing --ssd-cache / --ssd-policy and going back to --vram-experts 0.95 fixed the startup path,
so the stall appears to be tied to the RAM store sizing at load time on this configuration (RAM store
sizes itself at model start, per the docs).

Attachments

  • strata-dsv41-crash.log — the full engine log (5,552 lines). It contains: the earlier
    unknown error incident at --reserve-mib 256, the manual restart at --reserve-mib 1024, the 59k
    and 110k single-shot tests, the 25-turn continuous session with both fatal errors, and the
    --ssd-cache stall.

Log is from a personal workstation; it has been checked for credentials (no API keys, tokens, user
names or file paths with personal data — paths are whitespace-neutralised to <pack_iq2> /
<expert-profile.bin> where they appeared).

Happy to run any additional tests, other context sizes, --dspark off, or a build with extra
diagnostics if that helps narrow it down.

Originally created by @smirnovdmitrij87-byte on GitHub (Nov 5, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5292 # [Engine] dsv41 on sm_75 (RTX 2080 Ti): cudaStreamSynchronize "illegal memory access" on a short follow-up prefill; prefill sometimes stalls indefinitely Area: engine prompt processing ## Summary Running the DeepSeek-V4.1-Flash pack (`dsv41`, IQ2 pack) on a single RTX 2080 Ti (Turing, sm_75), Windows, engine 0.1.56 (`build ffa80d731`), MTP/dspark enabled, the engine crashed twice inside a 28-minute continuous multi-turn session with: ``` cudaStreamSynchronize(s): an illegal memory access was encountered ``` Each time this happened on a *short* follow-up request (3.5k and 8.0k prompt tokens) right after the previous turn had completed normally. The wrapper detected the dead engine and restarted it automatically, which is what kept the session going — but 2 of 25 turns were lost. Separately (same session, before the crash): a 59,451-token prompt was processed successfully, and a 110,292-token prompt was still reading normally when the client cancelled it (see "Context length is not the trigger" below). There is also a second symptom, a *prefill stall* rather than a crash: with `--ssd-cache` set the engine hangs on the very first 33-token prompt and never finishes (details at the end). ## Environment | item | value | |---|---| | OS | Windows 11 | | GPU | NVIDIA GeForce RTX 2080 Ti, 22 GiB VRAM (modified), sm_75 | | Driver | 617.42 (CUDA UMD 13.4) | | CPU | AMD EPYC 7D12, 32 cores / 64 threads | | Host RAM | 128 GB | | Engine build | `strata-dsv41 0.1.56 build ffa80d731` (Windows x64) | | Model | DeepSeek-V4.1-Flash, IQ2 pack (`pack_iq2`), expert-profile.bin | | API | port 1236, `/health`, `/v1/chat/completions` | Engine launch args (verbatim, as read from the process command line): ``` --pack <pack_iq2> --max-context 131072 --expert-profile <expert-profile.bin> --experts 6 --cpu-threads 32 --vram-experts 0.95 --reserve-mib 1024 --dspark on --dspark-conf 0.65 ``` Note on `--reserve-mib`: this was raised from 256 to 1024 during this investigation. With 256 the engine died differently — `emb_upload(...): unknown error` / `cudaMemsetAsync(...): unknown error` on a 50,594-token prompt, after which every subsequent request failed until a manual restart. With 1024 the `unknown error` family disappeared completely (verified: 59k and 110k prompts OK, no `unknown error` in the log after that restart). The `illegal memory access` below is a *different* failure that appeared only afterwards, during the continuous session. ## Symptom 1 — illegal memory access on a short follow-up (the crash) Failure is always on a **short** prompt, immediately after a previously successful turn: | # | prompt tokens of failing request | what happened | |---|---|---| | 1 | 3,513 | previous turn finished normally (380 tokens, 34 s, `stop`), then the next request died in 8 s | | 2 | 7,980 (7,699 requested + reuse) | previous turn finished normally (215 tokens, `stop`), then the prefill stalled ~240 s and ended with the fatal error | Log excerpt from crash #1 (turn N finished cleanly, the very next prefill died): ``` [strata] done: 380 tokens in 34 s (12.9 tok/s) (stop, cancel=False) [strata] thinking capped at 300 of max_tokens 600 to leave room for the answer (budget 32768) [strata] the GPU reported a fatal error and the engine ended: cudaStreamSynchronize(s): an illegal memory access was encountered. [strata] done: 0 tokens in 8 s (no speed) (error, cancel=False) [strata] the GPU reported a fatal error (...); the engine ended (exit code None) and is started again; the request that was running failed and can be sent again (1 of 3 allowed in 10 minutes) [strata] the engine had stopped (exit code None); starting it again (a minute or two) ... [strata] the engine is running again ``` Log excerpt from crash #2 (prefill of 7,980 tokens never advances, then the fatal error): ``` [strata] reading the prompt: 7,980 tokens, 10 s so far [strata] reading the prompt: 7,980 tokens, 20 s so far ... (identical line every ~10 s, token counter stuck at 7,980) ... [strata] reading the prompt: 7,980 tokens, 235 s so far [strata] the GPU reported a fatal error and the engine ended: cudaStreamSynchronize(s): an illegal memory access was encountered. [strata] done: 0 tokens in 240 s (no speed) (error, cancel=False) ``` The stall-then-crash pattern is consistent: `reading the prompt: X tokens, N s so far` repeats with `X` frozen for many minutes and then the synchronize reports the illegal access. In crash #2 that frozen line repeats 23 times before the error. ## Context length is not the trigger To separate this from the usual VRAM-pressure reports, a single-shot test was run against the same engine: - 59,451-token prompt → completed, answer returned, no error - 110,292-token prompt → prefill progressed normally (client cancelled it, engine stayed healthy) - probe immediately after the 59k request → 2.2 s, healthy So long prompts are fine on this box. The crash correlates with *many sequential turns on the same engine instance*, not with prompt size. ## Reproduction sketch 1. Start dsv41 with the args above, `--dspark on`, `--max-context 131072`. 2. Send sequential chat turns where the conversation history grows each time (a realistic agent loop: system prompt + growing history + a fresh tool result every turn), `max_tokens` ~600. 3. Turns completed normally until turn 9 (prompt 3,513) — that request died with the illegal access. 4. Wrapper auto-restarted the engine; turns 10–24 were fine (prompt 3,914 → 7,699). 5. Turn 25 (prompt 7,980) stalled and died the same way. Result: 23/25 turns OK, 2 crashes, 28.2 minutes total. Throughput ~12.9 tok/s on the turns that worked. ## Not a hardware fault (for the record) The card was checked at the time of the failures: `nvidia-smi` reported 52 °C, 55 W, no Xid errors, ECC/retired-pages N/A on this consumer card. Windows Event Log showed `nvlddmkm` events only around the earlier VRAM-pressure incident, none at the times of these two crashes. The GPU also loaded and served the 110k-token prompt correctly between the two crashes. ## Symptom 2 — prefill stalls forever when `--ssd-cache` is set On the same box, adding `--ssd-cache 40 --ssd-policy lfu` (and `--vram-experts 0.85 --reserve-mib 1024`) makes the engine accept the very first request and then hang on it: ``` [strata] thinking capped at 10 of max_tokens 20 to leave room for the answer (budget 32768) [strata] reading the prompt: 33 tokens, 10 s so far [strata] reading the prompt: 33 tokens, 20 s so far ... (33-token prompt, counter never advances) ... [strata] reading the prompt: 33 tokens, 81 s so far [strata] the engine did not finish the request after it was stopped (STOP) within 301 s; the server ended the engine. [strata] done: 0 tokens in 394 s (no speed) (error, cancel=True) ``` The 33-token prompt is the trivial `"Say ALIVE"` probe, and it never leaves the prompt-reading stage. Process state at that point: ~35.6 GB working set, CPU usage climbing (615 s accumulated), GPU idle. Removing `--ssd-cache` / `--ssd-policy` and going back to `--vram-experts 0.95` fixed the startup path, so the stall appears to be tied to the RAM store sizing at load time on this configuration (RAM store sizes itself at model start, per the docs). ## Attachments - `strata-dsv41-crash.log` — the full engine log (5,552 lines). It contains: the earlier `unknown error` incident at `--reserve-mib 256`, the manual restart at `--reserve-mib 1024`, the 59k and 110k single-shot tests, the 25-turn continuous session with both fatal errors, and the `--ssd-cache` stall. Log is from a personal workstation; it has been checked for credentials (no API keys, tokens, user names or file paths with personal data — paths are whitespace-neutralised to `<pack_iq2>` / `<expert-profile.bin>` where they appeared). Happy to run any additional tests, other context sizes, `--dspark off`, or a build with extra diagnostics if that helps narrow it down.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3155
No description provided.