[GH-ISSUE #224] 0.1.27: long prompts fault in the batched PLE block (native PLE postops launch: an illegal memory access), then the request hangs until the watchdog kills the engine; STRATA_PLE_BATCH=0 works #120

Closed
opened 2026-11-04 01:40:08 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Alucard24 on GitHub (Sep 30, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/224

0.1.27 (a790805), RTX 5070 Ti / sm_120: the batched PLE block faults on prompts of ~1.7k+ tokens, then the watchdog kills the engine

Summary

Engine 0.1.27 dies on the first long prompt; short prompts work. With CUDA_LAUNCH_BLOCKING=1 the first failing
launch is the batched PLE block:

strata serve: prefill PLE: native PLE postops launch: an illegal memory access was encountered

(src/prefill/prefill.cpp:1225 -> native_ple_postops_batch, thrown at src/kernels/cuda/native_ple_postops.cu:171).

Without launch blocking, the fault surfaces later with a misleading, sticky label - prefill copy_i32: an illegal memory access was encountered - and the engine exits 1. In both cases the request itself is not failed cleanly: it
stalls, and the serve watchdog ends the process (no progress for 60 s during a request (reading the prompt, from token 0) -> exit -6).

Workaround that works here: STRATA_PLE_BATCH=0 (the per-token PLE block, the A/B arm the source names at
src/prefill/prefill.cpp:958). All prompt sizes then pass, including 11,105 tokens in two chunks, at 546-1,320
prompt tok/s.

Environment

  • Strata a790805 (Engine 0.1.27), self-built (--build): CUDA 12.8, CMAKE_CUDA_ARCHITECTURES=120,
    STRATA_VISION_CUDA=ON
  • RTX 5070 Ti 16 GB, driver 610.57.04, 62 GB RAM, Linux
  • Model: IQ3_XXS native pack (302 native tensors; shard 1 --native, shard 2 --ple-gguf), --expert-profile,
    --expert-cache auto, --prefill auto, --spec 4, --spec-min-p 0.5, --mtp <rt>, --max-context 65536,
    --kv int8, --kv-resident 32768, --vision, --vram-reserve-mib 1100
  • Started through serve/server.py on 127.0.0.1:8090 (no web UI attached, requests from curl)

Reproduction

  1. python serve/server.py --engine strata --config strata-iq3_xxs.json --port 8090
  2. POST a prompt of ~1,000+ tokens to /v1/chat/completions
  3. HTTP 503 the engine stopped unexpectedly (exit code 1); the engine log ends at
    prefill copy_i32: an illegal memory access was encountered
Prompt (engine's own token count) 0.1.27 stock STRATA_PLE_BATCH=0
18 / 21 / 61 / 87 / 134 (four of these on 0.1.18) OK -
1,760 natural text (docs/DETAILS.md) fault OK, 546 tok/s
2,233 repetitive fault OK, 665 tok/s
11,105 natural (2 chunks, past the 8,192 boundary) - OK, 1,320 tok/s

Each failing run is a single request on a freshly started engine.

What I ruled out (one change at a time, all on 0.1.27)

  • RAM. 57 GB available, no OOM-killer events; the engine exits 1 (and -6 through the watchdog), not 137/9.
  • VRAM headroom / #199. --vram-reserve-mib 1100 leaves 634 MiB of VRAM free with everything loaded (above
    the engine's own 256 MiB threshold, no LOW warning) and it still faults. At 700 it is 235 MiB (LOW) - also faults.
  • The CJK draft's batched prompt pass. STRATA_MTP_BATCH=0 -> same fault.
  • The prompt chunk size and the lend/borrow of cache slots. --prefill 2048 (borrow 1,205 slots instead of
    2,739) -> same fault. --no-prefill-borrow (own buffers, needs --prefill 512 to fit at all) -> same fault with
    593 MiB free.
  • The grouping copies / MMQ arms named in the source. STRATA_GROUP_COPY=1, then also STRATA_PREFILL_MMQ=0
    -> the sticky label moves (prefill gather_rows16, prefill mmq: quantize) but the request still fails.
  • Prompt content. A natural, non-repetitive text fails exactly like a repetitive one, so the suffix/prompt
    lookup is not involved.
  • A cancelled request (#183 / #194). These runs are one request each on a fresh engine, no prior request at all:
    the server log says cancel=False, and the engine log contains no cancel/disconnect line.

Why I think this is one fault plus one error-path problem

The reported checkpoint changes between runs (copy_i32, gather_rows16, quantize, PLE postops) because a CUDA
fault is sticky: the first failure is only seen by the next cu* check. With CUDA_LAUNCH_BLOCKING=1 the site is
consistent - the PLE batch launch - and STRATA_PLE_BATCH=0 removes the failure entirely, so the batched PLE block
is where it starts on this machine.

The second problem is the error path: after the failed launch the request never finishes, and the 60 s serve
watchdog (the issue #29 path) aborts the whole engine. A failed launch should end that request, not the process.

Note

On the same machine, pack and config, engine 0.1.18 completed four requests (21/61/87/134 tokens). I have no
long-prompt run of 0.1.18, so I cannot say which version introduced the batched PLE fault - only that 0.1.27
fails on this prompt size and that turning the batch off avoids it.

Originally created by @Alucard24 on GitHub (Sep 30, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/224 # 0.1.27 (a790805), RTX 5070 Ti / sm_120: the batched PLE block faults on prompts of ~1.7k+ tokens, then the watchdog kills the engine ## Summary Engine 0.1.27 dies on the first **long** prompt; short prompts work. With `CUDA_LAUNCH_BLOCKING=1` the first failing launch is the batched PLE block: ``` strata serve: prefill PLE: native PLE postops launch: an illegal memory access was encountered ``` (`src/prefill/prefill.cpp:1225` -> `native_ple_postops_batch`, thrown at `src/kernels/cuda/native_ple_postops.cu:171`). Without launch blocking, the fault surfaces later with a misleading, sticky label - `prefill copy_i32: an illegal memory access was encountered` - and the engine exits 1. In both cases the request itself is not failed cleanly: it stalls, and the serve watchdog ends the process (`no progress for 60 s during a request (reading the prompt, from token 0)` -> exit -6). **Workaround that works here: `STRATA_PLE_BATCH=0`** (the per-token PLE block, the A/B arm the source names at `src/prefill/prefill.cpp:958`). All prompt sizes then pass, including 11,105 tokens in two chunks, at 546-1,320 prompt tok/s. ## Environment - Strata `a790805` (Engine 0.1.27), self-built (`--build`): CUDA 12.8, `CMAKE_CUDA_ARCHITECTURES=120`, `STRATA_VISION_CUDA=ON` - RTX 5070 Ti 16 GB, driver 610.57.04, 62 GB RAM, Linux - Model: IQ3_XXS native pack (302 native tensors; shard 1 `--native`, shard 2 `--ple-gguf`), `--expert-profile`, `--expert-cache auto`, `--prefill auto`, `--spec 4`, `--spec-min-p 0.5`, `--mtp <rt>`, `--max-context 65536`, `--kv int8`, `--kv-resident 32768`, `--vision`, `--vram-reserve-mib 1100` - Started through `serve/server.py` on 127.0.0.1:8090 (no web UI attached, requests from `curl`) ## Reproduction 1. `python serve/server.py --engine strata --config strata-iq3_xxs.json --port 8090` 2. POST a prompt of ~1,000+ tokens to `/v1/chat/completions` 3. HTTP 503 `the engine stopped unexpectedly (exit code 1)`; the engine log ends at `prefill copy_i32: an illegal memory access was encountered` | Prompt (engine's own token count) | 0.1.27 stock | `STRATA_PLE_BATCH=0` | |---|---|---| | 18 / 21 / 61 / 87 / 134 (four of these on 0.1.18) | OK | - | | 1,760 natural text (`docs/DETAILS.md`) | **fault** | OK, 546 tok/s | | 2,233 repetitive | **fault** | OK, 665 tok/s | | 11,105 natural (2 chunks, past the 8,192 boundary) | - | OK, 1,320 tok/s | Each failing run is a **single request on a freshly started engine**. ## What I ruled out (one change at a time, all on 0.1.27) - **RAM.** 57 GB available, no OOM-killer events; the engine exits 1 (and -6 through the watchdog), not 137/9. - **VRAM headroom / #199.** `--vram-reserve-mib 1100` leaves `634 MiB of VRAM free with everything loaded` (above the engine's own 256 MiB threshold, no LOW warning) and it still faults. At 700 it is 235 MiB (LOW) - also faults. - **The CJK draft's batched prompt pass.** `STRATA_MTP_BATCH=0` -> same fault. - **The prompt chunk size and the lend/borrow of cache slots.** `--prefill 2048` (borrow 1,205 slots instead of 2,739) -> same fault. `--no-prefill-borrow` (own buffers, needs `--prefill 512` to fit at all) -> same fault with 593 MiB free. - **The grouping copies / MMQ arms named in the source.** `STRATA_GROUP_COPY=1`, then also `STRATA_PREFILL_MMQ=0` -> the sticky label moves (`prefill gather_rows16`, `prefill mmq: quantize`) but the request still fails. - **Prompt content.** A natural, non-repetitive text fails exactly like a repetitive one, so the suffix/prompt lookup is not involved. - **A cancelled request (#183 / #194).** These runs are one request each on a fresh engine, no prior request at all: the server log says `cancel=False`, and the engine log contains no `cancel`/`disconnect` line. ## Why I think this is one fault plus one error-path problem The reported checkpoint changes between runs (`copy_i32`, `gather_rows16`, `quantize`, PLE postops) because a CUDA fault is sticky: the first failure is only seen by the next `cu*` check. With `CUDA_LAUNCH_BLOCKING=1` the site is consistent - the PLE batch launch - and `STRATA_PLE_BATCH=0` removes the failure entirely, so the batched PLE block is where it starts on this machine. The second problem is the error path: after the failed launch the request never finishes, and the 60 s serve watchdog (the issue #29 path) aborts the whole engine. A failed launch should end that request, not the process. ## Note On the same machine, pack and config, engine 0.1.18 completed four requests (21/61/87/134 tokens). I have no long-prompt run of 0.1.18, so I cannot say which version introduced the batched PLE fault - only that 0.1.27 fails on this prompt size and that turning the batch off avoids it.
Author
Owner

@Niko1221 commented on GitHub (Sep 30, 2026):

Thanks for the careful isolation. This matches #220: Linux + RTX 50 (sm_120) + an engine built with CUDA 12.8, long prompts only, and the same sticky copy_i32 label. The batched PLE block hasn't changed since 0.1.13. It runs on sm_120 in our CUDA 13.0 release builds, and in #200 on a 5070 Ti with the same IQ3_XXS pack built with CUDA 13.2 (257K-token prompts), and we found no out-of-bounds indexing in it. It is the only place that runs large cuBLAS GEMMs (T x 10240 x 2560), which is why turning the batch off avoids the fault. Since 0.1.28, setup requires CUDA 13.0 for sm_120. Please rebuild with 13.0 and retest without STRATA_PLE_BATCH. If you still have the 12.8 build, one run under compute-sanitizer --tool memcheck with a ~1.8K-token prompt would name the faulting kernel. On the error path: an illegal memory access poisons the CUDA context for the whole process, so the engine has to exit. It should exit at once instead of waiting for the 60 s watchdog, and we'll change that; the build will also warn when sm_120 is compiled with CUDA < 13.0. Closing for now; please reopen if it still happens with a 13.0 build.

<!-- gh-comment-id:5910281286 --> @Niko1221 commented on GitHub (Sep 30, 2026): Thanks for the careful isolation. This matches #220: Linux + RTX 50 (sm_120) + an engine built with CUDA 12.8, long prompts only, and the same sticky `copy_i32` label. The batched PLE block hasn't changed since 0.1.13. It runs on sm_120 in our CUDA 13.0 release builds, and in #200 on a 5070 Ti with the same IQ3_XXS pack built with CUDA 13.2 (257K-token prompts), and we found no out-of-bounds indexing in it. It is the only place that runs large cuBLAS GEMMs (T x 10240 x 2560), which is why turning the batch off avoids the fault. Since 0.1.28, setup requires CUDA 13.0 for sm_120. Please rebuild with 13.0 and retest without `STRATA_PLE_BATCH`. If you still have the 12.8 build, one run under `compute-sanitizer --tool memcheck` with a ~1.8K-token prompt would name the faulting kernel. On the error path: an illegal memory access poisons the CUDA context for the whole process, so the engine has to exit. It should exit at once instead of waiting for the 60 s watchdog, and we'll change that; the build will also warn when sm_120 is compiled with CUDA < 13.0. Closing for now; please reopen if it still happens with a 13.0 build.
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#120
No description provided.