mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3813] [Engine] verify: layer N never rang / mtp draft: illegal instruction — reproduces on 0.1.48; after an engine restart the 2nd request always fails #1614
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#1614
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 @Justsoso-W on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3813
[Engine] verify: layer N never rang / mtp draft: illegal instruction — reproduces on 0.1.48; after an engine restart the 2nd request always fails
What happened
The engine dies with illegal instruction (CUDA error 717) during the speculative-decoding
verify window or the MTP draft step. It is not a one-off: on this machine it reproduces on
every engine version from 0.1.41 to 0.1.48, with five different signatures.
The most reproducible pattern found today is:
After every engine restart, request #1 succeeds and request #2 fails.
The server then restarts the engine, and the cycle repeats.
This has been seen on this machine since 2026-10-13 (engine 0.1.41), so it is long-standing.
The signatures (all five, verbatim from the logs)
[strata] the engine reported an error: verify: layer 29 never rang (an illegal instruction was encountered)
[strata] the engine reported an error: verify: layer 28 never rang (an illegal memory access was encountered)
[strata] the engine reported an error: mtp draft: an illegal instruction was encountered
[strata] the engine reported an error: mtp draft step: an illegal instruction was encountered
strata serve: adaptive tier: copy of layer 28 into slot 1992 (CUDA0) failed: an illegal instruction was encountered
strata serve: adaptive swap copy failed (layer 44, slot 2090, pinned 0): an illegal instruction was encountered
prefill mmq: gather_native_group: an illegal instruction was encountered
Affected layers are random — 19 distinct values across the logs: 3, 5, 12, 13, 17, 19, 21,
23, 24, 25, 26, 28, 29, 32, 33, 34, 35, 46. Layer 29 alone appears 6 times.
The engine's own exit message:
[strata] the engine stopped unexpectedly (exit code 1). The engine exited (code 1) after it reported:
verify: layer 29 never rang (an illegal instruction was encountered) - please report it at
github.com/Niko1221/Strata/issues with the log.
The pattern in the log
The failure happens right at the prefill → verify boundary, usually before a single token
is produced:
[strata] reading the prompt: 15,766 of 15,771 tokens, 27 s so far
[strata] thinking: 20 of budget 1536 (max 2048) tokens, 33.0 tok/s, 28 s
[strata] thinking: 248 of budget 1536 (max 2048) tokens, 31.6 tok/s, 35 s
[strata] the engine reported an error: verify: layer 13 never rang (an illegal instruction was encountered)
[strata] done: 274 tokens in 36 s (31.7 tok/s) (error, cancel=False)
and, in the worse case, before any output at all:
[strata] reading the prompt: 15,571 of 15,576 tokens, 26 s so far
[strata] the engine reported an error: verify: layer 46 never rang (an illegal instruction was encountered)
[strata] done: 0 tokens in 27 s (0.0 tok/s) (error, cancel=False)
Reproduction
A strict reproducer (a 15.5k-token prompt, thinking on, cache_prompt: false so every request
really re-prefills) fails 6 out of 12 requests on 0.1.48:
EP1 OK
EP2 ERR verify: layer 29 never rang
EP3 ERR the engine stopped unexpectedly (exit code 1) -> restart
EP4 OK
EP5 ERR mtp draft: an illegal instruction was encountered
EP6 ERR the engine stopped unexpectedly (exit code 1) -> restart
EP7 ERR verify: layer 3 never rang
EP8 ERR the engine stopped unexpectedly (exit code 1) -> restart
EP9 OK
EP10 OK
EP11 OK
EP12 OK
Note the shape: every OK is the first request after a restart, and every failure is the second.
With the normal prompt cache in play the situation is much better — 8 consecutive requests with a
15.5k prompt + thinking + tool calls all pass, because the later requests reuse the cached prompt
(cached_tokens: 15571) and never enter the prefill → verify path. The trigger is a real
re-prefill of a long prompt.
Versions tested
Engine
Result
0.1.41
reproduces (verify: layer 2 never rang, also broke setup.py --calibrate)
0.1.44.1
reproduces
0.1.45
reproduces (verify: layer 29 never rang, 2 crashes in ~7 requests)
0.1.47 (0.2.2)
reproduces (mtp draft step, verify: layer 33/34)
0.1.48 (0.2.3, current)
reproduces (verify: layer 29, verify: layer 3, mtp draft)
With reference to the note on #2813 ("Re-test on 0.2.0-beta, it may already be fixed") —
it is not fixed on 0.1.48 as of today (2026-10-23, 0.2.3 published 07:44 UTC).
Environment
the non-resident experts
expert-cache hit rate on this 16 GB card)
Config used for the strict reproducer (a conservative variant)
--pack F:\Strata-data\packs\iq3_s
--native F:\Strata-data\models\IQ3_S\Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00001-of-00002.gguf
--ple-gguf F:\Strata-data\models\IQ3_S\Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00002-of-00002.gguf
--expert-profile F:\Strata\data\expert-profile.bin
--expert-cache auto
--prefill 4096
--spec 2
--mtp F:\Strata-data\mtp\rt
--max-context 262144
--kv int8
--kv-resident 8192
--spec-min-p 0.70
--pool-workers 17
--pool-tasks 256
--adapt-every 1
--adapt-swaps 160
--adapt-decay 0.97
--vram-reserve-mib 1472
--adapt-async 0
env: STRATA_KV_STAGE_OWN=1, STRATA_PF_FUSED=0, STRATA_KV_PREFETCH=1, STRATA_KV_HOST_DMA=1,
STRATA_ARENA_PIN_GIB=40, STRATA_PIN_BY_NEED=1, STRATA_OWNED_PRICE=exact, STRATA_HOST_CORE=last
The original, less conservative flags (--spec 4 --prefill auto:8192 --adapt-async 1) fail the
same way.
What was already tried (no effect)
Attempt
Result
--spec 0 (disable speculative decoding)
not possible: an IQ native pack requires --spec T (T >= 2); the engine exits with code 2
--spec 2
still reproduces
--adapt-async 0
still reproduces
--prefill 4096 / 512 / auto:8192
still reproduces
--kv int8 → k8v4
only delays it by one round (round 1 passes, round 2 fails)
STRATA_KV_STAGE_OWN=1
no effect — the log still says single existing staging pool, so it does not appear to take effect
STRATA_PF_FUSED=0
no effect
STRATA_PF_STEP_SYNC=1/2/3
lowers the rate only (diagnostic, per #1468)
--pool-workers 17 → 24
3 crashes in a row; higher worker counts make it more likely
engine 0.1.41 → 0.1.45 → 0.1.47 → 0.1.48
all reproduce
Additional observations that may help
illegal memory access in the same place as the engine fault.
STRATA_KV_STAGE_OWN=1. Since #1468 points at the expert-cache slots being borrowed by the KV
staging pool, and 0.2.3 fixed the Metal path with "the expert cache was borrowed in the prompt
path; now it is not", the CUDA path may still have the same problem.
staging buffer, or the expert-cache slot table) is not fully re-initialised after an engine
restart, and the second request hits it.
then the same error kills the tuning.
Questions
(STRATA_KV_STAGE_OWN=1 does not appear to switch it on — the log line is unchanged.)
Thanks for reading — happy to provide the full logs, the reproducer script, or to test a build.
issue-draft.md
@dandandelion commented on GitHub (Oct 23, 2026):
Same card, same pack, same
verify: layer N never rang— Linux data, including one signature nobody has reported yet and a decoded GPU coredump that names the faulting instruction.We are the other RTX 3080 Ti Laptop reporter in this thread family: the box behind the 2026-10-19 comments on #3134. Fedora 44, not Windows. We have been chasing this since 2026-10-13 with instrumentation of our own, and we now have four different fault signatures on one box. This is a report, not a "+1" — the parts that may be useful are the coredump, the per-layer trace ring dump of a fatal window, and one lever that measurably changed the fault rate.
Our box, and our rate
We have 21 of these events from earlier runs, and the
0x40702cvalues are not scattered: 17 of the 21 fall inside one band,0x2048654…0x204f376(27 KiB wide), and 4 of them inside a second,0x2008cbb…0x2009d2b(4 KiB wide). Today's value sits in the first band. Whatever the driver is reading when it validates a launch descriptor, the bad words keep coming from the same neighbourhood, across two engine versions and two kernels.The trace ring says exactly which launch died (
STRATA_VERIFY_TRACE=1, #649)Window 376626, steps 0…19 all
RANGthenSERVEDwith the handshake counters equal, then:The host had already served layer 20 (
A 20 B 20) — the doorbell simply never came back, and the GPU's own stamps stop at layer 19. So the launch the driver rejected is the first kernel of layer 20 of that window, and the request had already decoded 464 tokens at 51–54 tok/s after a 54,018-token prompt read. That long-standing "the layer number is random" observation has a mechanism-shaped answer for this case: the host is not late and the layer is not special — the launch is refused.Useful for sizing: the log's own capture lines show 5 captures per engine run (
strata verify: captured the N-token window (upload no error, sync no error), N = 1…5), i.e. one instantiated graph exec per shape, and that run reached window 376,626 — so the same exec had been replayed on the order of 10⁵ times before the single bad launch. We do not know yet whether the descriptor image went bad at that instant or the words read on the way into the scheduler were bad; the engine exits on this error, so there is no "did the next replay fail too" answer.The decoded coredump names a device instruction (this rules out the CPU-side guess)
@Justsoso-W raised a fair question — an "illegal instruction" on a Haswell part with no AVX-512 could be CPU-side. It is not. We have a driver-written CUDA coredump from an SM-class fault, and here is how to read one, since
cuda-gdb --core <file>refuses these by design (the file is a section-based CUDA core: 171,217 section headers,e_phoff = 0, 40,960.cudbg.regs.*and 40,960.cudbg.localsections — that is the format, not damage):That gives:
CUDA Exception: Warp Misaligned Address, PC0x7f1cb8dea2d0, kernelnative_mmvq_multi_kernel<Q6KTraits, 3, 4, 2, false, false>, grid 89,535, GridDim (320,1,1), BlockDim (32,4,1), all 58 SMs faulting identically. Disassembly of that instance (cuobjdump -sass -fun <mangled> engine/strata):and the registers: R18/R19, R20/R21, R22/R23, R24/R25 all hold
0x7f23a7ce94fb— an odd address.[R24.64+0xd0]=0x7f23a7cea5cb. Every offset that kernel uses is even, andAlloc::takerounds every block to 256 bytes, so the odd bit is in the pointer value itself, which is a launch parameter (const Traits::Block*, float*). Every CTA faulted identically, 49 s into a request that had already decoded 2,356 tokens. Same shape as the Oct 22 MMU fault: a wild value, not an off-by-N index.For the record, a
SKEDCHECK16_*rejection writes no coredump at all (no CUDBG exception is raised), so nobody should go looking for one — the trace ring and the ESR words are the whole evidence base for that class.Two knobs that move the rate — one of them ours
STRATA_SH_STREAM=0(turn the shared-expert fork off;verify.cpp:257-262reads it, consumed at 1863/2108 in 0.2.2). On 0.1.44.1 that arm ran 1,992,045 tokens over 1,266 requests with 1 SM-class burst against ~6.1 expected from our own baseline (P(≤1 | 6.1) ≈ 6%) — about 6× fewer. It costs nothing: median 52.7 → 61.0 tok/s. On 0.2.2 + kernel 7.2.11 + fork off, the SKED class is down to ~1 per 12 h of GPU-busy against ~1 per 1.15 h in the fork-on era. Not a fix — the class came back at 19:54 — but a measured suppression of a device-side fork inside the verify window.--pool-workers, from your report, is the other concurrency axis and we have never varied it (we run 13 automatic). Your numbers are the strongest single clue in this whole thread: 17 workers ≈ 1 crash per 15–20 requests, 24 workers = three in a row. A rate that rises with host worker count, plus a rate that falls when a device-side stream fork is switched off, both point at the same thing: the concurrency around the launch/command queue, not one kernel's code.Build provenance, so you know which number came from what
v0.2.2—cmake -DCMAKE_CUDA_ARCHITECTURES=86 -DCUDAToolkit_ROOT=/usr/local/cuda-13.4 -DSTRATA_NATIVE_EXPERTS=ON, 76,799,992 bytes, no local patches to any source file, only environment variables. It self-reportsengine 0.1.47. We have not installed 0.2.3 yet; we will build it and report.src/core/verify.cppthat added (a) gap breadcrumbs inside a layer, (b)cudaGraphUploadbefore every replay behindSTRATA_VERIFY_GRAPH_UPLOAD=1. Those two additions do not exist upstream and are not in anything quoted above from 0.2.2. TheSTRATA_VERIFY_TRACE=1ring quoted above is upstream's own (#649) and works unmodified on 0.2.2.verify.cpponly, and the named kernel and its launch parameters are unmodified.Per the tracker-reset note, #3134 is reopenable with
/reopennow that we have re-tested on 0.2.x; we would rather keep the data in one place, so it is going here.What we have ruled out, with the measurement
--kv k8v4 → int8did not change our fault class; your "only delays it by one round" agrees. The engine callskv_gather_q8_step+kv_gather_q4_stepfromlayer.cpp:1140-1142either way.Xid 31came 29 min into the first run on the new kernel). Engine: 0.1.41…0.1.44.1…0.2.2 all fault; 0.1.48 not installed here yet.strata-visionrunning or not changed nothing in the fault rate.One other class we see on this box, which may or may not be the same animal:
Xid 62(µC halt) followed byXid 154(PF FLR) and 8 ×Xid 45, with noXid 13, noXid 31, no SKEDCHECK and a near-empty coredump (8,732 bytes of tables, no registers). 18 such events since 2026-09-17; two of them within 9 h of GPU time in the last fortnight. Payload words repeat across days — e.g. two events on different days share the first word and four trailing words:224c1547 … 202c3d4a 202c26c6 202c1d5c 202bfd44 202ad272.Questions for you
A 20 B 20, host served the step) and the driver's ownCTA_THREAD_DIMENSION_ZEROverdict: what writes the launch descriptor for a node of an instantiated graph, and what could make the CTA/thread dimensions read as zero once in ~10⁵ replays? Could the engine re-read and validate a node's parameters (cudaGraphExecKernelNodeGetParams) beforecudaGraphLaunch, and report the dimensions it thinks it asked for?cudaGraphUploadbefore every replay rather than once after instantiate? That is the A/B we would most like to run; upstream calls it once at capture (verify.cpp:2437in 0.2.2), ours did it per replay, and the patch does not survive the 0.2.2 rewrite ofverify.cpp(+995/−179).Xidpayload word families be useful to you? We can keep them, and we can run any instrumented build or a deliberate stress session (raise--pool-workers, fresh 15–20k prompts with no cache reuse) — on this box we get ~1 event per 12 h of GPU-busy, on @Justsoso-W's box you get one per 15 requests.--pool-workerson Linux: would you rather we lower it (13 → 4) or reproduce the increase (13 → 17/24) first?One small thing that may save other people time: the CUDA coredump environment that works here is
CUDA_ENABLE_COREDUMP_ON_EXCEPTION=1,CUDA_COREDUMP_FILE=<path>/cuda-%p.dump,CUDA_COREDUMP_GENERATION_FLAGS=gzip_compress(full memory — theskip_global_memory,skip_constbank_memory,faulted_contexts_onlyset is what we used first and it hid the registers we needed),CUDA_COREDUMP_SHOW_PROGRESS=1. AndCUDA_COREDUMP_GENERATION_FLAGS=lightweightis not accepted by driver 615.71.09.Times above are as printed by the source named; our log and
gpu.csvcarry+08:00stamps andjournalctlon this box prints one hour behind them, which is a quirk of our own setup, not of the fault.@mkemalemdar commented on GitHub (Oct 27, 2026):
Another data point, on an older engine than the range above (0.1.38) and on Blackwell, Linux.
What happened: a long agent session through the OpenAI API (pi coding agent). Requests at 147K, 148K, 150K tokens of context ran fine; the next one, at 151,443 tokens (151,438 reused + 5 read), failed 40 tokens into the thinking:
The kernel logged an MMU fault for the engine at the same second:
The last successful request's stats, for the KV state at the time:
Reproduction: seen once; first occurrence in this engine's log (11 engine starts). Not reproduced on demand. No sanitizer run yet.
Setup
GET /v1/status), Docker image built from source at99f3dbd, CUDA 13.0.48--max-context 262144 --kv int8 --kv-resident 32768 --spec 4 --spec-min-p 0.5 --mtp ... --expert-cache auto --prefill auto --resident-experts --vision --vram-reserve-mib 700,min_free_vram_mib15000@dandandelion commented on GitHub (Oct 29, 2026):
Follow-up to my comment of 2026-10-23. Same machine (RTX 3080 Ti Laptop, sm_86, Linux, driver 615.78.08, GSP off),
same pack as yours (GSQ-RCO IQ3_S native), upstream prebuilt engine 0.1.50. New result: on this box the fault follows
the pack, and nothing else.
What I changed: only the pack
I ran the identical binary, flags and settings twice, changing only
--pack/--native/--ple-gguf:So three candidates remain, and I cannot separate them from here (unconfirmed): (1) per-layer expert variation —
different kernel and different blob size on every layer; (2) the IQ-family expert kernels themselves, which Gyro-M
never executes; (3) attention-side variety, which Gyro-M also never exercises.
A suggestion for this thread
Since you run the same pack, the discriminating test is cheap at your scale: run one uniform pack with the same
config. Either Gyro-M (one expert type) or ISTA-DASLab Q2_0 (uniform type-42 experts, attention still varied).
If the "second request always fails" pattern disappears, the per-layer mix in the pack is the trigger rather than the
prefill → verify boundary; if it persists, then the boundary is real and the pack only decides how often it trips.
One difference worth noting between our machines: your failures land on request 2 after a restart, mine needed
~150k tokens (or ~72k decode tokens) each time, and my restart-to-restart counts were 145k / 163k / 168k. Same pack,
same GPU, different frequency — so the configuration modulates how often it happens, not whether it can.
I can paste both engine logs (per-request prompt length, reused tokens, expert-cache hit rate, KV block reads), the
full Xid blocks and the tensor tables if that helps.
@dandandelion commented on GitHub (Oct 30, 2026):
Clean IQ3_S runs underclocking memory clock at
-300mhzas suggested by the findings in #4190Reasons also explained in the thread
@ccmspringming commented on GitHub (Nov 7, 2026):
Related but distinct from the original report: a version regression I can pin to the new 12-token verify window.
Same machine, same pack, same flags — only the engine differs. 0.1.54 runs in production; 0.1.55 and 0.1.57 fault at startup:
window up to 5 tokens, 69.7 MiB of device bufferswindow up to 12 tokens, 110.2 MiB of device buffersillegal memory accessbefore the first requestEnvironment
iq_packof the same version line--max-context 196608 --kv int8 --vision --parallel 1 --spec 3 --expert-cache 6800 --kv-resident 32768 --prefill 8192 --vram-reserve-mib 700strata:0.2.8(engine 0.1.54, works),strata:0.2.9(engine 0.1.55),strata:0.2.11(engine 0.1.57)What changed between the working and the failing engine
This is the whole difference I can see in the logs, at startup, same config, same pack, same machine:
window up to 5 tokens, 69.7 MiB of device bufferswindow up to 12 tokens, 110.2 MiB of device buffersillegal memory accessbefore the first requestSymptom (deterministic, 5/5 reboots)
Note the shape: the capture succeeds and reports
upload no error, sync no error; the fault comes when the window is executed. The launcher then reportsprobe_http_400and exits with code 6.Matrix (all 196608 context, KV int8, same pack)
verify: layer 2 never rangverify: layer 26 never rangSTRATA_GDN_TC=0+STRATA_GDN_CONVL2=0illegal memory accessSTRATA_SH_STREAM=0STRATA_CPU_IQ_ALL_EXACT1=0Ruled out
STRATA_SH_STREAM=0: no effect on 0.1.57. (Separately, on 0.1.54 it is harmful on this pack — see below.)STRATA_CPU_IQ_ALL_EXACT1=0: no effect. TheGATE=… active=1line still prints immediately before the fault.The one 0.1.57 configuration that boots still cannot serve long prompts
With
spec 2 + prefill 8192it comes up and behaves well on short and medium work:But the first ~30K-token prompt kills it:
Container exits
(6). That is the #1468 family ("prefill copy_i32: illegal memory access on long prompts when the prefill chunk is large"), but here the chunk is 8192, not auto:32768.Two side observations that may be worth separate issues
--set no-captureis accepted and then silently dropped. The value lands in the preset'sextraas"--no-capture": "", but the generated run args instate/strata/launch/<preset>.jsondo not contain it, and the log still sayscapturing …. Same forlookup-max-t. There is no way to reach--no-capturethroughstrata launch, which makes the graph-replay A/B impossible from the container path.STRATA_SH_STREAM=0breaks generation on 0.1.54 with this pack. With it set, a plain "describe the West Lake in three sentences" request returnsfinish_reason: stop,predicted_n: 1, emptycontentand emptyreasoning_content. Unsetting it and restarting restores normal output (74 tokens on the same prompt). Since #3813 recommends this variable as a fault-rate lever, anyone on 0.1.54 should check their output before trusting it.Asks
--lookup-max-t 5, roughly what 0.1.54 did), so I can A/B the new prompt-path buffers without the wide window?cudaGraphUpload-before-every-replay build (the A/B requested in #3813) be accepted upstream? That is the one experiment I cannot run from a released image.prefill copy_i32fault at prefill 8192 be reported against #1468 instead of here?Data I can attach
Full engine logs for every row of the matrix (0.1.54 startup, 0.1.55 ×3, 0.1.57 ×5), the exact
docker runinvocations, the preset JSONs, and the pack'snative_experts.txtheader. Say the word and I will paste them.@ccmspringming commented on GitHub (Nov 7, 2026):
Related data point, different shape: I pinned a version regression in the same family on an RTX 3090 (sm_86, driver 615.78.08) with an IQ3_S native pack.
0.1.54 caps the verify window at 5 tokens and runs in production here. 0.1.55 and 0.1.57 add a 12-token window, and it faults deterministically at startup (
captured ... upload no error, sync no error→illegal memory access). Full matrix, including the one 0.1.57 setting that boots but then dies inprefill copy_i32: #5449One warning for anyone trying the
STRATA_SH_STREAM=0lever from this thread on 0.1.54: with it set, a plain request returns emptycontent, emptyreasoning_content,finish_reason: stop,predicted_n: 1on this pack. Unsetting it restores normal output. Worth checking generation before trusting the fault-rate win.--adapt-async 1beside slots) #3576