mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2157] [Bug]: 2x Arc Pro B70 layer split, every expert in VRAM: DEVICE_LOST at prefill.cpp:4678 reading a prompt (0.1.43 and 0.1.43.1; 0.1.42 passes) #862
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#862
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 @deriknel on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2157
crash-0143rt-2010-engine.log
crash-0143rt-2010.log
crash-0143rt-ce0-2015-engine.log
crash-0143rt-ce0-2015.log
crash-0143rt-oldrank-2028-engine.log
crash-0143rt-oldrank-2028.log
crash-04331-2050-engine.log
crash-04331-2050.log
longctx.py
What happened
On two Arc Pro B70s with
--layer-splitand every expert resident, 0.1.43 and 0.1.43.1 lose the device at the start of reading a prompt, after a long prompt has been served:The server restarts the engine and later requests work. 0.1.42 on the same machine, with the same model, flags and GPU runtime, does not crash.
Reproduce (one server, no restart between steps), with the attached
longctx.pyrun inside the container (it reads the image's own sources as filler and callslocalhost:8080):python3 longctx.py 600000: a ~147K-token prompt, one fact planted at 30% depth, asked back with thinking off, temperature 0,max_tokens300. A random first line makes every prompt a cold read. This always succeeds.for i in $(seq 0 19); do python3 longctx.py $((52000 + i*1000)); done: 20 prompts of 13.5K to 14.5K tokens.61b3fb5d)7695859a)crash-0143rt-2010STRATA_COPY_ENGINE=0crash-0143rt-ce0-2015--expert-profile expert-profile.bincrash-0143rt-oldrank-2028a0116b27)crash-04331-2050All on Level Zero compute runtime 26.35.39758.10 with IGC 2.41.5. So it is not the copy engine or the new expert ranking. Decode speed is the same on every build (about 72 / 96 / 72 tok/s on prose / code / long), so only the prompt path is affected. The conversation cache was on in every run, and the crashes came with 4, 6 and 8 conversations parked, so a full cache is not the trigger.
Launch command (0.1.43.1 run):
Environment:
STRATA_STAGE_TRIM=1 STRATA_VERIFY_NO_HOST=1 STRATA_VERIFY_DEVICE_PLAN=1 STRATA_MIRROR_MIB=0 STRATA_STAGER_THREADS=12(0.1.42 also hasSTRATA_SYCL_GEMM_NO_STAGE=1). The start-up log reportslayer split: 100% of the experts resident.We run the engine in a Docker image built from each release tag (oneAPI 2026.1.1, AOT for bmg-g31), not through setup. We can run any build or setting you want tried; the reproducer takes about 15 minutes.
Strata version, GPU, OS
0.1.43.1 (
a0116b27) and 0.1.43 (7695859a) · 2x Arc Pro B70 32 GB, xe driver, GuC 70.72.1 · CachyOS, kernel 7.2.9, i9-14900KF, 32 GB RAM · Level Zero compute runtime 26.35.39758.10, IGC 2.41.5@Niko1221 commented on GitHub (Oct 12, 2026):
Thank you - the table (0.1.42 clean, every 0.1.43 build crashes, copy engine and the new ranking ruled out) narrows this a lot, and the log shows the crash is not tied to what the big prompt left behind: after the restart the very first 13K prompt on a fresh engine loses the device too, while a fresh 4.5K prompt is fine.
prefill.cpp:4678 is only the catch of the whole prompt run, so it names no kernel. What changed in the prompt path between 0.1.42 and 0.1.43 (sycl/ only) is: (1) the wide 4-byte stores of kv_append into the pinned host KV and the staging pool (STRATA_KV_WIDE_HOST), (2) gate/up/down dequant in one launch (STRATA_PF_DQ_FUSED), (3) the copy engine (already ruled out), (4) GEMM operand staging off on Battlemage (your 0.1.42 run had it off as well), (5) STRATA_VERIFY_LEAN for decode graphs.
Could you run the reproducer once per line on 0.1.43.1, everything else unchanged, and tell us which one stops the crash (20 prompts each is enough; it crashed on the 1st-6th prompt before):
a) STRATA_KV_WIDE_HOST=0
b) STRATA_PF_DQ_FUSED=0
c) STRATA_SYCL_GEMM_STAGE=1
d) STRATA_VERIFY_LEAN=0
Also please send
sudo dmesg | grep -iE 'xe |fault|CAT|timedout|reset'from right after one crash: whether it is a page fault (an address) or a timed-out job decides where we look next. We are reproducing on one B70 with a fake two-stage split (--split-device 0) in parallel.@Niko1221 commented on GitHub (Oct 12, 2026):
A follow-up from our side: we could not make it fail on one Arc Pro B70. With your longctx.py sequence (one 137K prompt, then 20 prompts of 13.5K-17.8K tokens) and your flags, we tried three setups on 0.1.43: a plain single card, a fake two-stage split on the same card (
--layer-split 26 --split-device 0), and a single card with conversation parking on. All three were 21 of 21 with no device loss and no new xe lines in dmesg.So it most likely needs the real two-card case. On a layer split, the second card's half of each prompt chunk runs on its own thread, handing data across from the first card. That code did not change between 0.1.42 and 0.1.43, but 0.1.43 made the first card's half about 14% faster, which could expose a timing problem in the hand-off. On one card both halves share a GPU, which would hide it. This is a hypothesis, not confirmed.
Two quick tests on your pair would tell us a lot, next to the one-switch runs above:
--prefill 16384: bigger and fewer prompt chunks, so fewer hand-offs.And again, the output of
sudo dmesg | grep -iE 'xe |fault|CAT|timedout|reset'right after one crash: a page-fault address and a timed-out job point to different places.@deriknel commented on GitHub (Oct 12, 2026):
Thanks for looking at this so quickly. All runs on 0.1.43.1 (
a0116b27), our pair, same flags as the report, the reproducer from the first post: one ~147K prompt, then up to 20 prompts of ~13K, a fresh engine for each line, stopping at the first device loss. Logs, the kernel lines and the script that ran them: https://gist.github.com/deriknel/66bd5b9be6b87a77d10ac59ba3ec23faSTRATA_KV_WIDE_HOST=0STRATA_PF_DQ_FUSED=0STRATA_SYCL_GEMM_STAGE=1STRATA_VERIFY_LEAN=0--prefill 16384REFUSED: 4343 experts are neither in VRAM nor mirrored--prefill 8192One more data point, from a mistake on our side: in a first pass our script left a) set when it ran b), so
STRATA_KV_WIDE_HOST=0andSTRATA_PF_DQ_FUSED=0together also lost the device, on the 1st 13K prompt. a) alone passed both times.dmesg after each crash is a timed-out job, not a page fault, always on the card at 0000:03:00.0:
The driver also writes a devcoredump (
Reason: Timedout job, GuC 70.72.1); one is in the gist. At every engine start the driver logs that the two cards cannot do peer-to-peer DMA:So everything between our two cards goes through host memory, which a single card or
--split-device 0never exercises.We now run 0.1.43.1 with
STRATA_KV_WIDE_HOST=0day to day and will say here if it crashes. Happy to run anything else.@deriknel commented on GitHub (Oct 13, 2026):
An update, and a correction to my last reply:
STRATA_KV_WIDE_HOST=0does not fix this. It passed 40 of 40 in the order we tested then (the ~147K-token prompt first, on a fresh engine). With a few short conversations before the long prompt, 0.1.43.1 with it still lost the device in 2 of 3 runs, and 0.1.42 in 1 of 3. We traced it to the kernel's memory management on this machine, not to Strata's GPU code: Linux moves the cards' system-memory buffers to swap while a job is using them.What happens, from the xe tracepoints (logs and scripts in the gist):
alwayson this box. RAM was fragmented: in an OOM report from one test, the Normal zone had 14.8 GB free but no free block of 2 MiB or more. A large allocation that cannot get a huge page wakes kswapd.vm.swappiness=150). In the run that lost the device, kswapd evicted 521 buffer mappings across the two cards. They are/dev/dri/renderD128mappings in the engine; one of them is 324 MiB, probably the token embedding Strata keeps in mapped host memory (322 MiB).job_timeout_msand the engine was reset (Timedout job ... guc_id=33, the same queue as in every crash in this issue).The devcoredump in the earlier gist agrees: no fault or error state, every EU row busy (
ROW_INSTDONE0), a job that started and never finished.The conversation cache is what brings it on. A park copies the outgoing conversation into ordinary heap memory, several GB for a long one, and those allocations are the huge-page requests that wake kswapd.
The reproducer: a fresh engine for each run; the 5 greedy prompts twice and 3 bench prompts (8 short conversations, each parked), then
longctx.py 600000(~147K tokens), then 20 prompts of 13.5K to 15K tokens. A run stops at the first device loss. 0.1.43.1 unless noted, same flags as the first post, withSTRATA_KV_WIDE_HOST=0and--conversation-cache-mib 12288:61b3fb5d), its flags from the first postmadvise, swap onRuled out on the way:
/dev/dri.What we changed:
transparent_hugepageismadvisenow (w /sys/kernel/mm/transparent_hugepage/enabled - - - - madvisein tmpfiles.d). It made the crash rarer but did not end it: with--pipeline-windows 2and a smaller VRAM reserve it lost card 0 again, with the same trace (kswapd evicting card 0's buffers, then about 500 page faults a second until the timeout). We're still looking and will post what stops it.Two suggestions, neither tested: a note in the Linux / Intel docs that THP
alwaystogether with swap can get the GPU's buffers swapped out under a running job; andmadvise(MADV_NOHUGEPAGE)on the conversation cache's segments, so a park stops asking for huge pages. Happy to try either.Environment as in the first post, plus: kernel 7.2.9-cachyos, 32 GB RAM, zram 31 GB (zstd),
vm.swappiness=150, THP defragdefer+madvise.Logs, the trace around the timeout, the OOM report and the scripts: https://gist.github.com/deriknel/899c74998056728b625ce2538086094b
We investigated (myself and Claude Opus 5.5 in Claude Code) and I reviewed the findings and ran every test on my two Arc Pro B70s on my CachyOS machine.
@deriknel commented on GitHub (Oct 13, 2026):
Following up on the edit above: setting
NEOReadDebugKeys=1andEnableRecoverablePageFaults=0in the engine's environment stops it here. With it, Intel's compute runtime binds an evicted buffer back before the queue runs, instead of the GPU faulting it in mid-kernel. The xe trace still shows kswapd evicting the cards' buffers, but noxe_vma_pagefaultevents any more, only rebinds.Same reproducer as above, 0.1.43.1:
always, conversation cache 12 GiB, without the settingalways, conversation cache 12 GiB, with it--pipeline-windows 2(with two local fixes to the SYCL port, PRs to follow), reserve 1400, THPmadvise, without itDecode speed and the answers are unchanged with it: 71.8 / 96.3 / 72.0 tok/s on our bench, and the same greedy text on 5 prompts. We run it day to day now.
If it keeps holding, it may be worth setting in Strata's Intel launcher (
sycl/serve/strata-sycl.sh), or asking Intel why the faulting path stalls a job past the 5 s timeout. Happy to test either.We investigated (myself and Claude Opus 5.5 in Claude Code) and I reviewed the findings and ran every test on my two Arc Pro B70s on my CachyOS machine.
@vitkysilko commented on GitHub (Oct 18, 2026):
Possibly related, from another 2× Arc Pro B70 box without P2P (one card behind the chipset,
--layer-split 26, Flash-Next IQ3_S, every expert resident, Strata v0.1.44.1 / v0.1.45, native build): the engine aborted during prompts too, about once perbench.shrun, usually on the second conversation of the agent suite (exit -6, nothing in the log). gdb showedabortinsidelibze_intel_gpu.so.1underur::level_zero::enqueueWaitEventPath←urEnqueueCommandBufferExp← a SYCL graph inMtpDrafter::prefill. dmesg sometimes hadEngine reset+Fault response: Unsuccessful -ENOENTon the second card at the same moment, sometimes nothing.NEOReadDebugKeys=1+EnableRecoverablePageFaults=0did not change anything here.What fixed it on this box:
libze1to 1.32.0 (oneapi-src/level-zero, u24.04 deb).UR_LOADER_USE_LEVEL_ZERO_V2=0was set in my shell (left over from a llama.cpp setup), so the engine ran on the legacy v1 adapter. I unset it for the engine so the v2 adapter loads. (With the old loader, v2 crashed right away on a null pointer inur_command_list_manager::isGraphCaptureActive.)With loader 1.32.0 + the v2 adapter: 2 full bench runs, 0 aborts, and prompts got faster (16K 10.2 s → 7.7 s, 4K 3.0 s → 2.7 s). Might be worth checking
ls -l /lib/x86_64-linux-gnu/libze_loader.so.1*andenv | grep LEVEL_ZERO_V2on your box.@deriknel commented on GitHub (Oct 19, 2026):
Our two B70s already run the setup you ended with. The engine runs in a container built with compute-runtime 26.35.39758.10, Level Zero loader 1.32.0 (
libze11.32.0, Ubuntu 24.04) and oneAPI 2026.1, so the host's libraries are not used.UR_LOADER_USE_LEVEL_ZERO_V2is not set, andSYCL_UR_TRACE=1 sycl-lsin the engine's container reports "Intel(R) oneAPI Unified Runtime over Level-Zero V2" for both cards.Our gate runs on this setup have not hit the abort you describe (exit -6 in
MtpDrafter::prefill). Every image since 0.1.44.1 has passed a 148K prompt followed by 20 prompts of 13K, plus agent-style turns over six and eight conversations. The lost device in this issue came by another path: kswapd's xe shrinker evicted the cards' system-RAM buffers mid-job, andEnableRecoverablePageFaults=0stopped it. So on a box that sees your abort, a loader older than the compute runtime expects, or the v1 adapter, is worth ruling out first.We investigated (myself and Claude Opus 5.5 in Claude Code) and I reviewed the findings and ran every test on my two Arc Pro B70s on my CachyOS machine.
@Niko1221 commented on GitHub (Nov 5, 2026):
Thanks for taking the time to report this.
Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.