mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[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
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#120
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 @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 engineSummary
Engine 0.1.27 dies on the first long prompt; short prompts work. With
CUDA_LAUNCH_BLOCKING=1the first failinglaunch is the batched PLE block:
(
src/prefill/prefill.cpp:1225->native_ple_postops_batch, thrown atsrc/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: itstalls, 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 atsrc/prefill/prefill.cpp:958). All prompt sizes then pass, including 11,105 tokens in two chunks, at 546-1,320prompt tok/s.
Environment
a790805(Engine 0.1.27), self-built (--build): CUDA 12.8,CMAKE_CUDA_ARCHITECTURES=120,STRATA_VISION_CUDA=ON--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 1100serve/server.pyon 127.0.0.1:8090 (no web UI attached, requests fromcurl)Reproduction
python serve/server.py --engine strata --config strata-iq3_xxs.json --port 8090/v1/chat/completionsthe engine stopped unexpectedly (exit code 1); the engine log ends atprefill copy_i32: an illegal memory access was encounteredSTRATA_PLE_BATCH=0docs/DETAILS.md)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)
--vram-reserve-mib 1100leaves634 MiB of VRAM free with everything loaded(abovethe engine's own 256 MiB threshold, no LOW warning) and it still faults. At 700 it is 235 MiB (LOW) - also faults.
STRATA_MTP_BATCH=0-> same fault.--prefill 2048(borrow 1,205 slots instead of2,739) -> same fault.
--no-prefill-borrow(own buffers, needs--prefill 512to fit at all) -> same fault with593 MiB free.
STRATA_GROUP_COPY=1, then alsoSTRATA_PREFILL_MMQ=0-> the sticky label moves (
prefill gather_rows16,prefill mmq: quantize) but the request still fails.lookup is not involved.
the server log says
cancel=False, and the engine log contains nocancel/disconnectline.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 CUDAfault is sticky: the first failure is only seen by the next
cu*check. WithCUDA_LAUNCH_BLOCKING=1the site isconsistent - the PLE batch launch - and
STRATA_PLE_BATCH=0removes the failure entirely, so the batched PLE blockis 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.
@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_i32label. 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 withoutSTRATA_PLE_BATCH. If you still have the 12.8 build, one run undercompute-sanitizer --tool memcheckwith 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.--kv k8v4: hybrid KV cache — INT8 K + Hadamard-rotated Q4_0 V (816 B/cell) #2467