[GH-ISSUE #5197] [Engine] CUDA "illegal memory access" in prefill (gr_write) with --max-context 131072 on RTX 4070 Ti (12 GiB), 0.2.10 #3094

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

Originally created by @DO1FJN on GitHub (Nov 4, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5197

Area

engine prompt processing

Environment

  • Strata version: Desktop app 0.2.10 (AppImage), engine 0.1.56-linux-x86_64-cuda-cuda13
  • System: Linux, openSuse 16.0 / kernel: 6.12.0-160000.40-default #1 SMP PREEMPT_DYNAMIC
  • Graphics card: NVIDIA GeForce RTX 4070 Ti (12 GiB), driver 580.178.04
  • Memory: 31.2 GiB, CPU: 12 physical cores / 24 threads, no AVX-512
  • Model: Qwen3.8-Flash-Next coder-IQ1_M (also tried swift-IQ2_XS)
  • Storage: NVMe (nvme1n1)

What happened

With the default context of 131072 the engine started and answered a first short prompt (53 tokens). During the next prefill it crashed:

prefill gr_write: an illegal memory access was encountered

Command line: ... --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp ... --max-context 131072 --kv int8 --mmap-experts --vram-reserve-mib 1536

The engine was restarted afterwards with --max-context 32768 (same settings otherwise) and has been stable since, including a 6.5k-token prompt.

Reproduction

not done jet.

Notes

I can attach the log from the crashing run. Happy to test with other context sizes or settings if useful.

strata-swift-iq2_xs.log

Originally created by @DO1FJN on GitHub (Nov 4, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5197 ### Area engine prompt processing ### Environment - Strata version: Desktop app 0.2.10 (AppImage), engine 0.1.56-linux-x86_64-cuda-cuda13 - System: Linux, openSuse 16.0 / kernel: 6.12.0-160000.40-default `#`1 SMP PREEMPT_DYNAMIC - Graphics card: NVIDIA GeForce RTX 4070 Ti (12 GiB), driver 580.178.04 - Memory: 31.2 GiB, CPU: 12 physical cores / 24 threads, no AVX-512 - Model: Qwen3.8-Flash-Next coder-IQ1_M (also tried swift-IQ2_XS) - Storage: NVMe (nvme1n1) ### What happened With the default context of 131072 the engine started and answered a first short prompt (53 tokens). During the next prefill it crashed: ``` prefill gr_write: an illegal memory access was encountered ``` Command line: `... --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp ... --max-context 131072 --kv int8 --mmap-experts --vram-reserve-mib 1536` The engine was restarted afterwards with `--max-context 32768` (same settings otherwise) and has been stable since, including a 6.5k-token prompt. ### Reproduction not done jet. ### Notes I can attach the log from the crashing run. Happy to test with other context sizes or settings if useful. [strata-swift-iq2_xs.log](https://github.com/user-attachments/files/34363777/strata-swift-iq2_xs.log)
Author
Owner

@github-actions[bot] commented on GitHub (Nov 4, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".
  • Fill in "Area".
  • Fill in "Desktop app, Terminal or source?".
  • Fill in "Reproduction status".
  • Fill in "Strata version".
  • Fill in "Graphics card, memory and system".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6627227070 --> @github-actions[bot] commented on GitHub (Nov 4, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". - [ ] Fill in "Area". - [ ] Fill in "Desktop app, Terminal or source?". - [ ] Fill in "Reproduction status". - [ ] Fill in "Strata version". - [ ] Fill in "Graphics card, memory and system". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@DO1FJN commented on GitHub (Nov 4, 2026):

/reopen

<!-- gh-comment-id:6627705540 --> @DO1FJN commented on GitHub (Nov 4, 2026): /reopen
Author
Owner

@github-actions[bot] commented on GitHub (Nov 4, 2026):

Not reopened yet. Still missing:

  • Fill in "Area".
  • Fill in "Desktop app, Terminal or source?".
  • Fill in "Reproduction status".
  • Fill in "Strata version".
  • Fill in "Graphics card, memory and system".

Edit the issue and comment /reopen again. Details: CONTRIBUTING.md

<!-- gh-comment-id:6627707783 --> @github-actions[bot] commented on GitHub (Nov 4, 2026): Not reopened yet. Still missing: - [ ] Fill in "Area". - [ ] Fill in "Desktop app, Terminal or source?". - [ ] Fill in "Reproduction status". - [ ] Fill in "Strata version". - [ ] Fill in "Graphics card, memory and system". Edit the issue and comment `/reopen` again. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@DO1FJN commented on GitHub (Nov 4, 2026):

/reopen

<!-- gh-comment-id:6627818990 --> @DO1FJN commented on GitHub (Nov 4, 2026): /reopen
Author
Owner

@github-actions[bot] commented on GitHub (Nov 4, 2026):

Not reopened yet. Still missing:

  • Fill in "Desktop app, Terminal or source?".
  • Fill in "Reproduction status".
  • Fill in "Strata version".
  • Fill in "Graphics card, memory and system".

Edit the issue and comment /reopen again. Details: CONTRIBUTING.md

<!-- gh-comment-id:6627821517 --> @github-actions[bot] commented on GitHub (Nov 4, 2026): Not reopened yet. Still missing: - [ ] Fill in "Desktop app, Terminal or source?". - [ ] Fill in "Reproduction status". - [ ] Fill in "Strata version". - [ ] Fill in "Graphics card, memory and system". Edit the issue and comment `/reopen` again. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@SofieneKARAJA commented on GitHub (Nov 4, 2026):

I'm experiencing the same issue on Windows with an RTX 4070 12GB and 48GB RAM, using the Coder IQ1_M pack.

The engine repeatedly aborts during prefill with errors such as:

  • the expert source could not copy experts 256.. of layer 0
  • Also seen with expert IDs 257 and 258.

This happens even with very short prompts (53 tokens), and the log reports layer-major off for this prompt.
This happens also when I try to use the 'Tune model' option

Setting STRATA_PREFILL_LAYER_MAJOR=0 seems to resolve the issue on my setup so far.

I'm running engine 0.1.56.
It worked fine before on engine 0.1.55 without the STRATA_PREFILL_LAYER_MAJOR setting, so reverting back to 0.1.55 also seems to fix the issue.

Happy to provide the full logs if needed.

<!-- gh-comment-id:6642349443 --> @SofieneKARAJA commented on GitHub (Nov 4, 2026): I'm experiencing the same issue on Windows with an RTX 4070 12GB and 48GB RAM, using the Coder IQ1_M pack. The engine repeatedly aborts during prefill with errors such as: - `the expert source could not copy experts 256.. of layer 0` - Also seen with expert IDs 257 and 258. This happens even with very short prompts (53 tokens), and the log reports `layer-major off for this prompt`. This happens also when I try to use the 'Tune model' option Setting `STRATA_PREFILL_LAYER_MAJOR=0` seems to resolve the issue on my setup so far. I'm running engine 0.1.56. It worked fine before on engine 0.1.55 without the STRATA_PREFILL_LAYER_MAJOR setting, so reverting back to 0.1.55 also seems to fix the issue. Happy to provide the full logs if needed.
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#3094
No description provided.