[GH-ISSUE #2194] SYCL, Arc A770 (xe): decode intermittently never starts - host waits in Verifier::run on a queue that does not drain, RSS grows until OOM #874

Closed
opened 2026-11-04 01:46:39 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @aslater3 on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2194

Hardware: Arc A770 16 GB (Alchemist, xe), Linux 7.0, oneAPI 2026.1 (JIT build), Ubuntu 26.04.1, compute runtime (NEO, libze-intel-gpu1) 26.05.37020.3, Ryzen 7 3800X, 30 GB RAM.
Build: main at a0116b27 + #2190 (without it this card gets 0 expert-cache slots and cannot start this config).
Config: Coder IQ1_M, --pack ... --native ... --ple-gguf ... --mtp ... --expert-profile <24-trace profile> --expert-cache auto --resident-experts --max-context 131072 --kv int8 --kv-resident 20480 --vram-reserve-mib 1200 --prefill-borrow --prefill auto --spec 4 --spec-min-p 0.5 --adapt-every 8 --tokens-file <8K or 2K prompt> --greedy --max-new 256 --stats, env STRATA_VERIFY_STEPPED=1 STRATA_RESIDENT_HEADROOM_GIB=5..7 UR_L0_ENABLE_RELAXED_ALLOCATION_LIMITS=1, memlock unlimited.

What happens

Intermittently, decode never makes progress. The prompt is read normally, then the log stops after

strata verify: window up to 6 tokens, 75.0 MiB of device buffers
strata generate: window and draft graphs captured in 1109 ms
strata verify: pipelined pool helper on CPU 8 (host thread CPU 0)

(once it stopped later, after position 8158, 171 tokens, 64 rounds). The host thread spins at ~90% CPU, the process RSS keeps growing (~17-18 GB anon at start of decode, 19.4-20.4 GB at the end) until the kernel OOM killer kills it after 5-8 minutes. Nothing from xe in the kernel log (no GT reset, no job timeout).

Stack of the main thread in the hang (gdb, two samples a minute apart, identical):

#0  sched_yield ()
#1-2 libze_intel_gpu.so.1
#3  ur_queue_handle_t_::synchronize()
#4  ur::level_zero::urQueueFinish
#6  sycl::_V1::detail::queue_impl::wait
#7  strata::core::Verifier::run(...)
#8  strata::core::Verifier::run(...)
#9  main ()

The 7 ExpertPool::worker threads are parked in pthread_cond_wait; the 32 stager threads and the 64 DirectFile readers are idle. So the host waits for a queue that never drains: something in the window never completes.

How often

Same machine, same session, isolated runs (each in its own systemd unit):

  • main + #2190, default settings: 6 of 7 runs hung (8K and 2K prompts). Three more runs with STRATA_DOORBELL_CHECK=1, STRATA_LEND_MIRROR=0 and STRATA_VERIFY_STEPPED=0 (one each) finished.
  • With the GR_PICK fix (#2193), decode is ~4x faster and 1 of ~15 runs hung (a 2K prompt).
  • Our fork build from 2026-10-09 (the stepped window before it was ported, plus our other A770 kernel changes) ran this config today once without hanging; our October notes for this card record no such hang.

Not tested

STRATA_VERIFY_STEPPED=0 repeatedly (one run finished, 14.1 tok/s), i915, other Alchemist cards.

Happy to run anything that would narrow it down (a debug build, ZE_DEBUG, a specific env switch).

🤖 Generated with Claude Code

Originally created by @aslater3 on GitHub (Oct 12, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/2194 **Hardware:** Arc A770 16 GB (Alchemist, `xe`), Linux 7.0, oneAPI 2026.1 (JIT build), Ubuntu 26.04.1, compute runtime (NEO, `libze-intel-gpu1`) 26.05.37020.3, Ryzen 7 3800X, 30 GB RAM. **Build:** `main` at `a0116b27` + #2190 (without it this card gets 0 expert-cache slots and cannot start this config). **Config:** Coder IQ1_M, `--pack ... --native ... --ple-gguf ... --mtp ... --expert-profile <24-trace profile> --expert-cache auto --resident-experts --max-context 131072 --kv int8 --kv-resident 20480 --vram-reserve-mib 1200 --prefill-borrow --prefill auto --spec 4 --spec-min-p 0.5 --adapt-every 8 --tokens-file <8K or 2K prompt> --greedy --max-new 256 --stats`, env `STRATA_VERIFY_STEPPED=1 STRATA_RESIDENT_HEADROOM_GIB=5..7 UR_L0_ENABLE_RELAXED_ALLOCATION_LIMITS=1`, `memlock` unlimited. ## What happens Intermittently, decode never makes progress. The prompt is read normally, then the log stops after ``` strata verify: window up to 6 tokens, 75.0 MiB of device buffers strata generate: window and draft graphs captured in 1109 ms strata verify: pipelined pool helper on CPU 8 (host thread CPU 0) ``` (once it stopped later, after `position 8158, 171 tokens, 64 rounds`). The host thread spins at ~90% CPU, the process RSS keeps growing (~17-18 GB anon at start of decode, 19.4-20.4 GB at the end) until the kernel OOM killer kills it after 5-8 minutes. Nothing from `xe` in the kernel log (no GT reset, no job timeout). Stack of the main thread in the hang (gdb, two samples a minute apart, identical): ``` #0 sched_yield () #1-2 libze_intel_gpu.so.1 #3 ur_queue_handle_t_::synchronize() #4 ur::level_zero::urQueueFinish #6 sycl::_V1::detail::queue_impl::wait #7 strata::core::Verifier::run(...) #8 strata::core::Verifier::run(...) #9 main () ``` The 7 `ExpertPool::worker` threads are parked in `pthread_cond_wait`; the 32 stager threads and the 64 `DirectFile` readers are idle. So the host waits for a queue that never drains: something in the window never completes. ## How often Same machine, same session, isolated runs (each in its own systemd unit): - `main` + #2190, default settings: 6 of 7 runs hung (8K and 2K prompts). Three more runs with `STRATA_DOORBELL_CHECK=1`, `STRATA_LEND_MIRROR=0` and `STRATA_VERIFY_STEPPED=0` (one each) finished. - With the GR_PICK fix (#2193), decode is ~4x faster and 1 of ~15 runs hung (a 2K prompt). - Our fork build from 2026-10-09 (the stepped window before it was ported, plus our other A770 kernel changes) ran this config today once without hanging; our October notes for this card record no such hang. ## Not tested `STRATA_VERIFY_STEPPED=0` repeatedly (one run finished, 14.1 tok/s), i915, other Alchemist cards. Happy to run anything that would narrow it down (a debug build, `ZE_DEBUG`, a specific env switch). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

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

Thanks for the detailed report and the stacks; they pointed straight at it.

I reproduced it on an Arc A750 (Alchemist, i915), IQ3_XXS, --resident-experts --spec 4 --mtp --adapt-every 8, STRATA_VERIFY_STEPPED=1, a 4K prompt:

  • With the defaults, 0 of 11 runs hung (5 unpinned, 6 with the host pinned and STRATA_PIPE_HELPER_SIBLING=1, your pipelined-helper path).
  • With STRATA_WINDOW_SYNC=0, 1 of 6 runs hung at the first decode window with your stack: sched_yield <- libze_intel_gpu <- urQueueFinish <- queue_impl::wait <- the stepped serve in Verifier::run. Two gdb samples a minute apart were identical, and nothing appeared in dmesg.

STRATA_WINDOW_SYNC drains the other queues before each decode window. It was added for the A750's version of this failure: a window launched behind work still in flight on another queue never started. Its default is 1 on i915 and 0 everywhere else, so your A770 under xe runs without it.

Could you try STRATA_WINDOW_SYNC=1 with your config? The fix in 0.1.44 (out now) makes it the default on every Alchemist card, whatever the driver. Battlemage keeps today's behaviour.

One thing did not reproduce here: the RSS growth during the hang. RSS stayed flat on i915 (60.4 GB the whole time). If it hangs again, two cat /proc/<pid>/smaps_rollup a minute apart would show whether the growth is anonymous memory or file pages.

<!-- gh-comment-id:6153496431 --> @Niko1221 commented on GitHub (Oct 13, 2026): Thanks for the detailed report and the stacks; they pointed straight at it. I reproduced it on an Arc A750 (Alchemist, i915), IQ3_XXS, `--resident-experts --spec 4 --mtp --adapt-every 8`, `STRATA_VERIFY_STEPPED=1`, a 4K prompt: - With the defaults, 0 of 11 runs hung (5 unpinned, 6 with the host pinned and `STRATA_PIPE_HELPER_SIBLING=1`, your pipelined-helper path). - With `STRATA_WINDOW_SYNC=0`, 1 of 6 runs hung at the first decode window with your stack: `sched_yield` <- `libze_intel_gpu` <- `urQueueFinish` <- `queue_impl::wait` <- the stepped serve in `Verifier::run`. Two gdb samples a minute apart were identical, and nothing appeared in dmesg. `STRATA_WINDOW_SYNC` drains the other queues before each decode window. It was added for the A750's version of this failure: a window launched behind work still in flight on another queue never started. Its default is 1 on i915 and 0 everywhere else, so your A770 under xe runs without it. Could you try `STRATA_WINDOW_SYNC=1` with your config? The fix in 0.1.44 (out now) makes it the default on every Alchemist card, whatever the driver. Battlemage keeps today's behaviour. One thing did not reproduce here: the RSS growth during the hang. RSS stayed flat on i915 (60.4 GB the whole time). If it hangs again, two `cat /proc/<pid>/smaps_rollup` a minute apart would show whether the growth is anonymous memory or file pages.
Author
Owner

@aslater3 commented on GitHub (Oct 14, 2026):

Thanks — that was it. Same A770 (xe), same config as above, each run in its own process, 8K prompt, 256 tokens, 2026-10-14:

build runs hung decode tok/s
a0116b27 + #2190 (no STRATA_WINDOW_SYNC) 7 (earlier) 6 5.37 (the one that finished)
a0116b27 + #2190, STRATA_WINDOW_SYNC=1 6 0 5.24-5.88
v0.1.44.1 (296b59d2), defaults 6 0 21.82-22.61 (20.73 on the first, cold run)

Output ids identical across all of them (72b762d5b2a3). 18 runs in this session with 0.1.44.1 or WINDOW_SYNC=1 (including the ones below on the open PRs), none hung. So the fix covers this card; I think this can be closed.

On the RSS growth: since nothing hung I have no smaps from a hang. For reference, a normal run sampled every 60 s (smaps_rollup, 0.1.44.1, during decode): Rss 16.3 GB = Pss_Anon 12.7 GB + Pss_File 3.6 GB, Locked 11.6 GB. My guess is that the growth during the earlier hangs was file pages (the GGUF in place being faulted in by the stager/lookahead while the window never drained) rather than a leak, but I can't confirm it now. If it comes back I'll post two smaps_rollup samples.

🤖 Generated with Claude Code

<!-- gh-comment-id:6162659055 --> @aslater3 commented on GitHub (Oct 14, 2026): Thanks — that was it. Same A770 (xe), same config as above, each run in its own process, 8K prompt, 256 tokens, 2026-10-14: | build | runs | hung | decode tok/s | |---|---|---|---| | `a0116b27` + #2190 (no `STRATA_WINDOW_SYNC`) | 7 (earlier) | 6 | 5.37 (the one that finished) | | `a0116b27` + #2190, `STRATA_WINDOW_SYNC=1` | 6 | **0** | 5.24-5.88 | | `v0.1.44.1` (`296b59d2`), defaults | 6 | **0** | 21.82-22.61 (20.73 on the first, cold run) | Output ids identical across all of them (`72b762d5b2a3`). 18 runs in this session with 0.1.44.1 or `WINDOW_SYNC=1` (including the ones below on the open PRs), none hung. So the fix covers this card; I think this can be closed. On the RSS growth: since nothing hung I have no smaps from a hang. For reference, a normal run sampled every 60 s (`smaps_rollup`, 0.1.44.1, during decode): Rss 16.3 GB = Pss_Anon 12.7 GB + Pss_File 3.6 GB, Locked 11.6 GB. My guess is that the growth during the earlier hangs was file pages (the GGUF in place being faulted in by the stager/lookahead while the window never drained) rather than a leak, but I can't confirm it now. If it comes back I'll post two `smaps_rollup` samples. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

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

Thanks for the report. This is fixed in 0.2.0-beta (or an earlier release), and we're closing it as part of the tracker reset for 0.2.0-beta.

If it still happens on 0.2.0-beta, add the area prefix to the title ([Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]), put the Strata version and your hardware in the issue form fields, and comment /reopen. A check runs and reopens it.

<!-- gh-comment-id:6270862392 --> @Niko1221 commented on GitHub (Oct 19, 2026): Thanks for the report. This is fixed in 0.2.0-beta (or an earlier release), and we're closing it as part of the tracker reset for 0.2.0-beta. If it still happens on 0.2.0-beta, add the area prefix to the title ([Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]), put the Strata version and your hardware in the issue form fields, and comment `/reopen`. A check runs and reopens it.
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#874
No description provided.