[GH-ISSUE #5173] [Engine] Xid 31 MMU fault then Xid 119/154 on RTX A4500 Laptop (sm_86), after several requests #3077

Open
opened 2026-11-07 14:37:53 +07:00 by bsakaguchi · 5 comments
Owner

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

CUDA 越界(Xid 31)—— 可直接反馈给社区 / 上游的证据包

采集时间:2026-11-03 ~ 11-04(全部来自已落盘的日志,未再对 P1 执行任何命令)
引擎:Strata engine 0.1.55(linux-x86_64-cuda-cuda13 构建)
平台:ThinkPad P1 Gen5 / RTX A4500 Laptop GPU(16 GB)/ driver 580.178.04 / CUDA 13.0 / kernel 6.14.0-27-generi


1. 一句话现象

跑若干请求后,引擎的 CUDA kernel 报 illegal memory access(越界)→ 内核报 Xid 31 MMU Fault →
CUDA context 死掉(no CUDA-capable device is detected)→ GSP 固件不再应答(Xid 119 ×3)→
Xid 154: GPU Reset Required → 该 GPU 必须物理断电复位才能恢复(warm reboot 无效,实测 5 次)。


2. 引擎日志原文(文件:~/.local/state/strata/launch/q2_0-64k.engine.log)

prefill copy_i32: an illegal memory access was encountered
dequant launch: an illegal memory access was encountered
ggml_cuda_init: failed to initialize CUDA: unknown error
ggml_cuda_init: failed to initialize CUDA: no CUDA-capable device is detected
strata generate: native embedding: cannot pin 260 MiB: no CUDA-capable device is detected, nor place it in VRAM

涉及的 kernel:prefill copy_i32 和 dequant launch —— 两者都是「把专家权重(expert weights)搬进
显存缓存槽 / 反量化」的路径(--expert-cache 槽位 + --expert-profile 排名的专家)。

同时出现的、指向 GPU 同步超时的日志(runtime/launch-q2_0-64k.server.log):

[strata] the engine stopped unexpectedly (exit code -15). Unrecoverable native verification failure:
  verify: timed out at layer 30; its GPU waits were released but the GPU did not finish within 5 s (#267)
[strata] the engine reported an error: verify: layer 2 never rang (an illegal instruction was encountered)
[strata] done: 709 tokens in 29 s (45.5 tok/s) (error, cancel=False)

引擎自带的 60 秒无进展看门狗(也会触发,但不是根因):

strata serve: no progress for 60 s during a request (reading the prompt (batched): layer 32 of the prompt chunk from token 20480) - stopping the engine so the server starts it again (issue #29)
strata serve: stall report (engine 0.1.55): stage "reading the prompt (batched): layer 32 of the prompt chunk from token 20480" for 60 s; 0 layers served since the last finished step (0 = stopped, more = slow)
strata serve: no progress for 60 s during a request (request: parking the previous conversation -1) - stopping the engine so the server starts it again (issue #29)
strata serve: stall report (engine 0.1.55): stage "request: parking the previous conversation -1" for 62 s; 0 layers served since the last finished step (0 = stopped, more = slow)

3. 内核日志原文(journalctl -k)

Xid 31(MMU Fault)—— 四次现场,越界点各不相同:

[三 11月  4 01:27:52 2026] NVRM: Xid (PCI:0000:01:00): 31, pid=8448, name=strata, channel 0x01000011,
   intr 00000000. MMU Fault: ENGINE CE2 HUBCLIENT_CE0 faulted @ 0x7547_dba20000.
   Fault is of type FAULT_INFO_TYPE_UNSUPPORTED_KIND ACCESS_TYPE_VIRT_READ

[三 11月  4 02:33:49 2026] NVRM: Xid (PCI:0000:01:00): 31, pid=3746, name=strata, channel 0x01000011,
   intr 00000000. MMU Fault: ENGINE CE2 HUBCLIENT_CE0 faulted @ 0x7c95_c3a00000.
   Fault is of type FAULT_INFO_TYPE_UNSUPPORTED_KIND ACCESS_TYPE_VIRT_READ

[三 11月  4 02:41:30 2026] NVRM: Xid (PCI:0000:01:00): 31, pid=8538, name=strata, channel 0x00000009,
   intr 00000000. MMU Fault: ENGINE GRAPHICS GPC2 GPCCLIENT_T1_6 faulted @ 0x7c98_e9600000.
   Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_READ

(更早一次)NVRM: Xid (PCI:0000:01:00): 31, pid=8448, name=strata, channel 0x00000008,
   intr 00000000. MMU Fault: ENGINE GRAPHICS GPC0 GPCCLIENT_T1_3 faulted @ 0x78c8_c1bd6000.
   Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_READ

随后的连锁(GPU 彻底失联):

NVRM: Xid (PCI:0000:01:00): 119, pid=2104, name=python3.12, Timeout after 45s of waiting for RPC
   response from GPU0 GSP! Expected function 76 (GSP_RM_CONTROL) sequence 21263 (0x20801819 0x20).
NVRM: Xid (PCI:0000:01:00): 119, pid=2104, name=python3.12, ... sequence 21264 ...
NVRM: Xid (PCI:0000:01:00): 119, pid=6856, name=strata, ... sequence 579 (0xa06f0112 0x1).
NVRM: Xid (PCI:0000:01:00): 154, GPU recovery action changed from 0x0 (None) to 0x1 (GPU Reset Required)

另有一次不同家族的越界(Xid 13,早若干小时,共 95 次):

NVRM: Xid (PCI:0000:01:00): 13, Graphics SM Warp Exception on (GPC 0, TPC 0, SM 0): Out Of Range Register
NVRM: Xid (PCI:0000:01:00): 13, Graphics SM Global Exception on (GPC 0, TPC 0, SM 0): Multiple Warp Errors
NVRM: Xid (PCI:0000:01:00): 13, Graphics Exception: ESR 0x504730=0x5000d 0x504734=0x4 0x504728=0xc81eb60 0x50472c=0x1174

→ Xid 31(MMU Fault)与 Xid 13(Out Of Range Register)是同一类越界的两种表现。

另有 PCIe 侧的相关事件(时间上紧邻,可能是同一根因的另一面):

pcieport 0000:00:1d.0: PME: Spurious native interrupt!     (出现在 Xid 119 之前 31 秒)

4. 触发条件(观察结论)

不是"单个 prompt 太大",而是"一串请求带来的专家搬运总量"。

崩点现场(02:33:49)之前 41 秒内的 5 个请求:

02:33:08  REQ n_msgs=3 tools=0  sys_len=14050 body=18537B  → 200
02:33:08  REQ n_msgs=2 tools=0  sys_len=1806  body=2209B   → 200
02:33:20  REQ n_msgs=2 tools=13 sys_len=14050 body=32033B  → 200
02:33:34  REQ n_msgs=5 tools=13 sys_len=14050 body=38639B  → 200
02:33:49  REQ n_msgs=2 tools=13 sys_len=14050 body=32981B  → 同一秒 Xid 31

每个都是 4~6K token 的全新 prefill(0 reused),都要把上万个专家 dequant + 拷进显存缓存槽:

strata serve: prompt 4636 tokens = 0 reused + 4636 read in 9259 ms (500.7 tok/s), 404 generated in 8634 ms (46.8 tok/s), ...
strata serve: expert tiers: GPU 151916 hits this request; since the start RAM 0 blobs, files 0 blobs 265169.2 MB read
strata serve: file tier I/O this request: the OS read 196.5 MB from storage (0 major faults) for 113659.5 MB of expert reads
strata serve: conversation cache: parked 5039 tokens in 138.1 ms; parked=2 bytes=773896044 evictions=2 snapshot_bytes=425857340
dequant launch: an illegal memory access was encountered      ← 崩在这

崩溃规模并不与 prompt 大小单调相关(同规模既成功过也崩过):

引擎实收 prompt token 结果
4,089 / 4,125 / 4,636 崩过(多在 4~6.5K)
4,933 / 5,903 / 6,182 / 6,293 / 6,400 成功过
7,446 / 7,744 崩过
8,155 崩过
16K 崩过(Xid 31 + Xid 119×2 + Xid 154)

4.5 崩溃前的请求序列 + 缓存事件链(两段原始日志)

A. 一次完整崩溃窗口的引擎侧事件链(从 57-token 请求一路到 dequant launch 越界)

同一段 engine.log 里连续摘出的原文(顺序即时间顺序,这是最完整的一条链):

strata serve: 6150 MiB of VRAM free with everything loaded
strata verify: capturing the 6-token window (6150 MiB of VRAM free)
strata verify: captured the 6-token window (upload no error, sync no error)
strata verify: capturing the 4-token window (6126 MiB of VRAM free)
strata verify: captured the 4-token window (upload no error, sync no error)
strata verify: capturing the 1-token window (6102 MiB of VRAM free)
strata verify: capturing the 3-token window (6080 MiB of VRAM free)
strata verify: capturing the 2-token window (6002 MiB of VRAM free)
strata verify: capturing the 5-token window (5980 MiB of VRAM free)

strata serve: prompt 57 tokens = 0 reused + 57 read in 4140 ms (13.8 tok/s), 32 generated in 1725 ms (18.6 tok/s), drafts accepted 2 of 2, 1 checkpoints
strata serve: decode expert cache hit rate: 58.9% (7497 hits / 12732 lookups)
strata serve: route tail skip: 5765 missed experts skipped (6185 entries) since the start
strata serve: expert tiers: GPU 7497 hits this request; since the start RAM 0 blobs, files 0 blobs 24584.6 MB read
strata serve: file tier I/O this request: the OS read 19908.1 MB from storage (7336 major faults) for 24584.6 MB of expert reads; page cache held 0.0 MB at the read, not 0.0 MB; io prefetch: 6561 read ahead (90...
strata serve: suffix drafts: 1 windows, 2 of 2 drafts accepted
strata serve: conversation cache: parked 88 tokens in 79.0 ms; parked=1 bytes=237387896 evictions=0 snapshot_bytes=237387896 reused_kv_bytes=0
strata serve: PCIe share: the CPU pool takes 179 us per missed expert (7.7 GB/s of expert bytes), the link 11.7 GB/s -> pcie_frac 0.45 (was 0.32; --pcie-frac N fixes it, ...)
strata serve: PCIe share: the CPU pool takes 64 us per missed expert (21.7 GB/s of expert bytes), the link 11.7 GB/s -> pcie_frac 0.25 (was 0.45; ...)

strata serve: prompt 514 tokens = 0 reused + 514 read in 4731 ms (108.7 tok/s), 138 generated in 3399 ms (40.6 tok/s), drafts accepted 8 of 15, 1 checkpoints
strata serve: decode expert cache hit rate: 73.5% (44782 hits / 60888 lookups)
strata serve: route tail skip: 14627 missed experts skipped (15148 entries) since the start
strata serve: expert tiers: GPU 44782 hits this request; since the start RAM 0 blobs, files 0 blobs 67697.5 MB read
strata serve: file tier I/O this request: the OS read 8675.3 MB from storage (5832 major faults) for 43112.9 MB of expert reads; page cache held 0.0 MB at the read, not 0.0 MB; io prefetch: 532 read ahead (735...
strata serve: suffix drafts: 5 windows, 8 of 15 drafts accepted
strata serve: conversation cache: parked 651 tokens in 81.9 ms; parked=2 bytes=482787040 evictions=0 snapshot_bytes=245399144 reused_kv_bytes=0
strata verify: capturing the 2-token window (6002 MiB of VRAM free)
strata serve: PCIe share: the CPU pool takes 59 us per missed expert (23.3 GB/s of expert bytes), the link 11.7 GB/s -> pcie_frac 0.20 (was 0.25; ...)

strata serve: prompt 7744 tokens = 0 reused + 7744 read in 14866 ms (520.9 tok/s), 128 generated in 2992 ms (42.8 tok/s), drafts accepted 1 of 7, 1 checkpoints
strata serve: decode expert cache hit rate: 77.0% (43798 hits / 56899 lookups)
strata serve: route tail skip: 22227 missed experts skipped (22816 entries) since the start
strata serve: expert tiers: GPU 43798 hits this request; since the start RAM 0 blobs, files 0 blobs 151509.7 MB read
strata serve: file tier I/O this request: the OS read 9132.6 MB from storage (4751 major faults) for 83812.1 MB of expert reads; page cache held 0.0 MB at the read, not 0.0 MB; io prefetch: 0 read ahead (0.0
strata serve: suffix drafts: 3 windows, 1 of 7 drafts accepted
strata serve: conversation cache: parked 7871 tokens in 119.5 ms; parked=2 bytes=593437848 evictions=1 snapshot_bytes=348038704 reused_kv_bytes=0
strata verify: capturing the 5-token window (5980 MiB of VRAM free)
strata verify: captured the 5-token window (upload no error, sync no error)

strata serve: prompt 4636 tokens = 0 reused + 4636 read in 9259 ms (500.7 tok/s), 404 generated in 8634 ms (46.8 tok/s), drafts accepted 82 of 135, 2 checkpoints
strata serve: decode expert cache hit rate: 77.3% (151916 hits / 196453 lookups)
strata serve: route tail skip: 44790 missed experts skipped (45940 entries) since the start
strata serve: expert tiers: GPU 151916 hits this request; since the start RAM 0 blobs, files 0 blobs 265169.2 MB read
strata serve: file tier I/O this request: the OS read 196.5 MB from storage (0 major faults) for 113659.5 MB of expert reads; page cache held 0.0 MB at the read, not 0.0 MB; io prefetch: 0 read ahead (0.0
strata serve: suffix drafts: 42 windows, 82 of 135 drafts accepted
strata serve: conversation cache: parked 5039 tokens in 138.1 ms; parked=2 bytes=773896044 evictions=2 snapshot_bytes=425857340 reused_kv_bytes=0
dequant launch: an illegal memory access was encountered          ← 崩在这

把这条链压成一张表(关键列:专家回填量 / 缓存事件 / PCIe 分担比例):

# prompt 解码专家命中 累计专家读取 本请求 SSD 实读 route tail skip(累计) PCIe 分担 pcie_frac 对话缓存事件
1 57 tok 58.9% 24,584 MB 19,908 MB / 7,336 major faults 5,765 0.45 → 0.25 parked 88 tok,evictions=0
2 514 tok 73.5% 67,697 MB 8,675 MB / 5,832 major faults 14,627 0.25 → 0.20 parked 651 tok,evictions=0
3 7,744 tok 77.0% 151,509 MB 9,132 MB / 4,751 major faults 22,227 0.20 parked 7,871 tok,evictions=1
4 4,636 tok 77.3% 265,169 MB 196 MB / 0 major faults 44,790 — parked 5,039 tok,evictions=2
— — — — — — — dequant launch: illegal memory access

三个可疑的相关量:

  1. evictions 从 0 → 1 → 2:对话缓存开始连续 evict(= 把旧会话快照从显存拷回主机、或把 KV 搬进/搬出缓存槽),
    越界就发生在第二次 evict 之后的下一个请求上。快照大小 348 MB / 425 MB。
  2. 专家回填量一路涨到 265 GB(本机 62 GiB RAM,页缓存装不下 38 GB 的 experts.bin → 反复 major fault)。
    第 1 个请求 SSD 读 19.9 GB / 7,336 major faults。
  3. pcie_frac 连续下调 0.45 → 0.25 → 0.20:引擎发现 PCIe 跟不上,把更多专家计算推给 CPU 池
    ("the CPU pool takes 59 us per missed expert")——搬运路径的压力在向 CPU 侧转移,
    而 copy_i32 / dequant launch 正是这条搬运链路上的 kernel。

B. 02:33:49 那次 Xid 31 的客户端请求序列(41 秒 5 个请求)

来自 ~/strata-shim-agent.log(8082,opencode 的入口):

[shim 02:33:08] REQ model=qwen3.8-flash-next-q2_0 stream=True max_tokens=None n_msgs=3 tools=0  sys_len=14050 body=18537B
[shim 02:33:08] prompt trimmed(keep-6): 16835 chars (~7030 tok) -> budget 3000 tok / 20000 chars
[shim 02:33:08] POST /v1/chat/completions
[shim 02:33:08] REQ model=qwen3.8-flash-next-q2_0 stream=True max_tokens=None n_msgs=2 tools=0  sys_len=1806  body=2209B
[shim 02:33:08] POST /v1/chat/completions
[shim 02:33:16] RESP status=200 ctype=text/event-stream first=data: {"id": "chatcmpl-ab6622cf5abb4c788dd537e3", ...
[shim 02:33:20] REQ model=qwen3.8-flash-next-q2_0 stream=True max_tokens=None n_msgs=2 tools=13 sys_len=14050 body=32033B
[shim 02:33:20] prompt trimmed(keep-6): 14868 chars (~6240 tok) -> budget 3000 tok / 20000 chars
[shim 02:33:20] POST /v1/chat/completions
[shim 02:33:22] RESP status=200 ctype=text/event-stream first=data: {"id": "chatcmpl-5543e11c415e4fe9beda56b1", ...
[shim 02:33:33] RESP status=200 ctype=text/event-stream first=data: {"id": "chatcmpl-0cf489e283cf4e59b5b2d852", ...
[shim 02:33:34] REQ model=qwen3.8-flash-next-q2_0 stream=True max_tokens=None n_msgs=5 tools=13 sys_len=14050 body=38639B
[shim 02:33:34] prompt trimmed(keep-6): 20940 chars (~8669 tok) -> budget 3000 tok / 20000 chars
[shim 02:33:34] POST /v1/chat/completions
[shim 02:33:39] RESP status=200 ctype=text/event-stream first=data: {"id": "chatcmpl-4491e3cfa83845a79324461a", ...
[shim 02:33:49] REQ model=qwen3.8-flash-next-q2_0 stream=True max_tokens=None n_msgs=2 tools=13 sys_len=14050 body=32981B
[shim 02:33:49] prompt trimmed(keep-6): 15806 chars (~6615 tok) -> budget 3000 tok / 20000 chars
[shim 02:33:49] POST /v1/chat/completions
              ↑ 同一秒:NVRM: Xid 31 ... MMU Fault: ENGINE CE2 HUBCLIENT_CE0 faulted @ 0x7c95_c3a00000
[shim 02:33:50] RESP status=200 ctype=text/event-stream first=data: {"id": "chatcmpl-39ff24cfa83845a79324461a", ...
时刻 请求 n_msgs tools body 裁剪后(估算)
02:33:08 #1 3 0 18,537 B 16,835 chars ≈ 7,030 tok → 预算 3,000
02:33:08 #2(并发) 2 0 2,209 B sys 仅 1,806 字符(小请求)
02:33:20 #3 2 13 32,033 B 14,868 chars ≈ 6,240 tok → 3,000
02:33:34 #4 5 13 38,639 B 20,940 chars ≈ 8,669 tok → 3,000
02:33:49 #5 → Xid 31 2 13 32,981 B 15,806 chars ≈ 6,615 tok → 3,000

要点:

  • 41 秒 5 个请求,其中 #1/#2 同秒并发(#2 是另一个 system 只有 1,806 字符的小请求,像是"标题生成/旁路"这类副请求)
  • 每个请求都是"全新 prefill"(引擎侧 0 reused)→ 每个都要重新回填专家
  • 带 13 个工具 schema 的请求(#3/#4/#5)比不带工具的(#1/#2)路由更分散 → 需要回填的专家更多
  • 崩溃发生在连续 5 个请求的第 5 个上,前 4 个都正常返回 200(流式的第一个 chunk 都到了)

C. 对照组:加大专家缓存后的同一类序列(不再崩)

同一台机器、同一模型,只把 --expert-cache 4096 → 6000 之后,同样的请求模式:

strata serve: prompt 6304 tokens = 0 reused + 6304 read in 12155 ms (518.6 tok/s), 64 generated in 1464 ms (43.7 tok/s), drafts accepted 0 of 3, 1 checkpoints
strata serve: prompt 6304 tokens = 6299 reused + 5 read in 50 ms (99.4 tok/s), 64 generated in 1215 ms (52.7 tok/s), drafts accepted 17 of 21, 1 checkpoints
strata serve: prompt 6304 tokens = 6299 reused + 5 read in 46 ms (108.5 tok/s), 64 generated in 1089 ms (58.8 tok/s), drafts accepted 21 of 25, 1 checkpoints
strata serve: decode expert cache hit rate: 85.6% (25676 hits / 29982 lookups)
strata serve: file tier I/O this request: the OS read 1.9 MB from storage (0 major faults) for 6323.1 MB of expert reads
指标 崩的那次(cache 4096) 现在(cache 6000)
专家搬运(单请求) 113,659 MB 6,323 MB
SSD 实读 19,908 MB / 7,336 major faults 1.9 MB / 0 major faults
命中率 58.9~77.3% 79.3~85.6%
对话缓存 evict evictions=1 → evictions=2 已关闭(--conversation-cache-mib 0)
结果 Xid 31 → Xid 119 → Xid 154,GPU 死 无 Xid,重复请求 1.1~1.3 s(6299 token 复用)

→ 给上游的量化线索:越界的触发量级大约是"单请求 6 万 MB 以上专家搬运 + 连续 evict + PCIe 分担比例下调";
把搬运量降一个数量级、去掉 evict,就不复现。


5. 环境(复现用)

engine     : 0.1.55  linux-x86_64-cuda-cuda13
driver     : 580.178.04  (Tue Jul 7 12:38:21 UTC 2026)
CUDA       : 13.0
GPU        : NVIDIA RTX A4500 Laptop GPU, 16384 MiB, sm_86 (compute capability 8.6)
cpu        : x86_64,**无 AVX-512**(引擎日志:"this CPU has no AVX-512: the expert kernels run on
            AVX-2 (multi-token for the i-quant gate/up rows)");9 个 expert-pool worker + 1 个 host 线程
RAM / swap : 62 GiB / 8 GiB
PCIe       : 链路 16.0 GT/s,host→device 实测 11.7 GB/s(pcie_frac 0.32)
kernel     : 6.14.0-27-generi (Ubuntu, GNOME 46.4)

模型与包:Qwen3.8-Flash-Next Q2_0(MoE)

  • --native shard1 35.0 GB,--ple-gguf shard2 26.8 GB(内含 PLE 表 320,001,536 行 × 90 B)
  • --expert-profile:24,576 个排名专家对
  • experts 经 --mmap-experts 从 ~38 GB 的 experts.bin 流式读取(file tier)

崩溃时的引擎参数:

strata --serve --pack /home/eagle/packs/q2_0
  --native /home/eagle/models/Q2_0/Qwen3.8-Flash-Next-GSQ-RCO-Q2_0-00001-of-00002.gguf
  --ple-gguf /home/eagle/models/Q2_0/Qwen3.8-Flash-Next-GSQ-RCO-Q2_0-00002-of-00002.gguf
  --expert-profile /home/eagle/.local/share/strata/terminal/0.1.55/data/expert-profile.bin
  --expert-cache 4096            # 崩溃时;后调到 6000
  --prefill auto                 # 崩溃时(auto→8192/16384);后固定 4096
  --spec 4 --kv-grow             # 崩溃时带 --kv-grow;后关掉
  --max-context 65536            # 崩溃时;后改 32768
  --kv int8 --mmap-experts --vision --pool-workers 9
  --conversation-cache-mib 2048 --conversation-cache-slots 2 --conversation-cache-min-free-mib 2048

6. 已尝试的规避(有效降低概率,但非根治)

措施 效果
--expert-cache 4096 → 6000 专家搬运量 113,659 MB → 6,323~8,686 MB;解码命中率 77.3% → 79.3~85.6%;SSD 实读 19,908 MB/7,336 major faults → 1.5~1.9 MB/0 major faults
--conversation-cache-mib 0(关 park/evict) 去掉"快照拷贝"这条同族崩溃路径(--prompt-cache 增量复用不受影响)
--kv-grow 关闭 去掉"专家缓存让槽迁移"这条路径(32K 的 K/V 只要 0.42 GiB)
--prefill 4096(原 auto→16384) prefill 分块变小
--max-context 32768(原 65536) 上下文占用减半
pcie_aspm=off + GPU 常驻 D0 修掉另一条独立的挂死路径("空闲→第一次干活"),与本越界无关但同期存在
shim 侧按 token 限幅(3000~5000 est) 把引擎收到的 prompt 压在 57K token

7. 希望上游帮忙看的点

  1. prefill copy_i32 与 dequant launch 的越界点:怀疑是专家槽位索引 / offset 计算在某种形状或对齐下越界
    (Xid 31 的 fault 地址落在 0x7c95_c3a00000 / 0x7547_dba20000 一带,且越界 engine 通道每次不同:
    CE2 HUBCLIENT_CE0 / GRAPHICS GPC2 GPCCLIENT_T1_6 / GRAPHICS GPC0 GPCCLIENT_T1_3)。
  2. 是否与"专家被反复搬迁/迁移"相关:崩溃前总能看到 73 hotter experts moved to colder ones' slots、
    evictions=2/3、parked ... snapshot_bytes=425 MB 之类的事件。
  3. 是否只在 laptop dGPU / 无 AVX-512 的 AVX-2 路径上出现(本机始终走 AVX-2 的 i-quant gate/up kernel)。
  4. 有没有规避开关:例如关掉某条"自适应专家槽位迁移"路径、或把 slot 迁移走 CPU/分块拷贝,能否避免越界。
  5. 顺带反馈一个次要问题:the engine stopped unexpectedly (exit code -15) 报的是
    verify: timed out at layer 30 ... the GPU did not finish within 5 s (#267),
    实际根因是内核侧的 Xid 31 —— 引擎无法从 kernel 越界里恢复,只能自杀重启,随后 GPU 又因 GSP 超时被判死。

8. 相关日志位置(复现/取证用)

内容 路径
引擎日志(含 copy_i32 / dequant launch 越界原文) ~/.local/state/strata/launch/q2_0-64k.engine.log
请求级日志(token 数、finish_reason、watchdog 消息) ~/.local/state/strata/runtime/launch-q2_0-64k.server.log
运行时 stdout ~/strata-runtime.log
内核(Xid 31/119/154/13、PME) journalctl -k(普通用户可读)
上一开机 journalctl -k -b -1
shim 请求流水 ~/strata-shim.log(8081)、~/strata-shim-agent.log(8082)
看门狗动作 / 断电告警 ~/.strata/gpu-watchdog.log、~/strata-gpu-alert.txt
引擎参数(生效值) ~/.local/state/strata/launch/q2_0-64k.json、~/.strata/effective-args.txt
Originally created by @eagle717 on GitHub (Nov 4, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5173 # CUDA 越界(Xid 31)—— 可直接反馈给社区 / 上游的证据包 > 采集时间:2026-11-03 ~ 11-04(全部来自已落盘的日志,未再对 P1 执行任何命令) > 引擎:Strata engine **0.1.55**(`linux-x86_64-cuda-cuda13` 构建) > 平台:ThinkPad P1 Gen5 / RTX A4500 **Laptop** GPU(16 GB)/ driver 580.178.04 / CUDA 13.0 / kernel 6.14.0-27-generi --- ## 1. 一句话现象 跑若干请求后,引擎的 CUDA kernel 报 **illegal memory access**(越界)→ 内核报 **Xid 31 MMU Fault** → CUDA context 死掉(`no CUDA-capable device is detected`)→ **GSP 固件不再应答**(Xid 119 ×3)→ **Xid 154: GPU Reset Required** → 该 GPU 必须**物理断电复位**才能恢复(warm reboot 无效,实测 5 次)。 --- ## 2. 引擎日志原文(文件:`~/.local/state/strata/launch/q2_0-64k.engine.log`) ``` prefill copy_i32: an illegal memory access was encountered dequant launch: an illegal memory access was encountered ggml_cuda_init: failed to initialize CUDA: unknown error ggml_cuda_init: failed to initialize CUDA: no CUDA-capable device is detected strata generate: native embedding: cannot pin 260 MiB: no CUDA-capable device is detected, nor place it in VRAM ``` **涉及的 kernel:`prefill copy_i32` 和 `dequant launch`** —— 两者都是「把专家权重(expert weights)搬进 显存缓存槽 / 反量化」的路径(`--expert-cache` 槽位 + `--expert-profile` 排名的专家)。 同时出现的、指向 GPU 同步超时的日志(`runtime/launch-q2_0-64k.server.log`): ``` [strata] the engine stopped unexpectedly (exit code -15). Unrecoverable native verification failure: verify: timed out at layer 30; its GPU waits were released but the GPU did not finish within 5 s (#267) [strata] the engine reported an error: verify: layer 2 never rang (an illegal instruction was encountered) [strata] done: 709 tokens in 29 s (45.5 tok/s) (error, cancel=False) ``` 引擎自带的 60 秒无进展看门狗(也会触发,但**不是根因**): ``` strata serve: no progress for 60 s during a request (reading the prompt (batched): layer 32 of the prompt chunk from token 20480) - stopping the engine so the server starts it again (issue #29) strata serve: stall report (engine 0.1.55): stage "reading the prompt (batched): layer 32 of the prompt chunk from token 20480" for 60 s; 0 layers served since the last finished step (0 = stopped, more = slow) strata serve: no progress for 60 s during a request (request: parking the previous conversation -1) - stopping the engine so the server starts it again (issue #29) strata serve: stall report (engine 0.1.55): stage "request: parking the previous conversation -1" for 62 s; 0 layers served since the last finished step (0 = stopped, more = slow) ``` --- ## 3. 内核日志原文(`journalctl -k`) **Xid 31(MMU Fault)—— 四次现场,越界点各不相同:** ``` [三 11月 4 01:27:52 2026] NVRM: Xid (PCI:0000:01:00): 31, pid=8448, name=strata, channel 0x01000011, intr 00000000. MMU Fault: ENGINE CE2 HUBCLIENT_CE0 faulted @ 0x7547_dba20000. Fault is of type FAULT_INFO_TYPE_UNSUPPORTED_KIND ACCESS_TYPE_VIRT_READ [三 11月 4 02:33:49 2026] NVRM: Xid (PCI:0000:01:00): 31, pid=3746, name=strata, channel 0x01000011, intr 00000000. MMU Fault: ENGINE CE2 HUBCLIENT_CE0 faulted @ 0x7c95_c3a00000. Fault is of type FAULT_INFO_TYPE_UNSUPPORTED_KIND ACCESS_TYPE_VIRT_READ [三 11月 4 02:41:30 2026] NVRM: Xid (PCI:0000:01:00): 31, pid=8538, name=strata, channel 0x00000009, intr 00000000. MMU Fault: ENGINE GRAPHICS GPC2 GPCCLIENT_T1_6 faulted @ 0x7c98_e9600000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_READ (更早一次)NVRM: Xid (PCI:0000:01:00): 31, pid=8448, name=strata, channel 0x00000008, intr 00000000. MMU Fault: ENGINE GRAPHICS GPC0 GPCCLIENT_T1_3 faulted @ 0x78c8_c1bd6000. Fault is of type FAULT_PDE ACCESS_TYPE_VIRT_READ ``` **随后的连锁(GPU 彻底失联):** ``` NVRM: Xid (PCI:0000:01:00): 119, pid=2104, name=python3.12, Timeout after 45s of waiting for RPC response from GPU0 GSP! Expected function 76 (GSP_RM_CONTROL) sequence 21263 (0x20801819 0x20). NVRM: Xid (PCI:0000:01:00): 119, pid=2104, name=python3.12, ... sequence 21264 ... NVRM: Xid (PCI:0000:01:00): 119, pid=6856, name=strata, ... sequence 579 (0xa06f0112 0x1). NVRM: Xid (PCI:0000:01:00): 154, GPU recovery action changed from 0x0 (None) to 0x1 (GPU Reset Required) ``` **另有一次不同家族的越界(Xid 13,早若干小时,共 95 次):** ``` NVRM: Xid (PCI:0000:01:00): 13, Graphics SM Warp Exception on (GPC 0, TPC 0, SM 0): Out Of Range Register NVRM: Xid (PCI:0000:01:00): 13, Graphics SM Global Exception on (GPC 0, TPC 0, SM 0): Multiple Warp Errors NVRM: Xid (PCI:0000:01:00): 13, Graphics Exception: ESR 0x504730=0x5000d 0x504734=0x4 0x504728=0xc81eb60 0x50472c=0x1174 ``` → Xid 31(MMU Fault)与 Xid 13(Out Of Range Register)**是同一类越界的两种表现**。 **另有 PCIe 侧的相关事件(时间上紧邻,可能是同一根因的另一面):** ``` pcieport 0000:00:1d.0: PME: Spurious native interrupt! (出现在 Xid 119 之前 31 秒) ``` --- ## 4. 触发条件(观察结论) **不是"单个 prompt 太大",而是"一串请求带来的专家搬运总量"。** 崩点现场(02:33:49)之前 41 秒内的 5 个请求: ``` 02:33:08 REQ n_msgs=3 tools=0 sys_len=14050 body=18537B → 200 02:33:08 REQ n_msgs=2 tools=0 sys_len=1806 body=2209B → 200 02:33:20 REQ n_msgs=2 tools=13 sys_len=14050 body=32033B → 200 02:33:34 REQ n_msgs=5 tools=13 sys_len=14050 body=38639B → 200 02:33:49 REQ n_msgs=2 tools=13 sys_len=14050 body=32981B → 同一秒 Xid 31 ``` 每个都是 4~6K token 的**全新 prefill(`0 reused`)**,都要把上万个专家 dequant + 拷进显存缓存槽: ``` strata serve: prompt 4636 tokens = 0 reused + 4636 read in 9259 ms (500.7 tok/s), 404 generated in 8634 ms (46.8 tok/s), ... strata serve: expert tiers: GPU 151916 hits this request; since the start RAM 0 blobs, files 0 blobs 265169.2 MB read strata serve: file tier I/O this request: the OS read 196.5 MB from storage (0 major faults) for 113659.5 MB of expert reads strata serve: conversation cache: parked 5039 tokens in 138.1 ms; parked=2 bytes=773896044 evictions=2 snapshot_bytes=425857340 dequant launch: an illegal memory access was encountered ← 崩在这 ``` 崩溃规模并不与 prompt 大小单调相关(**同规模既成功过也崩过**): | 引擎实收 prompt token | 结果 | |---|---| | 4,089 / 4,125 / 4,636 | 崩过(多在 4~6.5K) | | 4,933 / 5,903 / 6,182 / 6,293 / 6,400 | 成功过 | | 7,446 / 7,744 | 崩过 | | 8,155 | 崩过 | | 16K | 崩过(Xid 31 + Xid 119×2 + Xid 154) | --- ## 4.5 崩溃前的请求序列 + 缓存事件链(两段原始日志) ### A. 一次完整崩溃窗口的引擎侧事件链(从 57-token 请求一路到 `dequant launch` 越界) 同一段 `engine.log` 里连续摘出的原文(**顺序即时间顺序**,这是最完整的一条链): ``` strata serve: 6150 MiB of VRAM free with everything loaded strata verify: capturing the 6-token window (6150 MiB of VRAM free) strata verify: captured the 6-token window (upload no error, sync no error) strata verify: capturing the 4-token window (6126 MiB of VRAM free) strata verify: captured the 4-token window (upload no error, sync no error) strata verify: capturing the 1-token window (6102 MiB of VRAM free) strata verify: capturing the 3-token window (6080 MiB of VRAM free) strata verify: capturing the 2-token window (6002 MiB of VRAM free) strata verify: capturing the 5-token window (5980 MiB of VRAM free) strata serve: prompt 57 tokens = 0 reused + 57 read in 4140 ms (13.8 tok/s), 32 generated in 1725 ms (18.6 tok/s), drafts accepted 2 of 2, 1 checkpoints strata serve: decode expert cache hit rate: 58.9% (7497 hits / 12732 lookups) strata serve: route tail skip: 5765 missed experts skipped (6185 entries) since the start strata serve: expert tiers: GPU 7497 hits this request; since the start RAM 0 blobs, files 0 blobs 24584.6 MB read strata serve: file tier I/O this request: the OS read 19908.1 MB from storage (7336 major faults) for 24584.6 MB of expert reads; page cache held 0.0 MB at the read, not 0.0 MB; io prefetch: 6561 read ahead (90... strata serve: suffix drafts: 1 windows, 2 of 2 drafts accepted strata serve: conversation cache: parked 88 tokens in 79.0 ms; parked=1 bytes=237387896 evictions=0 snapshot_bytes=237387896 reused_kv_bytes=0 strata serve: PCIe share: the CPU pool takes 179 us per missed expert (7.7 GB/s of expert bytes), the link 11.7 GB/s -> pcie_frac 0.45 (was 0.32; --pcie-frac N fixes it, ...) strata serve: PCIe share: the CPU pool takes 64 us per missed expert (21.7 GB/s of expert bytes), the link 11.7 GB/s -> pcie_frac 0.25 (was 0.45; ...) strata serve: prompt 514 tokens = 0 reused + 514 read in 4731 ms (108.7 tok/s), 138 generated in 3399 ms (40.6 tok/s), drafts accepted 8 of 15, 1 checkpoints strata serve: decode expert cache hit rate: 73.5% (44782 hits / 60888 lookups) strata serve: route tail skip: 14627 missed experts skipped (15148 entries) since the start strata serve: expert tiers: GPU 44782 hits this request; since the start RAM 0 blobs, files 0 blobs 67697.5 MB read strata serve: file tier I/O this request: the OS read 8675.3 MB from storage (5832 major faults) for 43112.9 MB of expert reads; page cache held 0.0 MB at the read, not 0.0 MB; io prefetch: 532 read ahead (735... strata serve: suffix drafts: 5 windows, 8 of 15 drafts accepted strata serve: conversation cache: parked 651 tokens in 81.9 ms; parked=2 bytes=482787040 evictions=0 snapshot_bytes=245399144 reused_kv_bytes=0 strata verify: capturing the 2-token window (6002 MiB of VRAM free) strata serve: PCIe share: the CPU pool takes 59 us per missed expert (23.3 GB/s of expert bytes), the link 11.7 GB/s -> pcie_frac 0.20 (was 0.25; ...) strata serve: prompt 7744 tokens = 0 reused + 7744 read in 14866 ms (520.9 tok/s), 128 generated in 2992 ms (42.8 tok/s), drafts accepted 1 of 7, 1 checkpoints strata serve: decode expert cache hit rate: 77.0% (43798 hits / 56899 lookups) strata serve: route tail skip: 22227 missed experts skipped (22816 entries) since the start strata serve: expert tiers: GPU 43798 hits this request; since the start RAM 0 blobs, files 0 blobs 151509.7 MB read strata serve: file tier I/O this request: the OS read 9132.6 MB from storage (4751 major faults) for 83812.1 MB of expert reads; page cache held 0.0 MB at the read, not 0.0 MB; io prefetch: 0 read ahead (0.0 strata serve: suffix drafts: 3 windows, 1 of 7 drafts accepted strata serve: conversation cache: parked 7871 tokens in 119.5 ms; parked=2 bytes=593437848 evictions=1 snapshot_bytes=348038704 reused_kv_bytes=0 strata verify: capturing the 5-token window (5980 MiB of VRAM free) strata verify: captured the 5-token window (upload no error, sync no error) strata serve: prompt 4636 tokens = 0 reused + 4636 read in 9259 ms (500.7 tok/s), 404 generated in 8634 ms (46.8 tok/s), drafts accepted 82 of 135, 2 checkpoints strata serve: decode expert cache hit rate: 77.3% (151916 hits / 196453 lookups) strata serve: route tail skip: 44790 missed experts skipped (45940 entries) since the start strata serve: expert tiers: GPU 151916 hits this request; since the start RAM 0 blobs, files 0 blobs 265169.2 MB read strata serve: file tier I/O this request: the OS read 196.5 MB from storage (0 major faults) for 113659.5 MB of expert reads; page cache held 0.0 MB at the read, not 0.0 MB; io prefetch: 0 read ahead (0.0 strata serve: suffix drafts: 42 windows, 82 of 135 drafts accepted strata serve: conversation cache: parked 5039 tokens in 138.1 ms; parked=2 bytes=773896044 evictions=2 snapshot_bytes=425857340 reused_kv_bytes=0 dequant launch: an illegal memory access was encountered ← 崩在这 ``` **把这条链压成一张表(关键列:专家回填量 / 缓存事件 / PCIe 分担比例):** | # | prompt | 解码专家命中 | 累计专家读取 | 本请求 SSD 实读 | route tail skip(累计) | PCIe 分担 pcie_frac | **对话缓存事件** | |---|---|---|---|---|---|---|---| | 1 | 57 tok | 58.9% | 24,584 MB | **19,908 MB / 7,336 major faults** | 5,765 | 0.45 → 0.25 | parked 88 tok,`evictions=0` | | 2 | 514 tok | 73.5% | 67,697 MB | 8,675 MB / 5,832 major faults | 14,627 | 0.25 → 0.20 | parked 651 tok,`evictions=0` | | 3 | **7,744 tok** | 77.0% | 151,509 MB | 9,132 MB / 4,751 major faults | 22,227 | 0.20 | parked 7,871 tok,**`evictions=1`** | | 4 | 4,636 tok | 77.3% | 265,169 MB | 196 MB / 0 major faults | 44,790 | — | parked 5,039 tok,**`evictions=2`** | | — | — | — | — | — | — | — | **`dequant launch: illegal memory access`** | **三个可疑的相关量:** 1. **`evictions` 从 0 → 1 → 2**:对话缓存开始**连续 evict**(= 把旧会话快照从显存拷回主机、或把 KV 搬进/搬出缓存槽), **越界就发生在第二次 evict 之后的下一个请求**上。快照大小 348 MB / 425 MB。 2. **专家回填量一路涨到 265 GB**(本机 62 GiB RAM,页缓存装不下 38 GB 的 experts.bin → 反复 major fault)。 第 1 个请求 SSD 读 **19.9 GB / 7,336 major faults**。 3. **`pcie_frac` 连续下调 0.45 → 0.25 → 0.20**:引擎发现 PCIe 跟不上,把更多专家计算推给 CPU 池 ("the CPU pool takes 59 us per missed expert")——**搬运路径的压力在向 CPU 侧转移**, 而 `copy_i32` / `dequant launch` 正是这条搬运链路上的 kernel。 ### B. 02:33:49 那次 Xid 31 的客户端请求序列(41 秒 5 个请求) 来自 `~/strata-shim-agent.log`(8082,opencode 的入口): ``` [shim 02:33:08] REQ model=qwen3.8-flash-next-q2_0 stream=True max_tokens=None n_msgs=3 tools=0 sys_len=14050 body=18537B [shim 02:33:08] prompt trimmed(keep-6): 16835 chars (~7030 tok) -> budget 3000 tok / 20000 chars [shim 02:33:08] POST /v1/chat/completions [shim 02:33:08] REQ model=qwen3.8-flash-next-q2_0 stream=True max_tokens=None n_msgs=2 tools=0 sys_len=1806 body=2209B [shim 02:33:08] POST /v1/chat/completions [shim 02:33:16] RESP status=200 ctype=text/event-stream first=data: {"id": "chatcmpl-ab6622cf5abb4c788dd537e3", ... [shim 02:33:20] REQ model=qwen3.8-flash-next-q2_0 stream=True max_tokens=None n_msgs=2 tools=13 sys_len=14050 body=32033B [shim 02:33:20] prompt trimmed(keep-6): 14868 chars (~6240 tok) -> budget 3000 tok / 20000 chars [shim 02:33:20] POST /v1/chat/completions [shim 02:33:22] RESP status=200 ctype=text/event-stream first=data: {"id": "chatcmpl-5543e11c415e4fe9beda56b1", ... [shim 02:33:33] RESP status=200 ctype=text/event-stream first=data: {"id": "chatcmpl-0cf489e283cf4e59b5b2d852", ... [shim 02:33:34] REQ model=qwen3.8-flash-next-q2_0 stream=True max_tokens=None n_msgs=5 tools=13 sys_len=14050 body=38639B [shim 02:33:34] prompt trimmed(keep-6): 20940 chars (~8669 tok) -> budget 3000 tok / 20000 chars [shim 02:33:34] POST /v1/chat/completions [shim 02:33:39] RESP status=200 ctype=text/event-stream first=data: {"id": "chatcmpl-4491e3cfa83845a79324461a", ... [shim 02:33:49] REQ model=qwen3.8-flash-next-q2_0 stream=True max_tokens=None n_msgs=2 tools=13 sys_len=14050 body=32981B [shim 02:33:49] prompt trimmed(keep-6): 15806 chars (~6615 tok) -> budget 3000 tok / 20000 chars [shim 02:33:49] POST /v1/chat/completions ↑ 同一秒:NVRM: Xid 31 ... MMU Fault: ENGINE CE2 HUBCLIENT_CE0 faulted @ 0x7c95_c3a00000 [shim 02:33:50] RESP status=200 ctype=text/event-stream first=data: {"id": "chatcmpl-39ff24cfa83845a79324461a", ... ``` | 时刻 | 请求 | n_msgs | tools | body | 裁剪后(估算) | |---|---|---|---|---|---| | 02:33:08 | #1 | 3 | 0 | 18,537 B | 16,835 chars ≈ 7,030 tok → 预算 3,000 | | 02:33:08 | #2(并发) | 2 | 0 | 2,209 B | sys 仅 1,806 字符(小请求) | | 02:33:20 | #3 | 2 | **13** | 32,033 B | 14,868 chars ≈ 6,240 tok → 3,000 | | 02:33:34 | #4 | 5 | **13** | 38,639 B | 20,940 chars ≈ 8,669 tok → 3,000 | | 02:33:49 | #5 → **Xid 31** | 2 | **13** | 32,981 B | 15,806 chars ≈ 6,615 tok → 3,000 | 要点: - **41 秒 5 个请求**,其中 #1/#2 同秒并发(#2 是另一个 system 只有 1,806 字符的小请求,像是"标题生成/旁路"这类副请求) - **每个请求都是"全新 prefill"**(引擎侧 `0 reused`)→ 每个都要重新回填专家 - 带 **13 个工具 schema** 的请求(#3/#4/#5)比不带工具的(#1/#2)路由更分散 → 需要回填的专家更多 - 崩溃发生在**连续 5 个请求的第 5 个**上,前 4 个都正常返回 200(流式的第一个 chunk 都到了) ### C. 对照组:加大专家缓存后的同一类序列(**不再崩**) 同一台机器、同一模型,只把 `--expert-cache` 4096 → 6000 之后,同样的请求模式: ``` strata serve: prompt 6304 tokens = 0 reused + 6304 read in 12155 ms (518.6 tok/s), 64 generated in 1464 ms (43.7 tok/s), drafts accepted 0 of 3, 1 checkpoints strata serve: prompt 6304 tokens = 6299 reused + 5 read in 50 ms (99.4 tok/s), 64 generated in 1215 ms (52.7 tok/s), drafts accepted 17 of 21, 1 checkpoints strata serve: prompt 6304 tokens = 6299 reused + 5 read in 46 ms (108.5 tok/s), 64 generated in 1089 ms (58.8 tok/s), drafts accepted 21 of 25, 1 checkpoints strata serve: decode expert cache hit rate: 85.6% (25676 hits / 29982 lookups) strata serve: file tier I/O this request: the OS read 1.9 MB from storage (0 major faults) for 6323.1 MB of expert reads ``` | 指标 | 崩的那次(cache 4096) | 现在(cache 6000) | |---|---|---| | 专家搬运(单请求) | 113,659 MB | **6,323 MB** | | SSD 实读 | 19,908 MB / 7,336 major faults | **1.9 MB / 0 major faults** | | 命中率 | 58.9~77.3% | **79.3~85.6%** | | 对话缓存 evict | `evictions=1` → `evictions=2` | 已关闭(`--conversation-cache-mib 0`) | | 结果 | **Xid 31 → Xid 119 → Xid 154,GPU 死** | 无 Xid,重复请求 1.1~1.3 s(6299 token 复用) | → **给上游的量化线索**:越界的触发量级大约是"单请求 6 万 MB 以上专家搬运 + 连续 evict + PCIe 分担比例下调"; 把搬运量降一个数量级、去掉 evict,就不复现。 --- ## 5. 环境(复现用) ``` engine : 0.1.55 linux-x86_64-cuda-cuda13 driver : 580.178.04 (Tue Jul 7 12:38:21 UTC 2026) CUDA : 13.0 GPU : NVIDIA RTX A4500 Laptop GPU, 16384 MiB, sm_86 (compute capability 8.6) cpu : x86_64,**无 AVX-512**(引擎日志:"this CPU has no AVX-512: the expert kernels run on AVX-2 (multi-token for the i-quant gate/up rows)");9 个 expert-pool worker + 1 个 host 线程 RAM / swap : 62 GiB / 8 GiB PCIe : 链路 16.0 GT/s,host→device 实测 11.7 GB/s(pcie_frac 0.32) kernel : 6.14.0-27-generi (Ubuntu, GNOME 46.4) ``` **模型与包**:Qwen3.8-Flash-Next **Q2_0**(MoE) - `--native` shard1 35.0 GB,`--ple-gguf` shard2 26.8 GB(内含 PLE 表 **320,001,536 行 × 90 B**) - `--expert-profile`:24,576 个排名专家对 - experts 经 `--mmap-experts` 从 ~38 GB 的 experts.bin 流式读取(file tier) **崩溃时的引擎参数**: ``` strata --serve --pack /home/eagle/packs/q2_0 --native /home/eagle/models/Q2_0/Qwen3.8-Flash-Next-GSQ-RCO-Q2_0-00001-of-00002.gguf --ple-gguf /home/eagle/models/Q2_0/Qwen3.8-Flash-Next-GSQ-RCO-Q2_0-00002-of-00002.gguf --expert-profile /home/eagle/.local/share/strata/terminal/0.1.55/data/expert-profile.bin --expert-cache 4096 # 崩溃时;后调到 6000 --prefill auto # 崩溃时(auto→8192/16384);后固定 4096 --spec 4 --kv-grow # 崩溃时带 --kv-grow;后关掉 --max-context 65536 # 崩溃时;后改 32768 --kv int8 --mmap-experts --vision --pool-workers 9 --conversation-cache-mib 2048 --conversation-cache-slots 2 --conversation-cache-min-free-mib 2048 ``` --- ## 6. 已尝试的规避(有效降低概率,但非根治) | 措施 | 效果 | |---|---| | `--expert-cache` 4096 → **6000** | 专家搬运量 **113,659 MB → 6,323~8,686 MB**;解码命中率 77.3% → **79.3~85.6%**;SSD 实读 19,908 MB/7,336 major faults → **1.5~1.9 MB/0 major faults** | | `--conversation-cache-mib 0`(关 park/evict) | 去掉"快照拷贝"这条同族崩溃路径(`--prompt-cache` 增量复用不受影响) | | `--kv-grow` 关闭 | 去掉"专家缓存让槽迁移"这条路径(32K 的 K/V 只要 0.42 GiB) | | `--prefill 4096`(原 auto→16384) | prefill 分块变小 | | `--max-context 32768`(原 65536) | 上下文占用减半 | | `pcie_aspm=off` + GPU 常驻 D0 | 修掉另一条独立的挂死路径("空闲→第一次干活"),与本越界无关但同期存在 | | shim 侧按 token 限幅(3000~5000 est) | 把引擎收到的 prompt 压在 ~5~7K token | --- ## 7. 希望上游帮忙看的点 1. **`prefill copy_i32` 与 `dequant launch` 的越界点**:怀疑是**专家槽位索引 / offset 计算**在某种形状或对齐下越界 (Xid 31 的 fault 地址落在 `0x7c95_c3a00000` / `0x7547_dba20000` 一带,且越界 engine 通道每次不同: `CE2 HUBCLIENT_CE0` / `GRAPHICS GPC2 GPCCLIENT_T1_6` / `GRAPHICS GPC0 GPCCLIENT_T1_3`)。 2. **是否与"专家被反复搬迁/迁移"相关**:崩溃前总能看到 `73 hotter experts moved to colder ones' slots`、 `evictions=2/3`、`parked ... snapshot_bytes=425 MB` 之类的事件。 3. **是否只在 laptop dGPU / 无 AVX-512 的 AVX-2 路径上出现**(本机始终走 AVX-2 的 i-quant gate/up kernel)。 4. **有没有规避开关**:例如关掉某条"自适应专家槽位迁移"路径、或把 slot 迁移走 CPU/分块拷贝,能否避免越界。 5. 顺带反馈一个次要问题:`the engine stopped unexpectedly (exit code -15)` 报的是 `verify: timed out at layer 30 ... the GPU did not finish within 5 s (#267)`, 实际根因是内核侧的 Xid 31 —— **引擎无法从 kernel 越界里恢复,只能自杀重启**,随后 GPU 又因 GSP 超时被判死。 --- ## 8. 相关日志位置(复现/取证用) | 内容 | 路径 | |---|---| | 引擎日志(含 `copy_i32` / `dequant launch` 越界原文) | `~/.local/state/strata/launch/q2_0-64k.engine.log` | | 请求级日志(token 数、finish_reason、watchdog 消息) | `~/.local/state/strata/runtime/launch-q2_0-64k.server.log` | | 运行时 stdout | `~/strata-runtime.log` | | 内核(Xid 31/119/154/13、PME) | `journalctl -k`(普通用户可读) | | 上一开机 | `journalctl -k -b -1` | | shim 请求流水 | `~/strata-shim.log`(8081)、`~/strata-shim-agent.log`(8082) | | 看门狗动作 / 断电告警 | `~/.strata/gpu-watchdog.log`、`~/strata-gpu-alert.txt` | | 引擎参数(生效值) | `~/.local/state/strata/launch/q2_0-64k.json`、`~/.strata/effective-args.txt` |
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".

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:6620462660 --> @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". 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

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

Hello! This might be similar to #4190

<!-- gh-comment-id:6621085370 --> @dandandelion commented on GitHub (Nov 4, 2026): Hello! This might be similar to #4190
Author
Owner

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

@dandandelion's pointer to #4190 is well taken - we went through that thread and the two sibling reports it connects, and the result changes what we think is worth doing first, so here is the whole map as we read it, plus one test that settles it cheaply.

What #4190 concluded: same signature family (Xid 13 and 31 landing on rotating sites - prefill copy_i32, dequant launch, 'conversation cache: parked N tokens'), on a 2080 Ti box. It was closed by its own reporter as board-level, with the cross-engine evidence: Strata, ninfer AND a clean upstream llama.cpp build all wedged that machine within requests, while the same llama.cpp binary run -dev none stayed clean; the constant ESR value they had treated as a fingerprint was also retracted there. @dandandelion also confirmed a stable back-and-forth at a -300 MHz memory clock on their own box - i.e. the VRAM clock domain.

Before you read that as 'not the engine': two siblings in that family were never resolved. #5051 (2026-11-03) is an Xid 31 MMU fault of EXACTLY your type - FAULT_PDE ACCESS_TYPE_VIRT_READ - on a 31K-token prompt, engine 0.1.55; its author ran /reopen and the bot re-closed it seventeen minutes later, no human reply. And #2813 (October, Windows) shows the same 'verify: layer N never rang (an illegal instruction was encountered)' line that your log carries, closed in the 0.2.0-beta sweep rather than by a fix.

So the discriminator from #4190 is the cheapest next step, and your machine makes it a clean test - it is a genuine A4500, no modded boards or underclocks to subtract: same prompt sequence (your shim logs give you the exact replay), same --mmap-experts thrash, but pointed at a stock llama.cpp build for sm_86 next door, plus a memtest86+ pass and a memory-clock A/B if the first is inconclusive. Two outcomes, both useful: if another engine also wedges, this is the board/driver family #4190 landed on (your expert-cache 6000 result fits that too - less toggling, fewer electrical faults), and the engine-side takeaway shrinks to your point 5 (recovery from Xid) and the GSP cascade, which reads like NVIDIA-ticket material, not engine. If llama.cpp stays clean under the identical load, the engine branch becomes the front-runner and the details you already logged are the map: your crash lands on an UNMAPPED read (FAULT_PDE, copy-engine channel - a source virtual address that vanished mid-flight, not an off-by-N into a table), and in your own event chain the conversation-cache evictions climb 0 -> 1 -> 2 immediately before the crash, with 'request: parking the previous conversation -1' as one of your two 60 s stall stages and '--kv-grow hotter experts moved' lines before the others; with page cache at zero over a 38 GB mmap, kernel page discard under an in-flight copy is a second candidate teardown.

One datapoint from our side (2x 4090, CUDA, Windows, engine 0.1.56): the same park/conversation-cache machinery ran for 161 boots with daily evictions at the RAM-resident expert tier and produced zero faults - which only says the machinery is not broken at rest; your regime (file tier, page cache pinned at zero, 265 GB cumulative expert movement) is the pressure we could not honestly reproduce here, so treat it as context, not exoneration.

Housekeeping worth 30 seconds either way: the area-prefix note on the title auto-closes in 5 days - an '[Engine]' prefix now will keep this pack (the best forensic bundle we have seen on this family) alive through the triage.

(ai-assisted; we run a different GPU/OS/regime - everything above is reading of YOUR logs plus the three linked threads, no reproduction attempted; if this turns into the engine branch we will share the exact audit notes on the park/evict path.)

<!-- gh-comment-id:6621212719 --> @udqe commented on GitHub (Nov 4, 2026): @dandandelion's pointer to #4190 is well taken - we went through that thread and the two sibling reports it connects, and the result changes what we think is worth doing first, so here is the whole map as we read it, plus one test that settles it cheaply. What #4190 concluded: same signature family (Xid 13 and 31 landing on rotating sites - prefill copy_i32, dequant launch, 'conversation cache: parked N tokens'), on a 2080 Ti box. It was closed by its own reporter as board-level, with the cross-engine evidence: Strata, ninfer AND a clean upstream llama.cpp build all wedged that machine within requests, while the same llama.cpp binary run -dev none stayed clean; the constant ESR value they had treated as a fingerprint was also retracted there. @dandandelion also confirmed a stable back-and-forth at a -300 MHz memory clock on their own box - i.e. the VRAM clock domain. Before you read that as 'not the engine': two siblings in that family were never resolved. #5051 (2026-11-03) is an Xid 31 MMU fault of EXACTLY your type - FAULT_PDE ACCESS_TYPE_VIRT_READ - on a 31K-token prompt, engine 0.1.55; its author ran /reopen and the bot re-closed it seventeen minutes later, no human reply. And #2813 (October, Windows) shows the same 'verify: layer N never rang (an illegal instruction was encountered)' line that your log carries, closed in the 0.2.0-beta sweep rather than by a fix. So the discriminator from #4190 is the cheapest next step, and your machine makes it a clean test - it is a genuine A4500, no modded boards or underclocks to subtract: same prompt sequence (your shim logs give you the exact replay), same --mmap-experts thrash, but pointed at a stock llama.cpp build for sm_86 next door, plus a memtest86+ pass and a memory-clock A/B if the first is inconclusive. Two outcomes, both useful: if another engine also wedges, this is the board/driver family #4190 landed on (your expert-cache 6000 result fits that too - less toggling, fewer electrical faults), and the engine-side takeaway shrinks to your point 5 (recovery from Xid) and the GSP cascade, which reads like NVIDIA-ticket material, not engine. If llama.cpp stays clean under the identical load, the engine branch becomes the front-runner and the details you already logged are the map: your crash lands on an UNMAPPED read (FAULT_PDE, copy-engine channel - a source virtual address that vanished mid-flight, not an off-by-N into a table), and in your own event chain the conversation-cache evictions climb 0 -> 1 -> 2 immediately before the crash, with 'request: parking the previous conversation -1' as one of your two 60 s stall stages and '--kv-grow hotter experts moved' lines before the others; with page cache at zero over a 38 GB mmap, kernel page discard under an in-flight copy is a second candidate teardown. One datapoint from our side (2x 4090, CUDA, Windows, engine 0.1.56): the same park/conversation-cache machinery ran for 161 boots with daily evictions at the RAM-resident expert tier and produced zero faults - which only says the machinery is not broken at rest; your regime (file tier, page cache pinned at zero, 265 GB cumulative expert movement) is the pressure we could not honestly reproduce here, so treat it as context, not exoneration. Housekeeping worth 30 seconds either way: the area-prefix note on the title auto-closes in 5 days - an '[Engine]' prefix now will keep this pack (the best forensic bundle we have seen on this family) alive through the triage. (ai-assisted; we run a different GPU/OS/regime - everything above is reading of YOUR logs plus the three linked threads, no reproduction attempted; if this turns into the engine branch we will share the exact audit notes on the park/evict path.)
Author
Owner

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

Thanks, this follows the format now.

<!-- gh-comment-id:6687181070 --> @github-actions[bot] commented on GitHub (Nov 6, 2026): Thanks, this follows the format now.
Author
Owner

@eagle717 commented on GitHub (Nov 6, 2026):

Thanks — that's a useful negative, but I read it as narrowing rather than clearing. My engine log says RAM 0 blobs for the whole session: every expert byte comes from the file tier, with page cache held 0.0 MB at the read and 265 GB cumulative movement. Your 161 boots ran on the RAM-resident tier, so the two runs never share the failing pressure. With 62 GiB RAM against a ~100 GB working set (35 GB native + 26.8 GB PLE + ~38 GB experts), RAM residency is not available to me — which is exactly why the file-tier page lifecycle under eviction deserves the audit notes you offered.

<!-- gh-comment-id:6687626596 --> @eagle717 commented on GitHub (Nov 6, 2026): Thanks — that's a useful negative, but I read it as narrowing rather than clearing. My engine log says `RAM 0 blobs` for the whole session: every expert byte comes from the file tier, with `page cache held 0.0 MB at the read` and 265 GB cumulative movement. Your 161 boots ran on the RAM-resident tier, so the two runs never share the failing pressure. With 62 GiB RAM against a ~100 GB working set (35 GB native + 26.8 GB PLE + ~38 GB experts), RAM residency is not available to me — which is exactly why the file-tier page lifecycle under eviction deserves the audit notes you offered.
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#3077
No description provided.