mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5173] [Engine] Xid 31 MMU fault then Xid 119/154 on RTX A4500 Laptop (sm_86), after several requests #3077
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#3077
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 @eagle717 on GitHub (Nov 4, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5173
CUDA 越界(Xid 31)—— 可直接反馈给社区 / 上游的证据包
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)涉及的 kernel:
prefill copy_i32和dequant launch—— 两者都是「把专家权重(expert weights)搬进显存缓存槽 / 反量化」的路径(
--expert-cache槽位 +--expert-profile排名的专家)。同时出现的、指向 GPU 同步超时的日志(
runtime/launch-q2_0-64k.server.log):引擎自带的 60 秒无进展看门狗(也会触发,但不是根因):
3. 内核日志原文(
journalctl -k)Xid 31(MMU Fault)—— 四次现场,越界点各不相同:
随后的连锁(GPU 彻底失联):
另有一次不同家族的越界(Xid 13,早若干小时,共 95 次):
→ Xid 31(MMU Fault)与 Xid 13(Out Of Range Register)是同一类越界的两种表现。
另有 PCIe 侧的相关事件(时间上紧邻,可能是同一根因的另一面):
4. 触发条件(观察结论)
不是"单个 prompt 太大",而是"一串请求带来的专家搬运总量"。
崩点现场(02:33:49)之前 41 秒内的 5 个请求:
每个都是 4~6K token 的全新 prefill(
0 reused),都要把上万个专家 dequant + 拷进显存缓存槽:崩溃规模并不与 prompt 大小单调相关(同规模既成功过也崩过):
4.5 崩溃前的请求序列 + 缓存事件链(两段原始日志)
A. 一次完整崩溃窗口的引擎侧事件链(从 57-token 请求一路到
dequant launch越界)同一段
engine.log里连续摘出的原文(顺序即时间顺序,这是最完整的一条链):把这条链压成一张表(关键列:专家回填量 / 缓存事件 / PCIe 分担比例):
evictions=0evictions=0evictions=1evictions=2dequant launch: illegal memory access三个可疑的相关量:
evictions从 0 → 1 → 2:对话缓存开始连续 evict(= 把旧会话快照从显存拷回主机、或把 KV 搬进/搬出缓存槽),越界就发生在第二次 evict 之后的下一个请求上。快照大小 348 MB / 425 MB。
第 1 个请求 SSD 读 19.9 GB / 7,336 major faults。
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 的入口):要点:
0 reused)→ 每个都要重新回填专家C. 对照组:加大专家缓存后的同一类序列(不再崩)
同一台机器、同一模型,只把
--expert-cache4096 → 6000 之后,同样的请求模式:evictions=1→evictions=2--conversation-cache-mib 0)→ 给上游的量化线索:越界的触发量级大约是"单请求 6 万 MB 以上专家搬运 + 连续 evict + PCIe 分担比例下调";
把搬运量降一个数量级、去掉 evict,就不复现。
5. 环境(复现用)
模型与包:Qwen3.8-Flash-Next Q2_0(MoE)
--nativeshard1 35.0 GB,--ple-ggufshard2 26.8 GB(内含 PLE 表 320,001,536 行 × 90 B)--expert-profile:24,576 个排名专家对--mmap-experts从 ~38 GB 的 experts.bin 流式读取(file tier)崩溃时的引擎参数:
6. 已尝试的规避(有效降低概率,但非根治)
--expert-cache4096 → 6000--conversation-cache-mib 0(关 park/evict)--prompt-cache增量复用不受影响)--kv-grow关闭--prefill 4096(原 auto→16384)--max-context 32768(原 65536)pcie_aspm=off+ GPU 常驻 D057K token7. 希望上游帮忙看的点
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)。73 hotter experts moved to colder ones' slots、evictions=2/3、parked ... snapshot_bytes=425 MB之类的事件。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~/.local/state/strata/runtime/launch-q2_0-64k.server.log~/strata-runtime.logjournalctl -k(普通用户可读)journalctl -k -b -1~/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@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:
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
@dandandelion commented on GitHub (Nov 4, 2026):
Hello! This might be similar to #4190
@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.)
@github-actions[bot] commented on GitHub (Nov 6, 2026):
Thanks, this follows the format now.
@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 blobsfor the whole session: every expert byte comes from the file tier, withpage cache held 0.0 MB at the readand 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.