[GH-ISSUE #3626] [Engine] Coder IQ1_M: SIGSEGV in kernels::cpu::native_gu_rows (ExpertPool), deterministic across 0.2.0-beta … 0.2.2 (RTX 4070) #1492

Closed
opened 2026-11-04 01:51:41 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @saschamarco on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3626

What happens

Serving Qwen3.8-Flash-Next-GSQ-RCO-IQ1_M (coder pack) segfaults the engine. It
crashes reliably on the first generation requests of a session, never at load time
(load always reports session is up, slot 0 verified). The same machine serves
IQ3_S all day without a single crash.

Environment

  • Linux (Manjaro, kernel 7.2.11), AMD Ryzen 7 5700G (Zen 3, 8 physical / 16 logical), 62 GiB RAM, 127 GiB swap
  • GPU 0: RTX 4070 12 GB (gpu_roles: 0=main, 1=off), GPU 1: RTX 3050 (unused by this config)
  • CPU ISA as exposed by ggml-cpu autotune: AVX2 + BMI2 available, no AVX-512
  • Engine 0.1.47 (Strata 0.2.2); also reproduced on 0.1.x from 0.2.0-beta (19.10) and 0.2.1 (20.10)
  • Model: Qwen3.8-Flash-Next-GSQ-RCO-IQ1_M-0000{1,2}-of-00002.gguf, pack coder-iq1_m,
    expert-profile-coder.bin (12288 pairs)

Reproduce

engine/strata --serve --pack packs/coder-iq1_m \
  --native models/coder-IQ1_M/Qwen3.8-Flash-Next-GSQ-RCO-IQ1_M-00001-of-00002.gguf \
  --ple-gguf models/coder-IQ1_M/Qwen3.8-Flash-Next-GSQ-RCO-IQ1_M-00002-of-00002.gguf \
  --expert-profile data/expert-profile-coder.bin --expert-cache auto --prefill auto \
  --spec 4 --spec-min-p 0.5 --mtp mtp/rt --max-context 204800 --kv q4_0 --kv-resident 32768

Send any chat request. Today (21.10.) four sessions all SIGSEGV'd within the first
request each (16:36, 16:38, 16:48, 16:53). Historical coredumps show the same
signature on 0.2.0-beta (--max-context 262144 --kv int8) and 0.2.1 (with and
without cvec flags), 19.–20.10.

Crash signature (identical in all dumps)

Main thread (verifier path), one of the pool threads:

#0 strata::kernels::cpu::native_gu_rows(NativeFmt const&, unsigned char const*, unsigned char const**, int, float const*, int, int)   (strata + 0x80df47)
#1 strata::kernels::cpu::ExpertPool::drain(int, ExpertScratch&, unsigned)                                                               (strata + 0x7ec7df)
#2 strata::kernels::cpu::ExpertPool::run_phase(int, int)                                                                                (strata + 0x7edab6)
#3 strata::kernels::cpu::ExpertPool::run_split_multi_native(NativeFmt const&, ExpertJobMulti*, int)                                      (strata + 0x7edbc1)
#4 strata::core::expert_pool_dispatch_multi(...)                                                                                        (strata + 0x1c1035)
#5 (anonymous)::drive_pool_multi(...)                                                                                                   (strata + 0xcbc6c)
#6 strata::core::Verifier::run(...)                                                                                                     (strata + 0x2237bf)

The seven pool workers sit in ExpertPool::worker → drain → native_gu_rows at the
same instruction. The log ends right after
strata verify: captured the 4-token window (upload no error, sync no error).

What I ruled out

  • Not VRAM pressure: the run logs the <512 MiB warning (#2065), but the config
    crashes the same way with more free VRAM, and Coder IQ1_M is benchmarked stable on
    an RTX 4070 12 GB (#3452, #3249).
  • Not a corrupt/truncated pack or GGUF: byte sizes match upstream exactly; I
    parsed all 48 native_experts.txt rows programmatically — every gate_off/up_off/down_off + blob_bytes lies inside shard 1 and matches the IQ1_M block size.
  • Not quant-width per se: the same engine args on IQ3_S (same card, same host)
    never crash — the difference is the IQ1_M quant / coder pack.

Coredump

A full dump of the last crash (25.6 GB, zstd) is kept:
core.strata-host.1000.f8eff642fa2243969edabf71852762a0.342032.1792594314000000.zst.
Happy to upload it or run gdb probes (faulting address, $pc) if you tell me
what is most useful.

Isolation I can run on request

  • STRATA_PREFILL_CPU_SHARE=0 (the crash is in the CPU expert path)
  • STRATA_ROUTE_TAIL_SKIP=0
  • --spec 0 to confirm the verify path is the trigger

The stack points into the native (IQ1_M) row reader — my guess is an out-of-range
row pointer / a row one superblock shorter than the size the pack table promises,
which load-time slot 0 verified would not catch.

Originally created by @saschamarco on GitHub (Oct 21, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3626 ## What happens Serving `Qwen3.8-Flash-Next-GSQ-RCO-IQ1_M` (coder pack) segfaults the engine. It crashes reliably on the first generation requests of a session, never at load time (load always reports `session is up`, `slot 0 verified`). The same machine serves IQ3_S all day without a single crash. ## Environment - Linux (Manjaro, kernel 7.2.11), AMD Ryzen 7 5700G (Zen 3, 8 physical / 16 logical), 62 GiB RAM, 127 GiB swap - GPU 0: RTX 4070 12 GB (`gpu_roles: 0=main, 1=off`), GPU 1: RTX 3050 (unused by this config) - CPU ISA as exposed by ggml-cpu autotune: AVX2 + BMI2 available, no AVX-512 - Engine 0.1.47 (Strata 0.2.2); also reproduced on 0.1.x from 0.2.0-beta (19.10) and 0.2.1 (20.10) - Model: `Qwen3.8-Flash-Next-GSQ-RCO-IQ1_M-0000{1,2}-of-00002.gguf`, pack `coder-iq1_m`, `expert-profile-coder.bin` (12288 pairs) ## Reproduce ``` engine/strata --serve --pack packs/coder-iq1_m \ --native models/coder-IQ1_M/Qwen3.8-Flash-Next-GSQ-RCO-IQ1_M-00001-of-00002.gguf \ --ple-gguf models/coder-IQ1_M/Qwen3.8-Flash-Next-GSQ-RCO-IQ1_M-00002-of-00002.gguf \ --expert-profile data/expert-profile-coder.bin --expert-cache auto --prefill auto \ --spec 4 --spec-min-p 0.5 --mtp mtp/rt --max-context 204800 --kv q4_0 --kv-resident 32768 ``` Send any chat request. Today (21.10.) four sessions all SIGSEGV'd within the first request each (16:36, 16:38, 16:48, 16:53). Historical coredumps show the same signature on 0.2.0-beta (`--max-context 262144 --kv int8`) and 0.2.1 (with and without cvec flags), 19.–20.10. ## Crash signature (identical in all dumps) Main thread (verifier path), one of the pool threads: ``` #0 strata::kernels::cpu::native_gu_rows(NativeFmt const&, unsigned char const*, unsigned char const**, int, float const*, int, int) (strata + 0x80df47) #1 strata::kernels::cpu::ExpertPool::drain(int, ExpertScratch&, unsigned) (strata + 0x7ec7df) #2 strata::kernels::cpu::ExpertPool::run_phase(int, int) (strata + 0x7edab6) #3 strata::kernels::cpu::ExpertPool::run_split_multi_native(NativeFmt const&, ExpertJobMulti*, int) (strata + 0x7edbc1) #4 strata::core::expert_pool_dispatch_multi(...) (strata + 0x1c1035) #5 (anonymous)::drive_pool_multi(...) (strata + 0xcbc6c) #6 strata::core::Verifier::run(...) (strata + 0x2237bf) ``` The seven pool workers sit in `ExpertPool::worker → drain → native_gu_rows` at the same instruction. The log ends right after `strata verify: captured the 4-token window (upload no error, sync no error)`. ## What I ruled out - **Not VRAM pressure**: the run logs the <512 MiB warning (#2065), but the config crashes the same way with more free VRAM, and Coder IQ1_M is benchmarked stable on an RTX 4070 12 GB (#3452, #3249). - **Not a corrupt/truncated pack or GGUF**: byte sizes match upstream exactly; I parsed all 48 `native_experts.txt` rows programmatically — every `gate_off/up_off/down_off + blob_bytes` lies inside shard 1 and matches the IQ1_M block size. - **Not quant-width per se**: the same engine args on IQ3_S (same card, same host) never crash — the difference is the IQ1_M quant / coder pack. ## Coredump A full dump of the last crash (25.6 GB, zstd) is kept: `core.strata-host.1000.f8eff642fa2243969edabf71852762a0.342032.1792594314000000.zst`. Happy to upload it or run `gdb` probes (faulting address, `$pc`) if you tell me what is most useful. ## Isolation I can run on request - `STRATA_PREFILL_CPU_SHARE=0` (the crash is in the CPU expert path) - `STRATA_ROUTE_TAIL_SKIP=0` - `--spec 0` to confirm the verify path is the trigger The stack points into the native (IQ1_M) row reader — my guess is an out-of-range row pointer / a row one superblock shorter than the size the pack table promises, which load-time `slot 0 verified` would not catch.
Author
Owner

@Niko1221 commented on GitHub (Oct 26, 2026):

Thank you for the exact signature and for ruling out the pack and VRAM. Please send, from the core dump, the faulting address, $pc and the registers at the crash (gdb: info registers, x/6i $pc, and print the arguments of native_gu_rows in frame 0), and run the three isolation tests you listed: --spec 0, STRATA_PREFILL_CPU_SHARE=0 and STRATA_ROUTE_TAIL_SKIP=0, one at a time, telling us which one stops the crash. Also try STRATA_NO_AVXVNNI=1 (your CPU has no AVX-512; the AVX2 rows have a second path). The AVX2 i-quant rows were rewritten after 0.2.2, so the next release may behave differently: we will ask you to retest it.

<!-- gh-comment-id:6423262670 --> @Niko1221 commented on GitHub (Oct 26, 2026): Thank you for the exact signature and for ruling out the pack and VRAM. Please send, from the core dump, the faulting address, $pc and the registers at the crash (gdb: info registers, x/6i $pc, and print the arguments of native_gu_rows in frame 0), and run the three isolation tests you listed: --spec 0, STRATA_PREFILL_CPU_SHARE=0 and STRATA_ROUTE_TAIL_SKIP=0, one at a time, telling us which one stops the crash. Also try STRATA_NO_AVXVNNI=1 (your CPU has no AVX-512; the AVX2 rows have a second path). The AVX2 i-quant rows were rewritten after 0.2.2, so the next release may behave differently: we will ask you to retest it.
Author
Owner

@saschamarco commented on GitHub (Oct 26, 2026):

Status on 0.2.6 (engine 0.1.50): still reproduces, 5/5 sessions, engine dies on the first request

Ran your isolation tests today on Strata 0.2.6 (ships engine 0.1.50), issue repro flags (--pack coder-iq1_m --spec 4 --spec-min-p 0.5 --mtp rt --max-context 204800 --kv q4_0 --kv-resident 32768 --expert-cache auto --prefill auto), one variable per run, 3 chat requests each. Engine reached session is up / slot 0 verified every time; the first chat request SIGSEGV'd the engine in every run (proxy: the engine stopped unexpectedly (exit code -11)) — 14 SIGSEGV events logged 20:54–21:22 local.

run result
baseline (flags above) SIGSEGV on every request
--spec 0 engine rejects it for native IQ packs (is a native (IQ) pack: it needs --native SHARD1, --spec T (T >= 2)) — knob not testable as-is; ran the minimum --spec 2 instead: SIGSEGV
STRATA_PREFILL_CPU_SHARE=0 SIGSEGV
STRATA_ROUTE_TAIL_SKIP=0 SIGSEGV
STRATA_NO_AVXVNNI=1 SIGSEGV

None of the four isolation variables changes the outcome. CPU note: Ryzen 7 5700G (Zen 3): AVX2 + BMI2, no AVX-512, no AVX-VNNI — the engine banner confirms: this CPU has no AVX-512: the expert kernels run on AVX-2 (multi-token for the i-quant gate/up rows). Crashes identically with and without STRATA_NO_AVXVNNI=1.

Two complete cores, byte-identical signatures

Core A — Strata 0.2.5 / engine 0.1.50, 2026-10-25 13:33 CET, PID 1371936 (27 GB, kept; request phase; this session additionally used --control-vector-scaled ...:1.0 --control-vector-layer-range 4 44 --cvec-mode project --cvec-dir per-layer — historical cores from 0.2.0-beta/0.2.1 crash with the same signature without cvec, so cvec is not required):

#0 strata::kernels::cpu::native_gu_rows(NativeFmt const&, unsigned char const*, void const* const*, int, float* const*, int, int)   (strata + 0x80a73f)
#1 strata::kernels::cpu::ExpertPool::drain(int, ExpertScratch&, unsigned int)   (strata + 0x7ea1ab)
#2 strata::kernels::cpu::ExpertPool::worker(int)   (strata + 0x7eadd9)

SIGSEGV, si_code SI_KERNEL, si_addr = 0x0 (non-canonical store target)
faulting instruction at native_gu_rows+895:   movss %xmm1,(%rdx,%rax,1)
rdx = 0x9adca21080f44a00 (garbage store base)   rax = 0x280 (640, in-range offset)
rip 0x5626f738a73f  rsp 0x7f25195d2300  rbp 0x7f25195d25f0
rax 0x280  rbx 0x5626f74f7b60  rcx 0x0  rdx 0x9adca21080f44a00  rsi 0x7f25195d2398
rdi 0x0  r8 0x7f25195d2398  r9 0x5627943aed40  r10 0x7f1ea5000000  r11 0x246
r12 0x0  r13 0x7f1ea5000000  r14 0x5627943ff260  r15 0x7f25195d2720

Core B — Strata 0.2.6 / engine 0.1.50, 2026-10-26 21:22 CET, PID 2169521 (23.8 GB, kept; last request of the STRATA_NO_AVXVNNI=1 run):

#0 strata::kernels::cpu::native_gu_rows(...)  (strata + 0x80b73f)   [same frame, same offset +895]
#1 strata::kernels::cpu::ExpertPool::drain(int, ExpertScratch&, unsigned int)
#2 strata::kernels::cpu::ExpertPool::worker(int)

SIGSEGV, si_addr = 0x0
faulting instruction at native_gu_rows+895:   movss %xmm1,(%rdx,%rax,1)      [byte-identical to Core A]
rdx = 0xfda4a0f320ce9100 (garbage store base)   rax = 0x68 (104, in-range offset)

The store base (rdx) is garbage while the index (rax) stays in range in both dumps — the base pointer is clobbered upstream of the store, not an indexing overrun.

Bonus observation from today: two more SIGSEGVs of the same binary at 20:32/20:37 CET happened during startup expert-warmup, not request phase; the complete 20:37 core (PID 2144590) shows the same site — native_gu_rows+895, movss %xmm1,(%rdx,%rax,1), rdx = 0xa5df286c565cbb00 (garbage base), rax = 0xd4 (clean offset) — same instruction, same pattern.

Ask

Cores from 0.1.48 (0.2.4) and 0.1.50 (0.2.5, 0.2.6) all crash in this frame, so the "AVX2 i-quant rows rewritten after 0.2.2" do not appear to be in these builds — which engine build contains the rewrite? I will retest the day it ships. Both complete cores (27 GB / 23.8 GB, zstd-compressed in the systemd coredump store) are kept; I can extract any struct, scratch buffer, or register from them on request.

<!-- gh-comment-id:6427086426 --> @saschamarco commented on GitHub (Oct 26, 2026): ## Status on 0.2.6 (engine 0.1.50): still reproduces, 5/5 sessions, engine dies on the first request Ran your isolation tests today on Strata 0.2.6 (ships engine 0.1.50), issue repro flags (`--pack coder-iq1_m --spec 4 --spec-min-p 0.5 --mtp rt --max-context 204800 --kv q4_0 --kv-resident 32768 --expert-cache auto --prefill auto`), one variable per run, 3 chat requests each. Engine reached `session is up` / `slot 0 verified` every time; **the first chat request SIGSEGV'd the engine in every run** (proxy: `the engine stopped unexpectedly (exit code -11)`) — 14 SIGSEGV events logged 20:54–21:22 local. | run | result | |---|---| | baseline (flags above) | SIGSEGV on every request | | `--spec 0` | **engine rejects it for native IQ packs** (`is a native (IQ) pack: it needs --native SHARD1, --spec T (T >= 2)`) — knob not testable as-is; ran the minimum `--spec 2` instead: SIGSEGV | | `STRATA_PREFILL_CPU_SHARE=0` | SIGSEGV | | `STRATA_ROUTE_TAIL_SKIP=0` | SIGSEGV | | `STRATA_NO_AVXVNNI=1` | SIGSEGV | None of the four isolation variables changes the outcome. CPU note: Ryzen 7 5700G (Zen 3): AVX2 + BMI2, **no AVX-512, no AVX-VNNI** — the engine banner confirms: `this CPU has no AVX-512: the expert kernels run on AVX-2 (multi-token for the i-quant gate/up rows)`. Crashes identically with and without `STRATA_NO_AVXVNNI=1`. ## Two complete cores, byte-identical signatures **Core A — Strata 0.2.5 / engine 0.1.50, 2026-10-25 13:33 CET, PID 1371936** (27 GB, kept; request phase; this session additionally used `--control-vector-scaled ...:1.0 --control-vector-layer-range 4 44 --cvec-mode project --cvec-dir per-layer` — historical cores from 0.2.0-beta/0.2.1 crash with the same signature without cvec, so cvec is not required): ``` #0 strata::kernels::cpu::native_gu_rows(NativeFmt const&, unsigned char const*, void const* const*, int, float* const*, int, int) (strata + 0x80a73f) #1 strata::kernels::cpu::ExpertPool::drain(int, ExpertScratch&, unsigned int) (strata + 0x7ea1ab) #2 strata::kernels::cpu::ExpertPool::worker(int) (strata + 0x7eadd9) SIGSEGV, si_code SI_KERNEL, si_addr = 0x0 (non-canonical store target) faulting instruction at native_gu_rows+895: movss %xmm1,(%rdx,%rax,1) rdx = 0x9adca21080f44a00 (garbage store base) rax = 0x280 (640, in-range offset) rip 0x5626f738a73f rsp 0x7f25195d2300 rbp 0x7f25195d25f0 rax 0x280 rbx 0x5626f74f7b60 rcx 0x0 rdx 0x9adca21080f44a00 rsi 0x7f25195d2398 rdi 0x0 r8 0x7f25195d2398 r9 0x5627943aed40 r10 0x7f1ea5000000 r11 0x246 r12 0x0 r13 0x7f1ea5000000 r14 0x5627943ff260 r15 0x7f25195d2720 ``` **Core B — Strata 0.2.6 / engine 0.1.50, 2026-10-26 21:22 CET, PID 2169521** (23.8 GB, kept; last request of the `STRATA_NO_AVXVNNI=1` run): ``` #0 strata::kernels::cpu::native_gu_rows(...) (strata + 0x80b73f) [same frame, same offset +895] #1 strata::kernels::cpu::ExpertPool::drain(int, ExpertScratch&, unsigned int) #2 strata::kernels::cpu::ExpertPool::worker(int) SIGSEGV, si_addr = 0x0 faulting instruction at native_gu_rows+895: movss %xmm1,(%rdx,%rax,1) [byte-identical to Core A] rdx = 0xfda4a0f320ce9100 (garbage store base) rax = 0x68 (104, in-range offset) ``` The store base (`rdx`) is garbage while the index (`rax`) stays in range in both dumps — the base pointer is clobbered upstream of the store, not an indexing overrun. Bonus observation from today: two more SIGSEGVs of the same binary at 20:32/20:37 CET happened **during startup expert-warmup**, not request phase; the complete 20:37 core (PID 2144590) shows the same site — `native_gu_rows+895`, `movss %xmm1,(%rdx,%rax,1)`, `rdx = 0xa5df286c565cbb00` (garbage base), `rax = 0xd4` (clean offset) — same instruction, same pattern. ## Ask Cores from 0.1.48 (0.2.4) and 0.1.50 (0.2.5, 0.2.6) all crash in this frame, so the "AVX2 i-quant rows rewritten after 0.2.2" do not appear to be in these builds — **which engine build contains the rewrite?** I will retest the day it ships. Both complete cores (27 GB / 23.8 GB, zstd-compressed in the systemd coredump store) are kept; I can extract any struct, scratch buffer, or register from them on request.
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#1492
No description provided.