[GH-ISSUE #31] Engine freezes mid-generation and never recovers: generated counter static, GPU spinning at idle power (~69 W), cancel ineffective (4 captures in 2.5h) #16

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

Originally created by @Zauberio on GitHub (Sep 27, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/31

Symptom

Engine (v0.1.9, Windows build) freezes mid-generation and never recovers. Four captures in ~2.5 hours of sustained benchmark load (streamed chat completions, temperature 0.0). Same core signature every time; the process stays alive.

Common signature (all 4 captures)

  • /status: busy: true, phase thinking, generated static across minutes of sampling, elapsed_s climbing, tokens_per_s decaying, tail shows mid-output text (no error)
  • GPU: 100 % utilization at ~69 W (idle-level power — spinning kernels), VRAM held, ~48 C
  • Client timeout fires but does NOT stop the engine; on this single-slot server the next request sits queued behind it indefinitely
  • Engine process alive, full working set, threads present. Not crash, not OOM, healthy boot margin (707 MiB VRAM free)
  • Boot config identical: --kv q4_0 --kv-resident 32768 --max-context 262144, ~5059 resident experts, READY ctx=262144

Captures

#1 — 5-task code-fix benchmark, task 5 (add_months): froze at generated: 218, elapsed 1573 s, tps 0.1, GPU 100 % @ 69 W. Exact replay of the same 5 tasks on a fresh serve: all 5 passed (the frozen one in 5 s) → not deterministic by content alone.

#2 — HumanEval how_many_times: model entered degenerate repetition ('ababab…' thousands of times), generated 91058 tokens at ~105 tok/s, then froze:

  • /status t0: generated 91058, elapsed 1021.2, tps 89.3
  • /status t+90s: generated 91058 (identical), elapsed 1111.2, tps 82.0

#3 — fivebugs task: froze at generated: 13 (very early in generation), detected by our watchdog after 3 consecutive 2-min samples.

#4 — HumanEval sort_array repair (prompt 399 tok): froze at generated: 130, elapsed 280 s, tps 0.5, GPU 100 % @ 69.44 W. Last healthy request before it: prompt 284 tokens … 562 generated in 7037 ms (79.9 tok/s). Nothing in the engine log between — the wedged request simply never completes.

Frequency / pattern

  • ~4 occurrences in 2.5 h under sustained single-request benchmarking.
  • Same rig ran long stretches perfectly healthy between them (18 consecutive HumanEval tasks at 50–90 tok/s, 3×384-token TPS runs, 21K-token prompts).
  • No image inputs involved (text-only path; one capture occurred on a vision-enabled boot, three on a text-only boot).
  • Freeze can hit very early (13 tokens) or after very long output (91K tokens) — no obvious output-length trigger.

Configuration

  • Windows, RTX 5070 Ti 16 GB (sm_120), 63 GB RAM, Ryzen 9800X3D
  • Engine: v0.1.9 (prebuilt; also observed on the source build of the same tag)
  • Args: --pack <pack> --native <shard1> --ple-gguf <shard1> --expert-profile <bin> --expert-cache auto --prefill 2048 --spec 4 --spec-min-p 0.5 --mtp <dir> --max-context 262144 --kv q4_0 --kv-resident 32768 --pool-workers 8 --vram-reserve-mib 800
  • Model: Swift-Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS (2 shards)
  • Boot: KV streaming: 32768 of 262144 cells per QSA layer in VRAM, K/V in 1.69 GiB of pinned RAM; expert cache 5059 slots, 8.21 GiB; 707 MiB VRAM free; READY ctx=262144

Suspected surface

--kv q4_0 with --kv-resident 32768 / KV streaming (new in this setup today) or an interaction with --spec 4 speculative decoding. Happy to run targeted A/Bs (e.g. q8_0 KV, spec off) against the same workload if useful.

Ask

Before I run long A/Bs: is there any known wedge/deadlock class in this area (0.1.10 engine-robustness work?), and is there a diagnostic command (or a signal / watchdog hook) that could tell us where the arena/threads are stuck when it happens? Full /status dumps, GPU samples and engine logs for all four captures available on request.

Originally created by @Zauberio on GitHub (Sep 27, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/31 ## Symptom Engine (v0.1.9, Windows build) freezes mid-generation and never recovers. Four captures in ~2.5 hours of sustained benchmark load (streamed chat completions, temperature 0.0). Same core signature every time; the process stays alive. ## Common signature (all 4 captures) - `/status`: `busy: true`, phase `thinking`, **`generated` static across minutes of sampling**, `elapsed_s` climbing, `tokens_per_s` decaying, tail shows mid-output text (no error) - GPU: **100 % utilization at ~69 W** (idle-level power — spinning kernels), VRAM held, ~48 C - Client timeout fires but does NOT stop the engine; on this single-slot server the next request sits queued behind it indefinitely - Engine process alive, full working set, threads present. Not crash, not OOM, healthy boot margin (707 MiB VRAM free) - Boot config identical: `--kv q4_0 --kv-resident 32768 --max-context 262144`, ~5059 resident experts, READY ctx=262144 ## Captures **#1** — 5-task code-fix benchmark, task 5 (`add_months`): froze at `generated: 218`, elapsed 1573 s, tps 0.1, GPU 100 % @ 69 W. Exact replay of the same 5 tasks on a fresh serve: all 5 passed (the frozen one in 5 s) → not deterministic by content alone. **#2** — HumanEval `how_many_times`: model entered degenerate repetition ('ababab…' thousands of times), generated 91058 tokens at ~105 tok/s, then froze: - `/status` t0: `generated 91058, elapsed 1021.2, tps 89.3` - `/status` t+90s: `generated 91058` (identical), `elapsed 1111.2, tps 82.0` **#3** — fivebugs task: froze at `generated: 13` (very early in generation), detected by our watchdog after 3 consecutive 2-min samples. **#4** — HumanEval `sort_array` repair (prompt 399 tok): froze at `generated: 130`, elapsed 280 s, tps 0.5, GPU 100 % @ 69.44 W. Last healthy request before it: `prompt 284 tokens … 562 generated in 7037 ms (79.9 tok/s)`. Nothing in the engine log between — the wedged request simply never completes. ## Frequency / pattern - ~4 occurrences in 2.5 h under sustained single-request benchmarking. - Same rig ran long stretches perfectly healthy between them (18 consecutive HumanEval tasks at 50–90 tok/s, 3×384-token TPS runs, 21K-token prompts). - No image inputs involved (text-only path; one capture occurred on a vision-enabled boot, three on a text-only boot). - Freeze can hit very early (13 tokens) or after very long output (91K tokens) — no obvious output-length trigger. ## Configuration - Windows, RTX 5070 Ti 16 GB (sm_120), 63 GB RAM, Ryzen 9800X3D - Engine: v0.1.9 (prebuilt; also observed on the source build of the same tag) - Args: `--pack <pack> --native <shard1> --ple-gguf <shard1> --expert-profile <bin> --expert-cache auto --prefill 2048 --spec 4 --spec-min-p 0.5 --mtp <dir> --max-context 262144 --kv q4_0 --kv-resident 32768 --pool-workers 8 --vram-reserve-mib 800` - Model: Swift-Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS (2 shards) - Boot: `KV streaming: 32768 of 262144 cells per QSA layer in VRAM, K/V in 1.69 GiB of pinned RAM`; `expert cache 5059 slots, 8.21 GiB`; `707 MiB VRAM free`; `READY ctx=262144` ## Suspected surface `--kv q4_0` with `--kv-resident 32768` / KV streaming (new in this setup today) or an interaction with `--spec 4` speculative decoding. Happy to run targeted A/Bs (e.g. q8_0 KV, spec off) against the same workload if useful. ## Ask Before I run long A/Bs: is there any known wedge/deadlock class in this area (0.1.10 engine-robustness work?), and is there a diagnostic command (or a signal / watchdog hook) that could tell us **where** the arena/threads are stuck when it happens? Full `/status` dumps, GPU samples and engine logs for all four captures available on request.
Author
Owner

@Zauberio commented on GitHub (Sep 27, 2026):

Update from the reporter after digging into the release history:

We realized we were still running the v0.1.9 engine (we compared digests: v0.1.9's strata.exe = a5771e02…, v0.1.10's = 47d8d357…, unchanged in v0.1.11). The engine has now been updated to the v0.1.10/0.1.11 build and we're re-running the same benchmark workload against it.

Two questions while that runs:

  1. Is the #27 "no more stuck servers after an engine crash" robustness work expected to touch this class at all? Ours differs from #27: the engine process stays alive and the GPU keeps spinning — the request just never completes and the cancel does not reach it.
  2. Frequency update: we've now seen ~6 occurrences today under sustained single-slot load (roughly one every 15-25 min), each requiring a full engine restart. It reproduces on plain text, temp 0, with and without images configured. Full /status dumps, GPU samples and engine logs for each capture are available — happy to provide anything that helps.

Config on retest is unchanged (--kv q4_0 --kv-resident 32768 --max-context 262144 --spec 4, Swift 1.5 IQ3_XXS). If it still reproduces on the current engine I'll follow up with a fresh capture, and I can run targeted A/Bs (e.g. --kv q8_0, spec off) if you'd like to narrow the surface.

<!-- gh-comment-id:5858621387 --> @Zauberio commented on GitHub (Sep 27, 2026): Update from the reporter after digging into the release history: We realized we were still running the **v0.1.9 engine** (we compared digests: v0.1.9's `strata.exe` = `a5771e02…`, v0.1.10's = `47d8d357…`, unchanged in v0.1.11). The engine has now been updated to the v0.1.10/0.1.11 build and we're re-running the same benchmark workload against it. Two questions while that runs: 1. Is the #27 "no more stuck servers after an engine crash" robustness work expected to touch this class at all? Ours differs from #27: the engine process **stays alive** and the GPU keeps spinning — the request just never completes and the cancel does not reach it. 2. Frequency update: we've now seen ~6 occurrences today under sustained single-slot load (roughly one every 15-25 min), each requiring a full engine restart. It reproduces on plain text, temp 0, with and without images configured. Full `/status` dumps, GPU samples and engine logs for each capture are available — happy to provide anything that helps. Config on retest is unchanged (`--kv q4_0 --kv-resident 32768 --max-context 262144 --spec 4`, Swift 1.5 IQ3_XXS). If it still reproduces on the current engine I'll follow up with a fresh capture, and I can run targeted A/Bs (e.g. `--kv q8_0`, spec off) if you'd like to narrow the surface.
Author
Owner

@Lufen34 commented on GitHub (Sep 27, 2026):

might be same issue as mine : https://github.com/Niko1221/Strata/issues/29

<!-- gh-comment-id:5858631935 --> @Lufen34 commented on GitHub (Sep 27, 2026): might be same issue as mine : https://github.com/Niko1221/Strata/issues/29
Author
Owner

@Niko1221 commented on GitHub (Sep 27, 2026):

Retry now. New version pushed.

<!-- gh-comment-id:5858883867 --> @Niko1221 commented on GitHub (Sep 27, 2026): Retry now. New version pushed.
Author
Owner

@Zauberio commented on GitHub (Sep 27, 2026):

Thanks — installing 0.1.12 now and re-running the same sustained workload (164-task HumanEval + a 4h agentic hunt) against it.

For completeness: we captured one more occurrence on the 0.1.10/0.1.11 engine before switching (43 min into the load, same signature — generated counter static, GPU pegged at low power, workers idle). The engine log showed two 32768-token runaway generations shortly before the stall; the frozen request was the next one after the second runaway. Full logs kept if useful.

Will report how 0.1.12 fares — and if the built-in 120 s watchdog fires, you'll get the exact no progress for 120 s ... line from us too.

<!-- gh-comment-id:5859122965 --> @Zauberio commented on GitHub (Sep 27, 2026): Thanks — installing 0.1.12 now and re-running the same sustained workload (164-task HumanEval + a 4h agentic hunt) against it. For completeness: we captured one more occurrence on the 0.1.10/0.1.11 engine before switching (43 min into the load, same signature — `generated` counter static, GPU pegged at low power, workers idle). The engine log showed two 32768-token runaway generations shortly before the stall; the frozen request was the next one after the second runaway. Full logs kept if useful. Will report how 0.1.12 fares — and if the built-in 120 s watchdog fires, you'll get the exact `no progress for 120 s ...` line from us too.
Author
Owner

@amonpaike commented on GitHub (Sep 27, 2026):

git pull
setup.sh starts the model , but it doesn't seem to recompile the engine (on Linux).

<!-- gh-comment-id:5859221221 --> @amonpaike commented on GitHub (Sep 27, 2026): git pull setup.sh starts the model , but it doesn't seem to recompile the engine (on Linux).
Author
Owner

@Niko1221 commented on GitHub (Sep 27, 2026):

@amonpaike thanks, that was a real bug in setup. A locally compiled engine was only marked as "compiled here", so later runs never compiled it again. After a git pull on Linux (where there is no ready-made engine), setup kept starting the old binary. That also means Linux installs never got the v0.1.12 pool fix.

Fixed on main (b742ff9):

  • Setup now remembers a fingerprint of the engine's source files.
  • When a git pull changes them, it compiles the engine again before starting the model. Only the changed files are rebuilt, so this takes a few minutes, not the full first build.
  • If that compile fails, it says so and starts the engine you already have.

To update: git pull, then ./setup.sh. Your current engine has no fingerprint yet, so this first run always recompiles it once.

@Zauberio thanks for the detailed captures. Your early freezes (13, 130 and 218 tokens) match the expert-pool race fixed in v0.1.12 (details in #29). I'm looking forward to the 0.1.12 run.

On the runaway generations (the ababab capture and the two 32768-token runs):

  • That's the model looping, not the engine. I checked that KV streaming doesn't change the output. A 12K-token greedy run at 262K context gave identical text with --kv-resident and with the whole KV in VRAM.
  • Low-bit quants at temperature 0 are prone to this, and Qwen recommends a presence penalty (0 to 2) against endless repetition.
  • Strata applies the penalties at temperature 0 too. Per request, send "presence_penalty": 1.0 (the default window is the last 64 tokens; penalty_last_n raises it, up to 4096). For every client, add it to the sampling block of your strata-*.json: "sampling": {"presence_penalty": 1.0}.
  • For a benchmark, a max_tokens cap also keeps a runaway from eating the slot.

Update me if I can close the issue.

<!-- gh-comment-id:5859276114 --> @Niko1221 commented on GitHub (Sep 27, 2026): @amonpaike thanks, that was a real bug in setup. A locally compiled engine was only marked as "compiled here", so later runs never compiled it again. After a `git pull` on Linux (where there is no ready-made engine), setup kept starting the old binary. That also means Linux installs never got the v0.1.12 pool fix. **Fixed on main (b742ff9):** - Setup now remembers a fingerprint of the engine's source files. - When a `git pull` changes them, it compiles the engine again before starting the model. Only the changed files are rebuilt, so this takes a few minutes, not the full first build. - If that compile fails, it says so and starts the engine you already have. To update: `git pull`, then `./setup.sh`. Your current engine has no fingerprint yet, so this first run always recompiles it once. @Zauberio thanks for the detailed captures. Your early freezes (13, 130 and 218 tokens) match the expert-pool race fixed in v0.1.12 (details in #29). I'm looking forward to the 0.1.12 run. On the runaway generations (the `ababab` capture and the two 32768-token runs): - That's the model looping, not the engine. I checked that KV streaming doesn't change the output. A 12K-token greedy run at 262K context gave identical text with `--kv-resident` and with the whole KV in VRAM. - Low-bit quants at temperature 0 are prone to this, and Qwen recommends a presence penalty (0 to 2) against endless repetition. - Strata applies the penalties at temperature 0 too. Per request, send `"presence_penalty": 1.0` (the default window is the last 64 tokens; `penalty_last_n` raises it, up to 4096). For every client, add it to the `sampling` block of your `strata-*.json`: `"sampling": {"presence_penalty": 1.0}`. - For a benchmark, a `max_tokens` cap also keeps a runaway from eating the slot. Update me if I can close the issue.
Author
Owner

@Zauberio commented on GitHub (Sep 27, 2026):

Retry update on 0.1.12: the built-in watchdog works — and we caught it live, with the exact line you asked for.

During a sustained 164-task run (single slot, no restarts), one request stalled after ~45 min of continuous load. 120 s later, the engine log had:

strata serve: no progress for 120 s during a request (verify window: the CPU experts of layer 9) - stopping the engine so the server starts it again (issue #29)

The engine stopped itself, the server reported the engine stopped unexpectedly (exit code 3221226505); the next request restarts it, and the run continued transparently — one task lost instead of the whole session. Before this, the same event hung everything for 10+ minutes and needed an external watchdog to intervene.

So the recovery path is rock solid. The underlying race still fired once in ~65 min of sustained load; the "(verify window: the CPU experts of layer 9)" hint may help narrow it. We're keeping the same workload running (4 h agentic session next) and will report if the watchdog trips again, with log segments.


Catching up on your reply — it landed while we were mid-switch; read now, thanks for the detail:

  1. presence_penalty — agreed, and being applied on our side: the benchmark harness will send presence_penalty per request (env-switched, validated with tests), and the box config is getting "sampling": {"presence_penalty": 1.0} at its next restart — the current 4-hour agentic run finishes undisturbed first this time. If the penalty absorbs the loops as expected, most of our remaining HE+ non-passes (7 of 14 were our client-side loop-guard kills) should become earlier, cheaper stops.
  2. The runaway generations — understood: the two 32768-token runs and the ababab case all look like model looping at temp 0, not an engine fault, and your KV-streaming check matches what we saw. The max_tokens cap is already in place for benchmark runs — that's what those two runs hit — so a runaway can't eat the slot indefinitely.
  3. On closing — one data point first: the 120 s watchdog fired once more on 0.1.12 (see above — verify window: the CPU experts of layer 9), so the expert-pool race still has a residual window under heavy load, even though recovery is now invisible. The 4-hour agentic run is in flight; give us until it finishes (~03:20 local) and we'll post the final count of watchdog trips plus the full night's numbers. If that comes through clean, that's our green light from this side.
<!-- gh-comment-id:5859925819 --> @Zauberio commented on GitHub (Sep 27, 2026): Retry update on 0.1.12: the built-in watchdog works — and we caught it live, with the exact line you asked for. During a sustained 164-task run (single slot, no restarts), one request stalled after ~45 min of continuous load. 120 s later, the engine log had: `strata serve: no progress for 120 s during a request (verify window: the CPU experts of layer 9) - stopping the engine so the server starts it again (issue #29)` The engine stopped itself, the server reported `the engine stopped unexpectedly (exit code 3221226505); the next request restarts it`, and the run continued transparently — one task lost instead of the whole session. Before this, the same event hung everything for 10+ minutes and needed an external watchdog to intervene. So the recovery path is rock solid. The underlying race still fired once in ~65 min of sustained load; the "(verify window: the CPU experts of layer 9)" hint may help narrow it. We're keeping the same workload running (4 h agentic session next) and will report if the watchdog trips again, with log segments. --- **Catching up on your reply — it landed while we were mid-switch; read now, thanks for the detail:** 1. **presence_penalty** — agreed, and being applied on our side: the benchmark harness will send `presence_penalty` per request (env-switched, validated with tests), and the box config is getting `"sampling": {"presence_penalty": 1.0}` at its next restart — the current 4-hour agentic run finishes undisturbed first this time. If the penalty absorbs the loops as expected, most of our remaining HE+ non-passes (7 of 14 were our client-side loop-guard kills) should become earlier, cheaper stops. 2. **The runaway generations** — understood: the two 32768-token runs and the `ababab` case all look like model looping at temp 0, not an engine fault, and your KV-streaming check matches what we saw. The `max_tokens` cap is already in place for benchmark runs — that's what those two runs hit — so a runaway can't eat the slot indefinitely. 3. **On closing** — one data point first: the 120 s watchdog fired **once more on 0.1.12** (see above — `verify window: the CPU experts of layer 9`), so the expert-pool race still has a residual window under heavy load, even though recovery is now invisible. The 4-hour agentic run is in flight; give us until it finishes (~03:20 local) and we'll post the final count of watchdog trips plus the full night's numbers. If that comes through clean, that's our green light from this side.
Author
Owner

@Niko1221 commented on GitHub (Sep 28, 2026):

Thanks for catching it live. That one line narrows it down a lot.

What your line tells us: the engine stopped in "verify window: the CPU experts of layer 9". The CPU expert pool has its own 60 s stall check since 0.1.12, and it did not fire before the 120 s watchdog did. So the host thread was not stuck in the pool's own waits. It was inside something without a time limit during that step: an expert job, or a call into the CUDA driver. The line alone can't say which.

v0.1.13 (out now) makes the next occurrence say it:

  • Under the no progress line there is now a stall report. It shows:
    • what every expert-pool thread was doing (parked, sleeping, or which job), and the host thread's state and how long it had been in it;
    • the GPU/host flags of the window;
    • how many layers were served during the stall (0 = stopped, more = slow);
    • memory and page faults.
      It is printed twice, 2 s apart.
  • On Windows the engine also writes strata-stall-<pid>.dmp (a few hundred KB, every thread's stack) in the engine's folder. Please attach the report and the .dmp: with the symbols published alongside the release (strata-windows-x64-symbols.zip), they show the line each thread was on.
  • The watchdog now fires after 60 s instead of 120 s, so a stall costs half as much.
  • The startup log says session is up (engine 0.1.13), so we can tell which engine ran.

What I tested here: 2 hours of sustained single-slot load shaped like yours: coding prompts at temperature 0 with reasoning, and a long document every 15th request. The setup:

  • IQ3_S on 63 GB of RAM, the closest match to your IQ3_XXS (native experts, a partly pinned arena);
  • --kv q4_0 --kv-resident 32768 --max-context 262144 --spec 4;
  • the pool oversubscribed the way --pool-workers 8 does on an 8-core CPU.

Result: 517 requests with no stall, no error and no broken answer. So it doesn't reproduce here, and the stall report from your box is what will pin it down.

One suggestion meanwhile: --pool-workers 8 on an 8-core CPU gives one worker no core of its own (the engine keeps the first core for the host thread). The default (leave the flag out) uses every other physical core, and it's what everything is measured with.

Also in 0.1.13: long prompts are about twice as fast (32K prompt on a 12 GB card: 572 -> 1,290 tokens/s with Q2_0, 383 -> 1,208 with IQ3_S). And on Linux, git pull + ./setup.sh now recompiles the engine (@amonpaike). Update with START-HERE.bat.

<!-- gh-comment-id:5864302733 --> @Niko1221 commented on GitHub (Sep 28, 2026): Thanks for catching it live. That one line narrows it down a lot. **What your line tells us:** the engine stopped in "verify window: the CPU experts of layer 9". The CPU expert pool has its own 60 s stall check since 0.1.12, and it did *not* fire before the 120 s watchdog did. So the host thread was not stuck in the pool's own waits. It was inside something without a time limit during that step: an expert job, or a call into the CUDA driver. The line alone can't say which. **[v0.1.13](https://github.com/Niko1221/Strata/releases/tag/v0.1.13) (out now) makes the next occurrence say it:** - Under the `no progress` line there is now a stall report. It shows: - what every expert-pool thread was doing (parked, sleeping, or which job), and the host thread's state and how long it had been in it; - the GPU/host flags of the window; - how many layers were served during the stall (0 = stopped, more = slow); - memory and page faults. It is printed twice, 2 s apart. - On Windows the engine also writes `strata-stall-<pid>.dmp` (a few hundred KB, every thread's stack) in the engine's folder. **Please attach the report and the .dmp**: with the symbols published alongside the release (`strata-windows-x64-symbols.zip`), they show the line each thread was on. - The watchdog now fires after 60 s instead of 120 s, so a stall costs half as much. - The startup log says `session is up (engine 0.1.13)`, so we can tell which engine ran. **What I tested here:** 2 hours of sustained single-slot load shaped like yours: coding prompts at temperature 0 with reasoning, and a long document every 15th request. The setup: - IQ3_S on 63 GB of RAM, the closest match to your IQ3_XXS (native experts, a partly pinned arena); - `--kv q4_0 --kv-resident 32768 --max-context 262144 --spec 4`; - the pool oversubscribed the way `--pool-workers 8` does on an 8-core CPU. Result: 517 requests with no stall, no error and no broken answer. So it doesn't reproduce here, and the stall report from your box is what will pin it down. One suggestion meanwhile: `--pool-workers 8` on an 8-core CPU gives one worker no core of its own (the engine keeps the first core for the host thread). The default (leave the flag out) uses every other physical core, and it's what everything is measured with. Also in 0.1.13: long prompts are about twice as fast (32K prompt on a 12 GB card: 572 -> 1,290 tokens/s with Q2_0, 383 -> 1,208 with IQ3_S). And on Linux, `git pull` + `./setup.sh` now recompiles the engine (@amonpaike). Update with `START-HERE.bat`.
Author
Owner

@Zauberio commented on GitHub (Sep 28, 2026):

Thanks — that breakdown is exactly what we needed. The timing worked out too: we updated to 0.1.13 this morning (boot log shows session is up (engine 0.1.13)) and the same sustained workload is running on it right now — 164-task HumanEval, temperature 0 with reasoning, --kv q4_0 --kv-resident 32768 --max-context 262144 --spec 4, single slot, plus our shorter fivebugs legs. The matching symbols are already staged. If it stalls, the full report + strata-stall-<pid>.dmp lands in this thread.

On --pool-workers: noted — that's our exact case (8-core 9800X3D). We inherited --pool-workers 8 from the pre-0.1.5 config and carried it forward since. The current run keeps it so it stays comparable to our earlier legs; the next one uses the pool default, and I'll report stall behavior plus any throughput difference.

One data point from the 0.1.12 retest, for what it's worth: the stall class was absent from the full retest — a 164-task sweep plus a 2-hour agentic session at 70–120K-token contexts, zero stall events (the one watchdog trip you already saw was at ~45 min into the first run; everything after it was clean). What did not change is the model-looping tendency at temperature 0 — roughly 5–7 doom-loop kills per 164 tasks on both KV modes — so your presence_penalty guidance is being adopted on our side.

If you can keep the issue open a little longer: we'll either deliver a stall report from the repro rig or confirm the retest stayed clean across more sustained load. Either way you'll get the data.

<!-- gh-comment-id:5864655789 --> @Zauberio commented on GitHub (Sep 28, 2026): Thanks — that breakdown is exactly what we needed. The timing worked out too: we updated to 0.1.13 this morning (boot log shows `session is up (engine 0.1.13)`) and the same sustained workload is running on it right now — 164-task HumanEval, temperature 0 with reasoning, `--kv q4_0 --kv-resident 32768 --max-context 262144 --spec 4`, single slot, plus our shorter fivebugs legs. The matching symbols are already staged. If it stalls, the full report + `strata-stall-<pid>.dmp` lands in this thread. On `--pool-workers`: noted — that's our exact case (8-core 9800X3D). We inherited `--pool-workers 8` from the pre-0.1.5 config and carried it forward since. The current run keeps it so it stays comparable to our earlier legs; the next one uses the pool default, and I'll report stall behavior plus any throughput difference. One data point from the 0.1.12 retest, for what it's worth: the stall class was absent from the full retest — a 164-task sweep plus a 2-hour agentic session at 70–120K-token contexts, zero stall events (the one watchdog trip you already saw was at ~45 min into the first run; everything after it was clean). What did *not* change is the model-looping tendency at temperature 0 — roughly 5–7 doom-loop kills per 164 tasks on both KV modes — so your presence_penalty guidance is being adopted on our side. If you can keep the issue open a little longer: we'll either deliver a stall report from the repro rig or confirm the retest stayed clean across more sustained load. Either way you'll get the data.
Author
Owner

@Zauberio commented on GitHub (Sep 28, 2026):

First stall caught on 0.1.13 — the new report did exactly what it promised. Full report + thread-stack dump (.dmp) as release assets: https://github.com/Zauberio/strata-stall-captures/releases/tag/stall-20260928

The report's headline (stall ~46 min in, one request):

  • stage "verify window: the CPU experts of layer 27" for 60 s; 14 layers served since the last finished step
  • expert pool: 24 of 24 jobs claimed, 24 done; 7 of 7 workers parked, 7 sleeping; host idle for 60209 ms
  • verify window: 4 tokens at position 670, host at layer step 28; the GPU rang 28; flags: served 27, plan (A) 28, copies (B) 27
  • memory: 37677 MiB resident, 58918 MiB committed, 1944 MiB RAM available; 36075540 page faults

So: not the pool — every worker parked, everything completed. The host was waiting on the GPU side of the layer 27→28 step while the GPU had already rung 28 — closest to the "call into the CUDA driver" branch from your analysis. The stacked dump should say exactly where. The 1.9 GiB RAM-available figure sits in the same snapshot in case it's page-related.

Impact note for the 60 s cutoff: the self-stop and auto-restart worked, but the cold engine reload afterwards took ~15 min and the remaining 74 requests of the run errored during it. For sustained benchmarks that reload is the expensive part.

Context for this one: it ran your suggested --pool-workers default (flag removed per your note). One stall in ~46 min at layer 27. Starting a clean rerun now for a fair pool-default vs pool-8 comparison; I'll add anything it shows.

<!-- gh-comment-id:5865976241 --> @Zauberio commented on GitHub (Sep 28, 2026): First stall caught on 0.1.13 — the new report did exactly what it promised. Full report + thread-stack dump (`.dmp`) as release assets: https://github.com/Zauberio/strata-stall-captures/releases/tag/stall-20260928 The report's headline (stall ~46 min in, one request): - `stage "verify window: the CPU experts of layer 27" for 60 s; 14 layers served since the last finished step` - `expert pool: 24 of 24 jobs claimed, 24 done; 7 of 7 workers parked, 7 sleeping; host idle for 60209 ms` - `verify window: 4 tokens at position 670, host at layer step 28; the GPU rang 28; flags: served 27, plan (A) 28, copies (B) 27` - `memory: 37677 MiB resident, 58918 MiB committed, 1944 MiB RAM available; 36075540 page faults` So: **not the pool** — every worker parked, everything completed. The host was waiting on the GPU side of the layer 27→28 step while the GPU had already rung 28 — closest to the "call into the CUDA driver" branch from your analysis. The stacked dump should say exactly where. The 1.9 GiB RAM-available figure sits in the same snapshot in case it's page-related. Impact note for the 60 s cutoff: the self-stop and auto-restart worked, but the cold engine reload afterwards took ~15 min and the remaining 74 requests of the run errored during it. For sustained benchmarks that reload is the expensive part. Context for this one: it ran your suggested `--pool-workers` default (flag removed per your note). One stall in ~46 min at layer 27. Starting a clean rerun now for a fair pool-default vs pool-8 comparison; I'll add anything it shows.
Author
Owner

@Zauberio commented on GitHub (Sep 28, 2026):

Second occurrence, ~21 min into the rerun — and it sharpens the picture. Report + dump: https://github.com/Zauberio/strata-stall-captures/releases/tag/stall-20260928-layer1

  • stage "verify window: the CPU experts of layer 1" for 60 s; 0 layers served — fully stopped this time (vs 14 = slow on the first)
  • 24 of 24 jobs done; 7 of 7 workers parked, sleeping; host idle 60 s+
  • verify window: 3 tokens at position 227, host at layer step 2; the GPU rang 2; flags: served 1, plan (A) 2, copies (B) 1
  • memory: 39620 MiB resident, 58812 MiB committed, 8582 MiB RAM available

Two points vs the first capture:

  1. RAM-available was 8.5 GiB here, 1.9 GiB at the first stall — memory pressure does not look like the common factor; the constant is the host waiting on a GPU-side step whose ring already arrived.
  2. Both are early freezes (3 and ~670 tokens in) — the class you mapped to the 0.1.12 pool fix — so either a variant survives on 0.1.13 or a second mechanism produces the same wait.

Field note in case it helps your side: both of these landed while running without --pool-workers per the suggestion. Today's tally on this box: 2 stalls in ~85 min on the default pool vs 1 stall in ~4h40m with --pool-workers 8 (that one is the layer-9 stall you already have). Small samples, no strong claim — but we reverted to --pool-workers 8 for the standing config, and we can run the default again any time if you want more data.

<!-- gh-comment-id:5866285201 --> @Zauberio commented on GitHub (Sep 28, 2026): Second occurrence, ~21 min into the rerun — and it sharpens the picture. Report + dump: https://github.com/Zauberio/strata-stall-captures/releases/tag/stall-20260928-layer1 - `stage "verify window: the CPU experts of layer 1" for 60 s; 0 layers served` — fully stopped this time (vs 14 = slow on the first) - `24 of 24 jobs done; 7 of 7 workers parked, sleeping; host idle 60 s+` - `verify window: 3 tokens at position 227, host at layer step 2; the GPU rang 2; flags: served 1, plan (A) 2, copies (B) 1` - `memory: 39620 MiB resident, 58812 MiB committed, 8582 MiB RAM available` Two points vs the first capture: 1. RAM-available was **8.5 GiB** here, **1.9 GiB** at the first stall — memory pressure does not look like the common factor; the constant is the host waiting on a GPU-side step whose ring already arrived. 2. Both are early freezes (3 and ~670 tokens in) — the class you mapped to the 0.1.12 pool fix — so either a variant survives on 0.1.13 or a second mechanism produces the same wait. Field note in case it helps your side: both of these landed while running *without* `--pool-workers` per the suggestion. Today's tally on this box: **2 stalls in ~85 min on the default pool vs 1 stall in ~4h40m with `--pool-workers 8`** (that one is the layer-9 stall you already have). Small samples, no strong claim — but we reverted to `--pool-workers 8` for the standing config, and we can run the default again any time if you want more data.
Author
Owner

@Zauberio commented on GitHub (Sep 28, 2026):

Third stall report on 0.1.13 — and it comes with our best repro candidate so far.

Report + dump: https://github.com/Zauberio/strata-stall-captures/releases/tag/stall-20260928-1122

The stall (11:22, layer 1, 0 layers served, 8/8 pool workers parked, host idle 60 s+) hit the same task as the 0.1.12 stall: HumanEval/47 (median), task 48 of 164. Same task, same position, two different engine versions, two different pool configs.

This morning's stall-free run on the same task shows why it's special: it produced 65536 output tokens — two consecutive generations into the 32768 max_tokens cap (first attempt + one repair) — all of it a degenerate numeric cycle (period 2 tokens, 119 repetitions, loop score 0.991), 525 s, then failed. So on this box the task means long degenerate generations, and on 2 of 4 runs the engine stalled during it — matching the "two 32768-token runaways shortly before the stall" pattern from my earlier note.

Cheapest repro attempt on your side, if useful: that exact prompt, temperature 0, max_tokens 32768, let both the first and the repair generation run through a full cap. Prompt + full metadata attached:

https://github.com/Zauberio/strata-stall-captures/releases/tag/he47-repro-20260928

Separately, for the record: today's stall density on this box is up (3 in ~2.5 h across configs, vs a stall-free ~3.5 h stretch last night). We're now also looking at the large-pages / pinned-arena angle from #42 plus today's unusually heavy engine restart churn as contributing state. Will report what we find.

<!-- gh-comment-id:5867150215 --> @Zauberio commented on GitHub (Sep 28, 2026): Third stall report on 0.1.13 — and it comes with our best repro candidate so far. Report + dump: https://github.com/Zauberio/strata-stall-captures/releases/tag/stall-20260928-1122 The stall (11:22, layer 1, 0 layers served, 8/8 pool workers parked, host idle 60 s+) hit the same task as the 0.1.12 stall: **HumanEval/47 (`median`), task 48 of 164**. Same task, same position, two different engine versions, two different pool configs. This morning's stall-free run on the same task shows why it's special: it produced **65536 output tokens** — two consecutive generations into the 32768 max_tokens cap (first attempt + one repair) — all of it a degenerate numeric cycle (period 2 tokens, 119 repetitions, loop score 0.991), 525 s, then failed. So on this box the task means long degenerate generations, and on 2 of 4 runs the engine stalled during it — matching the "two 32768-token runaways shortly before the stall" pattern from my earlier note. Cheapest repro attempt on your side, if useful: that exact prompt, temperature 0, max_tokens 32768, let both the first and the repair generation run through a full cap. Prompt + full metadata attached: https://github.com/Zauberio/strata-stall-captures/releases/tag/he47-repro-20260928 Separately, for the record: today's stall density on this box is up (3 in ~2.5 h across configs, vs a stall-free ~3.5 h stretch last night). We're now also looking at the large-pages / pinned-arena angle from #42 plus today's unusually heavy engine restart churn as contributing state. Will report what we find.
Author
Owner

@Niko1221 commented on GitHub (Sep 28, 2026):

Thank you - the dumps were exactly what was needed, and they point somewhere I would not have guessed.

(The third capture, HumanEval/47, shows the same thing; thanks for the repro - long degenerate generations mean many more verify windows, so more chances to hit it.)

Where it stops. In all three, the host thread is inside cudaMemcpyAsync, waiting for a lock inside the NVIDIA driver (RtlAcquireSRWLockShared in nvcuda64), while one of the driver's own threads is busy in nvcuda64. The call comes from the verify window's DMA path (Verifier::fetch_dma, verify.cpp:922): with a native pack (your IQ3_XXS) the engine copies the missed experts with the copy engine, issuing cudaMemcpyAsync + cudaLaunchHostFunc from the host inside a verify window - while the GPU spins on the flag those very copies raise ("the GPU rang 28; copies (B) 27"). The pool and the workers are idle, as the report said. Q2_0 has always used a copy kernel instead (no host CUDA call inside the window), which is why none of our Q2_0 soaks ever hit it, and IQ3_S on this 64 GB machine stayed clean for 2 hours (517 requests) - it needs something your machine has. It is not paging itself: the page-fault counter moved by one in the 2 s between the report's snapshots; but a nearly full RAM (1.9 and 8.5 GiB available) plausibly keeps the driver's own threads busier, which is where the host was waiting.

The fix (0.1.14): the copy kernel is now the default for every pack. Measured on IQ3_S: 45.3 -> 44.8 tok/s (8 requests), so ~1%. --pcie-mode dma keeps the old path. Update with START-HERE.bat; on an engine you keep at 0.1.13, --pcie-mode kernel in the config's args does the same.

The 15-minute restart: the log line after the restart says loaded 39.97 GiB at 0.04 GiB/s (normally 2-3 GiB/s). The first stall report shows 1.9 GiB of RAM available: with a 40 GB arena on 63 GB, the reload was paging. More headroom (fewer other processes during the benchmark, or a smaller pack) keeps a restart at ~20-30 s.

--pool-workers 8 vs the default: fine either way; the stall was not in the pool (all workers parked in all three dumps), so the difference in your tally is chance. Large pages (#42, thanks to @pipeob0) are in 0.1.14 as well.

Closing this with 0.1.14. If it happens again on 0.1.14, please reopen it with the stall report and the dump.

<!-- gh-comment-id:5867754313 --> @Niko1221 commented on GitHub (Sep 28, 2026): Thank you - the dumps were exactly what was needed, and they point somewhere I would not have guessed. (The third capture, HumanEval/47, shows the same thing; thanks for the repro - long degenerate generations mean many more verify windows, so more chances to hit it.) **Where it stops.** In all three, the host thread is inside `cudaMemcpyAsync`, waiting for a lock inside the NVIDIA driver (`RtlAcquireSRWLockShared` in nvcuda64), while one of the driver's own threads is busy in nvcuda64. The call comes from the verify window's **DMA path** (`Verifier::fetch_dma`, verify.cpp:922): with a native pack (your IQ3_XXS) the engine copies the missed experts with the copy engine, issuing `cudaMemcpyAsync` + `cudaLaunchHostFunc` from the host *inside* a verify window - while the GPU spins on the flag those very copies raise ("the GPU rang 28; copies (B) 27"). The pool and the workers are idle, as the report said. Q2_0 has always used a copy kernel instead (no host CUDA call inside the window), which is why none of our Q2_0 soaks ever hit it, and IQ3_S on this 64 GB machine stayed clean for 2 hours (517 requests) - it needs something your machine has. It is not paging itself: the page-fault counter moved by one in the 2 s between the report's snapshots; but a nearly full RAM (1.9 and 8.5 GiB available) plausibly keeps the driver's own threads busier, which is where the host was waiting. **The fix (0.1.14):** the copy kernel is now the default for every pack. Measured on IQ3_S: 45.3 -> 44.8 tok/s (8 requests), so ~1%. `--pcie-mode dma` keeps the old path. Update with `START-HERE.bat`; on an engine you keep at 0.1.13, `--pcie-mode kernel` in the config's args does the same. **The 15-minute restart:** the log line after the restart says `loaded 39.97 GiB at 0.04 GiB/s` (normally 2-3 GiB/s). The first stall report shows 1.9 GiB of RAM available: with a 40 GB arena on 63 GB, the reload was paging. More headroom (fewer other processes during the benchmark, or a smaller pack) keeps a restart at ~20-30 s. `--pool-workers 8` vs the default: fine either way; the stall was not in the pool (all workers parked in all three dumps), so the difference in your tally is chance. Large pages (#42, thanks to @pipeob0) are in 0.1.14 as well. Closing this with 0.1.14. If it happens again on 0.1.14, please reopen it with the stall report and the dump.
Author
Owner

@Zauberio commented on GitHub (Sep 28, 2026):

Validation report on the closing fix — running your 0.1.14 on the original box.

Stalls: gone. Three HE+ runs (164 tasks each) across ~3.5 h, q4_0 and int8 KV modes, max context, sustained single-slot load: zero stalls, zero watchdog trips — previously this workload was freezing every 20–45 min. The fetch_dma fix holds here.

Scores on 0.1.14 (both legs, same everything else — penalty, pool-8, prefill auto):

  • q4_0: 93.3% (153/164), ~4% faster, 4 loop-kills
  • int8: 93.3% (153/164), better first-attempt, 6 loop-kills
  • For reference, the same box pre-fix: 92.0 / 92.7 on q4_0, 93.9 on int8 — so 0.1.14 is at or above every prior number, with the stability now thrown in.

On your notes, for the record:

  • The restart paging: matches us exactly — our slow reloads (~50 MB/s) happened while a WSL VM was squatting 15.5 GB VRAM and ~10 GB RAM on this box. It's been evicted; reloads should return to your 20–30 s figure on the next cycles.
  • Large pages: privilege granted (it was genuinely never set) — the boot now reports large pages refused ... error 1450, which per @pipeob0's caution is the expected pool-exhaustion state right after an engine kill. Will re-check on a settled machine; STRATA_NO_LARGEPAGES noted as the switch.
  • --pool-workers 8 vs default: understood, chance — staying on our known-good 8.

Thank you for turning the dumps into a fix this fast — the trace (driver lock inside the DMA copy while the GPU spins on the very flags those copies raise) is a much better explanation than we ever had. If anything recurs on 0.1.14, it comes back here with a fresh dump.

<!-- gh-comment-id:5872021022 --> @Zauberio commented on GitHub (Sep 28, 2026): Validation report on the closing fix — running your 0.1.14 on the original box. **Stalls: gone.** Three HE+ runs (164 tasks each) across ~3.5 h, q4_0 and int8 KV modes, max context, sustained single-slot load: **zero stalls, zero watchdog trips** — previously this workload was freezing every 20–45 min. The `fetch_dma` fix holds here. **Scores on 0.1.14** (both legs, same everything else — penalty, pool-8, prefill auto): - q4_0: 93.3% (153/164), ~4% faster, 4 loop-kills - int8: 93.3% (153/164), better first-attempt, 6 loop-kills - For reference, the same box pre-fix: 92.0 / 92.7 on q4_0, 93.9 on int8 — so 0.1.14 is at or above every prior number, with the stability now thrown in. On your notes, for the record: - **The restart paging:** matches us exactly — our slow reloads (`~50 MB/s`) happened while a WSL VM was squatting 15.5 GB VRAM and ~10 GB RAM on this box. It's been evicted; reloads should return to your 20–30 s figure on the next cycles. - **Large pages:** privilege granted (it was genuinely never set) — the boot now reports `large pages refused ... error 1450`, which per @pipeob0's caution is the expected pool-exhaustion state right after an engine kill. Will re-check on a settled machine; `STRATA_NO_LARGEPAGES` noted as the switch. - **`--pool-workers 8` vs default:** understood, chance — staying on our known-good 8. Thank you for turning the dumps into a fix this fast — the trace (driver lock inside the DMA copy while the GPU spins on the very flags those copies raise) is a much better explanation than we ever had. If anything recurs on 0.1.14, it comes back here with a fresh dump.
Author
Owner

@pipeob0 commented on GitHub (Sep 28, 2026):

Two data points from the other 16 GB VRAM / 64 GB RAM box (Ryzen 7 5700X3D, RTX 5060 Ti at PCIe 4.0 x8, 40 GB arena), now on 0.1.14 — both about the large-pages side, since @Zauberio landed on it.

1. error 1450 right after a restart is expected, not a privilege problem. On this account the privilege is genuinely fine: probing VirtualAlloc(MEM_LARGE_PAGES) directly, 4000 separate 2 MB chunks allocate back to back, and a single allocation of 40 GB succeeds. What produces 1450 here is starting a new engine while the previous one's pinned large pages have not been released by the driver yet — the log then reads large pages refused for <bytes> B (GetLargePageMinimum=2097152, VirtualAlloc error 1450), and the start after that reports large pages (2097152 B). That is why #42 prints the byte count and the raw code and stopped blaming the privilege: 1450 = pool exhausted, 87 = size not a multiple, 1314 = privilege off. Three different things, and the old single message conflated them.

2. The x8 link is a real constraint, and 0.1.14's probe reads it correctly. Here it prints PCIe probe: 13.7 GB/s host->device -> pcie_frac 0.29. Measured on 0.1.14 with the copy-kernel default, --pcie-frac 0.30 beats 0.55 by ~17% in ms/round on this card (6/6 interleaved pairs, numbers in #44) — the engine's own line goes from 3.30 to 1.60 distinct experts per layer read over PCIe. So the share that is right for a x16 box is roughly twice what a x8 box wants.

For the record: a few hours of sustained load on 0.1.14 here, no stall and no watchdog trip. Nothing to add to the dump analysis — the driver-lock-inside-cudaMemcpyAsync finding is the same shape as the "GPU rang 28, copies (B) 27" signature in all three of your captures.

<!-- gh-comment-id:5872466001 --> @pipeob0 commented on GitHub (Sep 28, 2026): Two data points from the other 16 GB VRAM / 64 GB RAM box (Ryzen 7 5700X3D, RTX 5060 Ti at **PCIe 4.0 x8**, 40 GB arena), now on 0.1.14 — both about the large-pages side, since @Zauberio landed on it. **1. `error 1450` right after a restart is expected, not a privilege problem.** On this account the privilege is genuinely fine: probing `VirtualAlloc(MEM_LARGE_PAGES)` directly, 4000 separate 2 MB chunks allocate back to back, and a single allocation of 40 GB succeeds. What produces 1450 here is starting a new engine while the previous one's pinned large pages have not been released by the driver yet — the log then reads `large pages refused for <bytes> B (GetLargePageMinimum=2097152, VirtualAlloc error 1450)`, and the start after that reports `large pages (2097152 B)`. That is why #42 prints the byte count and the raw code and stopped blaming the privilege: 1450 = pool exhausted, 87 = size not a multiple, 1314 = privilege off. Three different things, and the old single message conflated them. **2. The x8 link is a real constraint, and 0.1.14's probe reads it correctly.** Here it prints `PCIe probe: 13.7 GB/s host->device -> pcie_frac 0.29`. Measured on 0.1.14 with the copy-kernel default, `--pcie-frac 0.30` beats `0.55` by ~17% in ms/round on this card (6/6 interleaved pairs, numbers in #44) — the engine's own line goes from 3.30 to 1.60 distinct experts per layer read over PCIe. So the share that is right for a x16 box is roughly twice what a x8 box wants. For the record: a few hours of sustained load on 0.1.14 here, no stall and no watchdog trip. Nothing to add to the dump analysis — the driver-lock-inside-`cudaMemcpyAsync` finding is the same shape as the "GPU rang 28, copies (B) 27" signature in all three of your captures.
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#16
No description provided.