[GH-ISSUE #1603] parallel: 2 + two long-context sessions: the request hangs with running: 0 / queued: 0 and the #1317 frozen-engine watchdog never sees it #640

Closed
opened 2026-11-04 01:44:43 +07:00 by bsakaguchi · 5 comments
Owner

Originally created by @ylzbj1-stack on GitHub (Oct 8, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1603

parallel: 2 + two long-context sessions: the request hangs with running: 0 / queued: 0 and the #1317 frozen-engine watchdog never sees it

Engine: 0.1.41 (strata-windows-x64.zip, BUILD.json → version: 0.1.41, cuda 13.0, archs [75,86,89,120])
Server: serve/server.py from the same tag
OS: Windows 11, WDDM

  • #1317 (closed, fixed in 0.1.40.2 + 0.1.41): an untimed read of the engine/vision pipe can hold the request turn forever.
    Here the request turn is not held: /metrics reports running: 0, queued: 0, waiting: 0
    while the client is still waiting. So #1317's frozen-engine check (ENGINE_STALL_S, 90 s) has
    nothing to watch and never fires — I grepped the whole engine log and the server stdout for
    has said nothing for / frozen / EngineSilent and there is no such line, ever.
  • #481 (open): serve engine deadlocks in SleepConditionVariableSRW during a long streaming reply.
    Same "lost step" family, but mine is reproducible by two concurrent long sessions.
  • #1341 (open): a >100k-token prompt deadlocks the pipelined verify-window reader (--pipeline-windows >= 1). Not this one: I do not pass --pipeline-windows, and my prompts
    are ≈40 K, not >100 K.

Environment

  • 2× RTX 3080 20 GB (sm_86), layer_split: auto → CUDA0 layers 0–24, CUDA1 layers 25–47
  • Xeon E5-2696 v3 (18 c / 36 t, no AVX-512), 128 GB DDR3-1600 quad channel
  • Model: Swift-1.5 Qwen3.8-Flash-Next GSQ-RCO IQ3_XXS, native pack, shards 39.79 + 36.18 GB
  • parallel: 2, --max-context 262144, --kv-resident 32768, --kv int8, --spec 4,
    --prefill auto, --expert-cache auto, --vram-reserve-mib 700, --vision
  • No --pipeline-windows, no --batch-groups, no --resident-experts

Reproduction

Two long-context conversations (~40 K tokens each) active simultaneously on parallel: 2,
with at least one of them needing a chunked, partly-cold prefill. A later request (long or short)
then hangs in the client forever.

It is not deterministic — it needs the two long prompts to be in flight close together. Once it
happens it stays until the client cancels.

Symptom — both states captured via GET /metrics

Hung:

live.state   = "idle"      live.running = 0
live.queued  = 0           live.waiting = 0
live.slots   = [ {slot 0, state "idle", held_tokens 885},
                 {slot 1, state "idle", held_tokens 38605} ]
netstat <port> : 0 × ESTABLISHED   (only TIME_WAIT)
GPU power      : 31.9 W / 7.1 W    (idle; limits 320 W)
engine CPU     : kernel 0.00 s + user 0.00 s over an 8 s sample   → 0 % CPU

Healthy, seconds later, after closing the second long session:

live.state = "generating"  live.running = 1  ESTABLISHED = 2
GPU0 105.5 W / GPU1 133.8 W
slot 0 held=43103 | slot 1 held=143

So the request is neither running, nor queued, nor waiting, and there is no TCP connection
held by it — yet the client is still on the "waiting for token generation" panel. Whatever booked it
in was released without ending the client's turn.

Evidence

1. Both long requests admitted in the same second

/metrics → requests (server-side bookkeeping; every entry here ends finish: "stop"):

00:51:54  prompt=665    reused=0      out=221    44.1 s  finish=stop
00:51:55  prompt=38385  reused=0      out=8473  129.8 s  finish=stop   <- admitted together
00:54:05  prompt=38620  reused=38380  out=4230   43.9 s  finish=stop
00:54:50  prompt=39086  reused=38615  out=173     3.1 s  finish=stop
00:54:54  prompt=39300  reused=39081  out=78      1.9 s  finish=stop
00:54:57  prompt=39452  reused=39295  out=128     2.2 s  finish=stop
00:58:04  prompt=40024  reused=39447  out=893    16.3 s  finish=stop

The server believes it completed everything. The client-side turn never ended.

2. BYIELD fires repeatedly — the two slots keep interrupting each other's reads

strata batch: the prompt was read in 6 parts, the slots decoding 21138 ms between them
strata batch: the prompt was read in 3 parts, the slots decoding 10754 ms between them
strata batch: the prompt was read in 2 parts, the slots decoding  2206 ms between them
strata batch: the prompt was read in 3 parts, the slots decoding  4180 ms between them
strata batch: the prompt was read in 3 parts, the slots decoding  4105 ms between them

3. Control experiment

  • One long session + an empty second slot → stable, 100.3 / 102.4 / 108.5 tok/s,
    expert-cache hit 95–98 %, KV streaming 99.7 % of block reads hitting VRAM, drafts ≈ 72–80 %.
  • One long session + a short request → fine (a short prompt does not need to yield).
  • Two long sessions → hang. Closing one of them resolves it immediately.

4. The transport is not the problem

A streaming request to the same server completes:
chunks=77, finish_reason=stop, data: [DONE] received (server.py:4985), 3.5 s.

5. Nothing in the log about the hang

Neither the engine log nor the server's stdout has any line for the stalled request — no
engine_silence_s / STRATA_ENGINE_STALL_S notice, no engine restart, no error. The request simply
never appears.

Where I would look

The admission path in server.py around the d9621d1 comment (0.1.41):

# With none free the control lines are given back while waiting: a slot can be held by a read
# that gave way (BYIELD) and needs them to go on, so waiting with them is a deadlock - long,
# long, short at 0.25 s steps under parallel: 2 (ENGINE_REVIEW finding 1, reproduced in 0.1.41).
while True:
    with self.slot_cv:
        slot = self.pick_slot(prompt)
        if slot is not None:
            self.slot_busy[slot] = True
            break
    if holding:
        self.ctl.release()
        holding = False
    ...
    if not holding:
        ok = yield from self._take_control(cancel, len(prompt))

d9621d1 handles "waiting for a slot". Mine is the case where a yielded read (the
if self._yielded is not None: branch just below, and the BYIELD sends at _send(f"BYIELD {slot}"))
and a waiting admission contend for the same control lines while a third request is also waiting.
The end state (running: 0 and queued: 0 and waiting: 0 with the client still waiting)
suggests the request is dropped from the bookkeeping rather than merely blocked — which is also why
ENGINE_STALL_S cannot catch it: the frozen-engine check only runs while a request is outstanding.

What I can provide

  • Full engine log around the incident
  • /metrics snapshots in both states (hung and healthy)
  • The config JSON
  • I can run an instrumented build, STRATA_DBG_FEAT, ROUTE_OVERRIDE, or any env flags you want

Workaround (for other users hitting this)

Do not run two long-context sessions concurrently on parallel: 2. Short requests are safe to run
concurrently — they do not trigger a BYIELD yield. A single long session is stable at 100+ tok/s.

Originally created by @ylzbj1-stack on GitHub (Oct 8, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1603 # `parallel: 2` + two long-context sessions: the request hangs with `running: 0 / queued: 0` and the #1317 frozen-engine watchdog never sees it **Engine:** 0.1.41 (`strata-windows-x64.zip`, `BUILD.json` → `version: 0.1.41`, `cuda 13.0`, `archs [75,86,89,120]`) **Server:** `serve/server.py` from the same tag **OS:** Windows 11, WDDM ## Related issues - **#1317** (closed, fixed in 0.1.40.2 + 0.1.41): *an untimed read of the engine/vision pipe can hold the request turn forever*. Here the request turn is **not** held: `/metrics` reports `running: 0`, `queued: 0`, `waiting: 0` while the client is still waiting. So #1317's frozen-engine check (`ENGINE_STALL_S`, 90 s) has **nothing to watch** and never fires — I grepped the whole engine log and the server stdout for `has said nothing for` / `frozen` / `EngineSilent` and there is **no such line, ever**. - **#481** (open): `serve engine deadlocks in SleepConditionVariableSRW during a long streaming reply`. Same "lost step" family, but mine is reproducible by **two concurrent long sessions**. - **#1341** (open): `a >100k-token prompt deadlocks the pipelined verify-window reader (--pipeline-windows >= 1)`. **Not this one:** I do **not** pass `--pipeline-windows`, and my prompts are ≈40 K, not >100 K. ## Environment - 2× RTX 3080 20 GB (sm_86), `layer_split: auto` → CUDA0 layers 0–24, CUDA1 layers 25–47 - Xeon E5-2696 v3 (18 c / 36 t, **no AVX-512**), 128 GB DDR3-1600 quad channel - Model: Swift-1.5 Qwen3.8-Flash-Next GSQ-RCO **IQ3_XXS**, native pack, shards 39.79 + 36.18 GB - `parallel: 2`, `--max-context 262144`, `--kv-resident 32768`, `--kv int8`, `--spec 4`, `--prefill auto`, `--expert-cache auto`, `--vram-reserve-mib 700`, `--vision` - **No `--pipeline-windows`, no `--batch-groups`, no `--resident-experts`** ## Reproduction Two **long-context** conversations (~40 K tokens each) active simultaneously on `parallel: 2`, with at least one of them needing a chunked, partly-cold prefill. A later request (long or short) then hangs in the client forever. It is **not deterministic** — it needs the two long prompts to be in flight close together. Once it happens it stays until the client cancels. ## Symptom — both states captured via `GET /metrics` **Hung:** ``` live.state = "idle" live.running = 0 live.queued = 0 live.waiting = 0 live.slots = [ {slot 0, state "idle", held_tokens 885}, {slot 1, state "idle", held_tokens 38605} ] netstat <port> : 0 × ESTABLISHED (only TIME_WAIT) GPU power : 31.9 W / 7.1 W (idle; limits 320 W) engine CPU : kernel 0.00 s + user 0.00 s over an 8 s sample → 0 % CPU ``` **Healthy, seconds later, after closing the second long session:** ``` live.state = "generating" live.running = 1 ESTABLISHED = 2 GPU0 105.5 W / GPU1 133.8 W slot 0 held=43103 | slot 1 held=143 ``` So the request is neither `running`, nor `queued`, nor `waiting`, and there is no TCP connection held by it — yet the client is still on the "waiting for token generation" panel. Whatever booked it in was released without ending the client's turn. ## Evidence ### 1. Both long requests admitted in the same second `/metrics → requests` (server-side bookkeeping; every entry here ends `finish: "stop"`): ``` 00:51:54 prompt=665 reused=0 out=221 44.1 s finish=stop 00:51:55 prompt=38385 reused=0 out=8473 129.8 s finish=stop <- admitted together 00:54:05 prompt=38620 reused=38380 out=4230 43.9 s finish=stop 00:54:50 prompt=39086 reused=38615 out=173 3.1 s finish=stop 00:54:54 prompt=39300 reused=39081 out=78 1.9 s finish=stop 00:54:57 prompt=39452 reused=39295 out=128 2.2 s finish=stop 00:58:04 prompt=40024 reused=39447 out=893 16.3 s finish=stop ``` The server believes it completed everything. The client-side turn never ended. ### 2. BYIELD fires repeatedly — the two slots keep interrupting each other's reads ``` strata batch: the prompt was read in 6 parts, the slots decoding 21138 ms between them strata batch: the prompt was read in 3 parts, the slots decoding 10754 ms between them strata batch: the prompt was read in 2 parts, the slots decoding 2206 ms between them strata batch: the prompt was read in 3 parts, the slots decoding 4180 ms between them strata batch: the prompt was read in 3 parts, the slots decoding 4105 ms between them ``` ### 3. Control experiment - One long session + an empty second slot → **stable**, 100.3 / 102.4 / 108.5 tok/s, expert-cache hit 95–98 %, KV streaming 99.7 % of block reads hitting VRAM, drafts ≈ 72–80 %. - One long session + a *short* request → fine (a short prompt does not need to yield). - **Two long sessions → hang.** Closing one of them resolves it immediately. ### 4. The transport is not the problem A streaming request to the same server completes: `chunks=77`, `finish_reason=stop`, `data: [DONE]` received (`server.py:4985`), 3.5 s. ### 5. Nothing in the log about the hang Neither the engine log nor the server's stdout has any line for the stalled request — no `engine_silence_s` / `STRATA_ENGINE_STALL_S` notice, no engine restart, no error. The request simply never appears. ## Where I would look The admission path in `server.py` around the `d9621d1` comment (0.1.41): ```python # With none free the control lines are given back while waiting: a slot can be held by a read # that gave way (BYIELD) and needs them to go on, so waiting with them is a deadlock - long, # long, short at 0.25 s steps under parallel: 2 (ENGINE_REVIEW finding 1, reproduced in 0.1.41). while True: with self.slot_cv: slot = self.pick_slot(prompt) if slot is not None: self.slot_busy[slot] = True break if holding: self.ctl.release() holding = False ... if not holding: ok = yield from self._take_control(cancel, len(prompt)) ``` `d9621d1` handles "waiting for a slot". Mine is the case where a **yielded read** (the `if self._yielded is not None:` branch just below, and the `BYIELD` sends at `_send(f"BYIELD {slot}")`) and a **waiting admission** contend for the same control lines while a third request is also waiting. The end state (`running: 0` **and** `queued: 0` **and** `waiting: 0` with the client still waiting) suggests the request is dropped from the bookkeeping rather than merely blocked — which is also why `ENGINE_STALL_S` cannot catch it: the frozen-engine check only runs while a request is outstanding. ## What I can provide - Full engine log around the incident - `/metrics` snapshots in both states (hung and healthy) - The config JSON - I can run an instrumented build, `STRATA_DBG_FEAT`, `ROUTE_OVERRIDE`, or any env flags you want ## Workaround (for other users hitting this) Do not run two long-context sessions concurrently on `parallel: 2`. Short requests are safe to run concurrently — they do not trigger a BYIELD yield. A single long session is stable at 100+ tok/s.
Author
Owner

@ylzbj1-stack commented on GitHub (Oct 10, 2026):

Follow-up (2026-10-10): what the engine reports while it is slow — VRAM expert-cache hit rate down to 55.9%, KV streaming down to 0.00%, and drafts accepted 0 of 0 in every DONE

Same rig as the original report (Windows 11 / WDDM, 2x RTX 3080 20 GB layer split, Xeon E5-2696 v3 18C/36T — no AVX-512, 128 GB RAM, Qwen3.8-Flash-Next GSQ-RCO IQ3_XXS + MTP, engine 0.1.41 from the release zip, strata.exe 164,440,576 B). One config change since the report: --batch-groups 1 was added (auto resolves to "2 groups of 1 slot" on this layer split, i.e. the pipelined path — that warning in #1413 is not printed in this session, so this one runs batch_step).

Only two conversations are involved: slot 0 at ~136-137K tokens and slot 1 at ~131-132K tokens, alternating turns. Nothing else is running.

1. The decode expert cache hit rate falls to 55.9% (lowest of 833 such lines in this log)

strata serve: prompt 136878 tokens = 136877 reused + 1 read in 3 ms (332.9 tok/s), 1 generated in 53 ms (18.9 tok/s), drafts accepted 0 of 0, 0 checkpoints
strata serve: decode expert cache hit rate: 55.9% (266 hits / 476 lookups); 4 more read by the GPU over PCIe or from another GPU (0.8% of all 480 routed)
strata serve: KV streaming: 35.78% of 5140 block reads hit VRAM, 13.3 MiB read from RAM

The same numbers appear in /metrics (requests[0].hit_rate = 0.559, pcie_share = 0.008) and in the panel row (VRAM HIT RATE 55.9% +0.8% PCIe), so it is the engine's own accounting, not a UI artifact.

480 routed = one decode window (48 layers x 10 experts); the 210 lookups that did not hit went to the CPU pool, not the disk (ram_blobs 0, file_blobs 0). The batch summary printed for the same window says the same thing for the whole run, so it is not a single cold window:

strata batch: 206 windows, avg 1.00 rows, 50.35 ms/window = run 49.12 (CUDA0 GPU-reach wait 12.45 + CPU experts 11.35) + commit 1.20 + emit 0.04; per layer-window: CPU experts 4.96, VRAM hits 4.86, PCIe 0.18; 5.9 rows/s over 34750 ms of wall time (admissions included)

CPU experts 4.96 vs VRAM hits 4.86 per layer-window = ~50% of the decode's experts computed on the CPU for that whole stretch.

2. It gets worse within one session, and every low value sits next to a slot give-back/take of a ~136K conversation

DONE # decode hit rate ms / decode window KV streaming hit VRAM
1 90.8% 30.55 60.63% of 15410 reads
2 87.9% 60.73 58.92% of 12835 reads
3 90.2% 50.35 (206 windows) 53.93% of 12840 reads
4 65.6% 92.71 (179 windows) 0.00% of 2570 reads
5 55.9% 92.78 (39 windows) 35.78% of 5140 reads

(row 5 is the same session summary as the 206-window run above; the last two rows are the ones preceded by)

strata batch: slot 0 gave back 136876 tokens of this conversation (all it holds) in 1556.1 ms
strata batch: slot 0 takes 136878 tokens (copied in 1497.4 ms)

The previous session on the same 0.1.41 binary with --batch-groups auto and ~100-115K conversations ran 21-35 ms/window, 93-99% expert hit rate and 98.8-99.0% KV hit rate, with 1191 generated in 11390 ms (104.6 tok/s), drafts accepted 819 of 1073. So this is not "0.1.41 is slower"; it is what a 136K x 2 + slot rotation does to both tiers here.

3. Cache sizing at startup on this run (the placement plan does not fit what --batch 2 leaves)

expert cache auto: 14.08 GiB free, 700 MiB reserved (+0 MiB for the draft head) -> 6176 slots
only 0 MiB free once the slots are written (reserve 700 MiB); shrinking the expert cache
only 611 MiB free once the slots are written (reserve 700 MiB); shrinking the expert cache
expert cache 8536 slots, 12.25 GiB of VRAM
layer split: CUDA1 runs layers 23-47, expert cache 6472 slots (11.70 GiB), 6472 of its 12800 profiled pairs
layer split auto: K=23 - predicted 33.8 ms per decode window; the caches hold 17231 of 24576 profiled pairs (~99.0% of the routed mass), best of 46 placements

8536 + 6472 = 15008 resident experts against the 17231 pairs the placement picked, and the prompt path then borrows from the same cache:

strata serve: prompt chunk auto: 8192 tokens, a 96-slot ring
strata serve: the prompt path borrows 2548 CUDA0 cache slots (3.63 GiB)
strata serve:   CUDA1 prompt path borrows 2010 of its 6472 slots (3.63 GiB)

Question: should --batch 2's slot sessions (0.89 GiB on CUDA0) be charged to the placement before the 46 placements are scored, instead of shrinking the cache afterwards and keeping a ~99% prediction?

4. drafts accepted 0 of 0 in every DONE of this session (10/10), including the 1000-token ones

In the previous (--batch-groups auto = pipelined) session the same requests showed suffix drafts: 21 windows, 105 of 105 drafts accepted and drafts accepted 586 of 731. In this session no suffix drafts: line is printed at all and drafts_offered is 0 for all four requests in /metrics. --batch-groups 1 keeps piped = false (generate.cpp:8503), so #1413's mechanism should not apply and its 0.1.41 warning is indeed not printed — but the drafter still produces nothing. Is the per-slot MTP drafter gated on something that batch_step + batch 2 does not satisfy?

5. Small reporting bug found on the way (server side, not engine)

In batch mode the console prints the same engine position for two different requests, with each request's own elapsed time, which reads like a duplicated task:

[strata] reading the prompt: 16,384 of 133,024 tokens, 31 s so far
[strata] reading the prompt: 16,384 of 133,024 tokens, 20 s so far

_progress() (serve/server.py:3399) uses the one global self.engine.progress tuple for X of Y and the per-request started for the elapsed, while prompt_progress() (serve/server.py:3933) already returns None under --batch precisely because "the engine's progress is one global line, not this request's". The log line just does not apply that rule — worth tagging the slot or suppressing it in batch mode.

  • #1604 (filed 4 minutes after this one, cross-references it) — the per-slot conversation cache and the same pipelined path; note the reuse here does work (136077 = 135502 reused + 575), so that failure mode is not what is seen on this box. --conversation-cache-mib is not set here at all (/metrics: conversation_cache_mib 0, enabled false).
  • #1413 (pipelined path + --batch-mtp), #1668 (missed experts; STRATA_ROUTE_TAIL_SKIP / STRATA_ROUTE_PRIOR are not in 0.1.41 — STRATA_ROUTE_RESIDENT is), #1842 (0.1.41 128K decode vs 0.1.40.3; next A/B on this box is STRATA_MMVQ_IL=0, sm_86), #1846 (--expert-cache auto free-VRAM reading on Windows/WDDM).
<!-- gh-comment-id:6098443293 --> @ylzbj1-stack commented on GitHub (Oct 10, 2026): ## Follow-up (2026-10-10): what the engine reports while it is slow — VRAM expert-cache hit rate down to 55.9%, KV streaming down to 0.00%, and `drafts accepted 0 of 0` in every DONE Same rig as the original report (Windows 11 / WDDM, **2x RTX 3080 20 GB** layer split, Xeon E5-2696 v3 18C/36T — **no AVX-512**, 128 GB RAM, Qwen3.8-Flash-Next GSQ-RCO **IQ3_XXS** + MTP, engine **0.1.41** from the release zip, `strata.exe` 164,440,576 B). One config change since the report: **`--batch-groups 1`** was added (`auto` resolves to "2 groups of 1 slot" on this layer split, i.e. the pipelined path — that warning in #1413 is not printed in this session, so this one runs `batch_step`). Only two conversations are involved: slot 0 at ~136-137K tokens and slot 1 at ~131-132K tokens, alternating turns. Nothing else is running. ### 1. The decode expert cache hit rate falls to 55.9% (lowest of 833 such lines in this log) ``` strata serve: prompt 136878 tokens = 136877 reused + 1 read in 3 ms (332.9 tok/s), 1 generated in 53 ms (18.9 tok/s), drafts accepted 0 of 0, 0 checkpoints strata serve: decode expert cache hit rate: 55.9% (266 hits / 476 lookups); 4 more read by the GPU over PCIe or from another GPU (0.8% of all 480 routed) strata serve: KV streaming: 35.78% of 5140 block reads hit VRAM, 13.3 MiB read from RAM ``` The same numbers appear in `/metrics` (`requests[0].hit_rate = 0.559`, `pcie_share = 0.008`) and in the panel row (`VRAM HIT RATE 55.9% +0.8% PCIe`), so it is the engine's own accounting, not a UI artifact. 480 routed = one decode window (48 layers x 10 experts); the 210 lookups that did not hit went to the CPU pool, not the disk (`ram_blobs 0`, `file_blobs 0`). The batch summary printed for the same window says the same thing for the whole run, so it is not a single cold window: ``` strata batch: 206 windows, avg 1.00 rows, 50.35 ms/window = run 49.12 (CUDA0 GPU-reach wait 12.45 + CPU experts 11.35) + commit 1.20 + emit 0.04; per layer-window: CPU experts 4.96, VRAM hits 4.86, PCIe 0.18; 5.9 rows/s over 34750 ms of wall time (admissions included) ``` `CPU experts 4.96` vs `VRAM hits 4.86` per layer-window = ~50% of the decode's experts computed on the CPU for that whole stretch. ### 2. It gets worse within one session, and every low value sits next to a slot give-back/take of a ~136K conversation | DONE # | decode hit rate | ms / decode window | KV streaming hit VRAM | | --- | --- | --- | --- | | 1 | 90.8% | 30.55 | 60.63% of 15410 reads | | 2 | 87.9% | 60.73 | 58.92% of 12835 reads | | 3 | 90.2% | 50.35 (206 windows) | 53.93% of 12840 reads | | 4 | 65.6% | 92.71 (179 windows) | 0.00% of 2570 reads | | 5 | 55.9% | 92.78 (39 windows) | 35.78% of 5140 reads | (row 5 is the same session summary as the 206-window run above; the last two rows are the ones preceded by) ``` strata batch: slot 0 gave back 136876 tokens of this conversation (all it holds) in 1556.1 ms strata batch: slot 0 takes 136878 tokens (copied in 1497.4 ms) ``` The previous session on the **same 0.1.41 binary** with `--batch-groups auto` and ~100-115K conversations ran 21-35 ms/window, 93-99% expert hit rate and 98.8-99.0% KV hit rate, with `1191 generated in 11390 ms (104.6 tok/s), drafts accepted 819 of 1073`. So this is not "0.1.41 is slower"; it is what a 136K x 2 + slot rotation does to both tiers here. ### 3. Cache sizing at startup on this run (the placement plan does not fit what `--batch 2` leaves) ``` expert cache auto: 14.08 GiB free, 700 MiB reserved (+0 MiB for the draft head) -> 6176 slots only 0 MiB free once the slots are written (reserve 700 MiB); shrinking the expert cache only 611 MiB free once the slots are written (reserve 700 MiB); shrinking the expert cache expert cache 8536 slots, 12.25 GiB of VRAM layer split: CUDA1 runs layers 23-47, expert cache 6472 slots (11.70 GiB), 6472 of its 12800 profiled pairs layer split auto: K=23 - predicted 33.8 ms per decode window; the caches hold 17231 of 24576 profiled pairs (~99.0% of the routed mass), best of 46 placements ``` 8536 + 6472 = **15008 resident experts against the 17231 pairs the placement picked**, and the prompt path then borrows from the same cache: ``` strata serve: prompt chunk auto: 8192 tokens, a 96-slot ring strata serve: the prompt path borrows 2548 CUDA0 cache slots (3.63 GiB) strata serve: CUDA1 prompt path borrows 2010 of its 6472 slots (3.63 GiB) ``` Question: should `--batch 2`'s slot sessions (0.89 GiB on CUDA0) be charged to the placement *before* the 46 placements are scored, instead of shrinking the cache afterwards and keeping a ~99% prediction? ### 4. `drafts accepted 0 of 0` in every DONE of this session (10/10), including the 1000-token ones In the previous (`--batch-groups auto` = pipelined) session the same requests showed `suffix drafts: 21 windows, 105 of 105 drafts accepted` and `drafts accepted 586 of 731`. In this session no `suffix drafts:` line is printed at all and `drafts_offered` is 0 for all four requests in `/metrics`. `--batch-groups 1` keeps `piped = false` (`generate.cpp:8503`), so #1413's mechanism should not apply and its 0.1.41 warning is indeed not printed — but the drafter still produces nothing. Is the per-slot MTP drafter gated on something that `batch_step` + `batch 2` does not satisfy? ### 5. Small reporting bug found on the way (server side, not engine) In batch mode the console prints the *same* engine position for two different requests, with each request's own elapsed time, which reads like a duplicated task: ``` [strata] reading the prompt: 16,384 of 133,024 tokens, 31 s so far [strata] reading the prompt: 16,384 of 133,024 tokens, 20 s so far ``` `_progress()` (`serve/server.py:3399`) uses the one global `self.engine.progress` tuple for `X of Y` and the per-request `started` for the elapsed, while `prompt_progress()` (`serve/server.py:3933`) already returns `None` under `--batch` precisely because "the engine's progress is one global line, not this request's". The log line just does not apply that rule — worth tagging the slot or suppressing it in batch mode. ### Related - #1604 (filed 4 minutes after this one, cross-references it) — the per-slot conversation cache and the same pipelined path; note the reuse here does work (`136077 = 135502 reused + 575`), so that failure mode is not what is seen on this box. `--conversation-cache-mib` is not set here at all (`/metrics`: `conversation_cache_mib 0`, `enabled false`). - #1413 (pipelined path + `--batch-mtp`), #1668 (missed experts; `STRATA_ROUTE_TAIL_SKIP` / `STRATA_ROUTE_PRIOR` are not in 0.1.41 — `STRATA_ROUTE_RESIDENT` is), #1842 (0.1.41 128K decode vs 0.1.40.3; next A/B on this box is `STRATA_MMVQ_IL=0`, sm_86), #1846 (`--expert-cache auto` free-VRAM reading on Windows/WDDM).
Author
Owner

@ylzbj1-stack commented on GitHub (Oct 10, 2026):

Follow-up (2026-10-10): with --batch-groups auto (piped) a long prompt read is not split into parts, and the other pipeline group's decode freezes — --batch-groups 1 splits it and keeps the decoder at 5-13 tok/s

Different signature from the original report, same rig and same two long conversations: here running: 2 (no hang, no queue) but one slot makes no progress for minutes. Config A/B, only --batch-groups differs between the two launches.

0. Rig and the two launches

Windows 11 / WDDM, 2x RTX 3080 20 GB, layer split auto, Xeon E5-2696 v3 (18C/36T, no AVX-512), 128 GB RAM, Qwen3.8-Flash-Next GSQ-RCO IQ3_XXS + MTP, engine 0.1.41 from the release zip, "parallel": 2, --expert-cache auto --prefill auto --spec 4 --mtp <rt> --max-context 262144 --kv int8 --kv-resident 32768 --vision --vram-reserve-mib 700 --spec-min-p 0.5 --layer-split auto --batch 2. The two launch lines differ in exactly one argument:

21:57 launch: ... --prefill auto --batch-groups 1    --spec 4 ...   (engine 0.1.41)
23:06 launch: ... --prefill auto --batch-groups auto --spec 4 ...   (engine 0.1.41)

auto picks --batch-groups auto: 2 groups of 1 slot (so piped = true), 1 turns it off. Side effects of the two placings, for completeness: expert cache 15008 slots (batch-groups 1) vs 14833 (auto), layer split 0-22/23-47 vs 0-24/25-47.

1. Measured, settings auto (piped): the read is one run, and the other group stops

/metrics sampled every ~20 s while one slot read a 160K prompt and the other was "decoding":

time slot 0 (decoding) slot 1 hw GPU PCIe rx
23:12:20 prompt 166292, gen 4, elapsed 78.4 s, 0.1 tok/s reading 160274, elapsed 76.7 s 0.05 tok/s 62 % 3502 MB/s
23:12:41 prompt 166292, gen 4, elapsed 99.6 s, 0.0 tok/s reading 160274, elapsed 98.0 s 0.04 tok/s 80 % 3970 MB/s
23:13:02 prompt 166292, gen 4, elapsed 120.2 s, 0.0 tok/s reading 160274, elapsed 118.5 s 0.03 tok/s 46 % 4957 MB/s

4 tokens in 120 s (0.03-0.1 tok/s), and the token counter does not move at all across those 42 s — while PCIe carries 3.5-5.0 GB/s and the GPU sits at 46-80 %, i.e. the machine is busy with the other group's read. The engine's log for that read:

strata serve: prompt 166291 tokens = 0 reused + 166291 read in 68978 ms (2410.8 tok/s), 1 generated in 39 ms (25.5 tok/s), drafts accepted 0 of 0, 6 checkpoints
strata batch: slot 0 takes 166292 tokens (copied in 1526.6 ms)
strata serve: prompt 166292 tokens = 166291 reused + 1 read in 4 ms (273.7 tok/s), 1 generated in 16 ms (63.7 tok/s), drafts accepted 0 of 0, 6 checkpoints
strata serve: decode expert cache hit rate: 97.5% (468 hits / 480 lookups)
strata serve: KV streaming: 60.54% of 18480 block reads hit VRAM, 29.4 MiB read from RAM

Note what is absent from that whole session: strata batch: the prompt was read in N parts, the slots decoding X ms between them. (The cache side is fine here: 97.5 % expert hit rate, finish: stop, no disconnect.)

2. Measured, settings 1 (not piped): the same read is split and the decoder keeps moving

strata batch: the prompt was read in 13 parts, the slots decoding 35471 ms between them
strata batch: the prompt was read in 4 parts, the slots decoding 10230 ms between them
strata batch: the prompt was read in 17 parts, the slots decoding 48759 ms between them

Same two long conversations, same --batch 2, parallel: 2. The read of a 130-160K prompt then costs 127-190 s (740-1200 tok/s, i.e. it pays for the interleaving), but the other slot kept decoding: measured over 20 s of /metrics deltas, generated 1222 -> 1489 = 13.4 tok/s (console showed 4.9-5.5 tok/s instantaneous, decode windows 30-93 ms).

So the two settings trade the two goals off differently — auto makes a fresh 166K read 2-3x faster (2410 tok/s vs 740-1200) at the cost of starving the parallel decode to ~0, and 1 does the opposite. Neither is a "both" answer.

3. Why: read_part() skips the interleave whenever piped

src/program/generate.cpp (0.1.41), inside the batched prompt read:

// (a layer split reads its stages as a pipeline over one run's chunks: in pieces only beside slots)
if (o.batch <= 0 || piped || (!stages.empty() && !batch_on())) return sp.run(ids.data() + a0, b0 - a0, a0, e);
const int64_t C = std::max<int64_t>(sp.chunk(), 1);
for (int64_t q = a0; q < b0;) {
    ... sp.run(ids.data() + q, r - q, q, e);          // one chunk
    if (decode_share <= 0.0 || !batch_on()) continue;
    const double budget = decode_share * ...(now - tq)...;   // STRATA_BATCH_DECODE_SHARE, default 0.5
    do { batch_step(); } while (batch_on() && ... < budget);
    ++il_parts;

With piped the whole prompt goes through sp.run(...) in one call, so the decode_share budget, the batch_step() loop and il_parts never run: STRATA_BATCH_DECODE_SHARE (and any chunk-boundary yield to the slots) is inert under --batch-groups G > 1. That matches the log exactly — no read in N parts line, and the other group only gets whatever the stage overlap gives it.

The comment says this is deliberate (the layer split is meant to overlap stages instead), and docs/BATCHING.md:40 documents the piped aggregate gain ("2 GPUs 109 against 78"), and :132 says a pipelined slot is a conversation cache again and "a request left alone in its slot goes back to the solo path with its drafts" — which holds when the other slot is idle. What is not documented anywhere I could find is the per-request case below: two busy slots, one of them reading a 160K prompt, the other decoding at 0.03 tok/s for two minutes.

4. Questions

  1. Is a chunk-boundary yield (or a decode share) supposed to work under piped too? If not, is the intent that a long read may starve the other group until it finishes — and should --batch-groups auto be the default for a 2-slot setup where both slots hold 130-160K conversations?
  2. STRATA_BATCH_DECODE_SHARE: setting it under --batch-groups auto changes nothing here, because the block that reads it is skipped when piped. Worth saying in the docs, or moving the check?
  3. If the two-group pipeline can only overlap stages when both groups are decoding, would a "read in parts" mode for the piped path be acceptable (it costs read throughput: 2410 -> 740-1200 tok/s here)?

5. What I run now

"parallel": 1 — with one request at a time the read is a single fast run (2410 tok/s) and nothing else competes, so the 0.03 tok/s case cannot happen. It does mean the client's second conversation waits.

  • The original #1603 report (parallel: 2 + two long sessions, hang with running: 0): different signature, possibly the same two-slot contention. #1604 cross-references both.
  • #1413 (--batch-groups G>1 + --batch-mtp inert on the piped path) — same piped flag; note the piped path also reports drafts accepted 0 of 0 on every admission in this session, while the non-piped session had working drafts and suffix drafts: lines.
  • #1668 (missed experts, STRATA_ROUTE_TAIL_SKIP / STRATA_ROUTE_PRIOR) — those two are not in 0.1.41, STRATA_ROUTE_RESIDENT is.
  • #1842 (0.1.41 128K decode slower on sm_89; the per-arch MMVQ table has no entry for unmeasured cards). This box is sm_86.
  • #1740 and #1763 are NOT this: #1740 is a real --pipeline-windows 2 / cudaSetDevice stall (60 s, then a restart), and #1763's fix is an unmerged PR touching sycl/serve/server_intel.py only.
<!-- gh-comment-id:6099003814 --> @ylzbj1-stack commented on GitHub (Oct 10, 2026): ## Follow-up (2026-10-10): with `--batch-groups auto` (piped) a long prompt read is **not** split into parts, and the other pipeline group's decode freezes — `--batch-groups 1` splits it and keeps the decoder at 5-13 tok/s Different signature from the original report, same rig and same two long conversations: here `running: 2` (no hang, no queue) but one slot makes **no progress for minutes**. Config A/B, only `--batch-groups` differs between the two launches. ### 0. Rig and the two launches Windows 11 / WDDM, **2x RTX 3080 20 GB**, layer split `auto`, Xeon E5-2696 v3 (18C/36T, **no AVX-512**), 128 GB RAM, Qwen3.8-Flash-Next GSQ-RCO **IQ3_XXS** + MTP, engine 0.1.41 from the release zip, `"parallel": 2`, `--expert-cache auto --prefill auto --spec 4 --mtp <rt> --max-context 262144 --kv int8 --kv-resident 32768 --vision --vram-reserve-mib 700 --spec-min-p 0.5 --layer-split auto --batch 2`. The two launch lines differ in exactly one argument: ``` 21:57 launch: ... --prefill auto --batch-groups 1 --spec 4 ... (engine 0.1.41) 23:06 launch: ... --prefill auto --batch-groups auto --spec 4 ... (engine 0.1.41) ``` `auto` picks `--batch-groups auto: 2 groups of 1 slot` (so `piped = true`), `1` turns it off. Side effects of the two placings, for completeness: expert cache 15008 slots (batch-groups 1) vs 14833 (auto), layer split 0-22/23-47 vs 0-24/25-47. ### 1. Measured, settings `auto` (piped): the read is one run, and the other group stops `/metrics` sampled every ~20 s while one slot read a 160K prompt and the other was "decoding": | time | slot 0 (decoding) | slot 1 | hw | GPU | PCIe rx | | --- | --- | --- | --- | --- | --- | | 23:12:20 | prompt 166292, **gen 4**, elapsed 78.4 s, 0.1 tok/s | reading 160274, elapsed 76.7 s | 0.05 tok/s | 62 % | 3502 MB/s | | 23:12:41 | prompt 166292, **gen 4**, elapsed 99.6 s, 0.0 tok/s | reading 160274, elapsed 98.0 s | 0.04 tok/s | 80 % | 3970 MB/s | | 23:13:02 | prompt 166292, **gen 4**, elapsed 120.2 s, 0.0 tok/s | reading 160274, elapsed 118.5 s | 0.03 tok/s | 46 % | 4957 MB/s | **4 tokens in 120 s (0.03-0.1 tok/s), and the token counter does not move at all across those 42 s** — while PCIe carries 3.5-5.0 GB/s and the GPU sits at 46-80 %, i.e. the machine is busy with the other group's read. The engine's log for that read: ``` strata serve: prompt 166291 tokens = 0 reused + 166291 read in 68978 ms (2410.8 tok/s), 1 generated in 39 ms (25.5 tok/s), drafts accepted 0 of 0, 6 checkpoints strata batch: slot 0 takes 166292 tokens (copied in 1526.6 ms) strata serve: prompt 166292 tokens = 166291 reused + 1 read in 4 ms (273.7 tok/s), 1 generated in 16 ms (63.7 tok/s), drafts accepted 0 of 0, 6 checkpoints strata serve: decode expert cache hit rate: 97.5% (468 hits / 480 lookups) strata serve: KV streaming: 60.54% of 18480 block reads hit VRAM, 29.4 MiB read from RAM ``` Note what is **absent** from that whole session: `strata batch: the prompt was read in N parts, the slots decoding X ms between them`. (The cache side is fine here: 97.5 % expert hit rate, `finish: stop`, no disconnect.) ### 2. Measured, settings `1` (not piped): the same read is split and the decoder keeps moving ``` strata batch: the prompt was read in 13 parts, the slots decoding 35471 ms between them strata batch: the prompt was read in 4 parts, the slots decoding 10230 ms between them strata batch: the prompt was read in 17 parts, the slots decoding 48759 ms between them ``` Same two long conversations, same `--batch 2`, `parallel: 2`. The read of a 130-160K prompt then costs 127-190 s (740-1200 tok/s, i.e. it pays for the interleaving), but the other slot kept decoding: measured over 20 s of `/metrics` deltas, `generated 1222 -> 1489` = **13.4 tok/s** (console showed 4.9-5.5 tok/s instantaneous, decode windows 30-93 ms). So the two settings trade the two goals off differently — `auto` makes a fresh 166K read 2-3x faster (2410 tok/s vs 740-1200) at the cost of starving the parallel decode to ~0, and `1` does the opposite. Neither is a "both" answer. ### 3. Why: `read_part()` skips the interleave whenever `piped` `src/program/generate.cpp` (0.1.41), inside the batched prompt read: ```cpp // (a layer split reads its stages as a pipeline over one run's chunks: in pieces only beside slots) if (o.batch <= 0 || piped || (!stages.empty() && !batch_on())) return sp.run(ids.data() + a0, b0 - a0, a0, e); const int64_t C = std::max<int64_t>(sp.chunk(), 1); for (int64_t q = a0; q < b0;) { ... sp.run(ids.data() + q, r - q, q, e); // one chunk if (decode_share <= 0.0 || !batch_on()) continue; const double budget = decode_share * ...(now - tq)...; // STRATA_BATCH_DECODE_SHARE, default 0.5 do { batch_step(); } while (batch_on() && ... < budget); ++il_parts; ``` With `piped` the whole prompt goes through `sp.run(...)` in one call, so the `decode_share` budget, the `batch_step()` loop and `il_parts` never run: `STRATA_BATCH_DECODE_SHARE` (and any chunk-boundary yield to the slots) is inert under `--batch-groups G > 1`. That matches the log exactly — no `read in N parts` line, and the other group only gets whatever the stage overlap gives it. The comment says this is deliberate (the layer split is meant to overlap stages instead), and `docs/BATCHING.md:40` documents the piped **aggregate** gain ("2 GPUs 109 against 78"), and `:132` says a pipelined slot is a conversation cache again and "a request left alone in its slot goes back to the solo path with its drafts" — which holds when the other slot is idle. What is not documented anywhere I could find is the **per-request** case below: two busy slots, one of them reading a 160K prompt, the other decoding at 0.03 tok/s for two minutes. ### 4. Questions 1. Is a chunk-boundary yield (or a decode share) supposed to work under `piped` too? If not, is the intent that a long read may starve the other group until it finishes — and should `--batch-groups auto` be the default for a 2-slot setup where both slots hold 130-160K conversations? 2. `STRATA_BATCH_DECODE_SHARE`: setting it under `--batch-groups auto` changes nothing here, because the block that reads it is skipped when `piped`. Worth saying in the docs, or moving the check? 3. If the two-group pipeline can only overlap stages when both groups are decoding, would a "read in parts" mode for the piped path be acceptable (it costs read throughput: 2410 -> 740-1200 tok/s here)? ### 5. What I run now `"parallel": 1` — with one request at a time the read is a single fast run (2410 tok/s) and nothing else competes, so the 0.03 tok/s case cannot happen. It does mean the client's second conversation waits. ### Related - The original #1603 report (parallel: 2 + two long sessions, hang with `running: 0`): different signature, possibly the same two-slot contention. #1604 cross-references both. - #1413 (`--batch-groups G>1` + `--batch-mtp` inert on the piped path) — same `piped` flag; note the piped path also reports `drafts accepted 0 of 0` on every admission in this session, while the non-piped session had working drafts and `suffix drafts:` lines. - #1668 (missed experts, `STRATA_ROUTE_TAIL_SKIP` / `STRATA_ROUTE_PRIOR`) — those two are not in 0.1.41, `STRATA_ROUTE_RESIDENT` is. - #1842 (0.1.41 128K decode slower on sm_89; the per-arch MMVQ table has no entry for unmeasured cards). This box is sm_86. - #1740 and #1763 are NOT this: #1740 is a real `--pipeline-windows 2` / `cudaSetDevice` stall (60 s, then a restart), and #1763's fix is an unmerged PR touching `sycl/serve/server_intel.py` only.
Author
Owner

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

Thanks, the metrics captures were the key. We could not reproduce your exact hang, so we hardened every state in the server where a parallel request could be invisible: (1) a busy slot flag with no owner (no request holds it, no BDONE wait is running) is now freed after 3 s, with a log line, so a request waiting for a slot cannot wait for one nothing will free; (2) a request waiting for a slot is counted (metrics: live.admitting) and, after the stall time (STRATA_ENGINE_STALL_S, 90 s), the log names what is busy and who owns it; (3) a parallel request on a loaded engine no longer takes the FIFO (which an image encode, /v1/vram or a load can hold), and a request that waits for it to start the engine now stays counted as queued instead of being neither running nor queued. There is a fake-engine serve test for each (before the change two of them hang). If it still happens on v0.1.42, the log line from (2) and /metrics at that moment will tell us which state it is in.

<!-- gh-comment-id:6099629504 --> @Niko1221 commented on GitHub (Oct 10, 2026): Thanks, the metrics captures were the key. We could not reproduce your exact hang, so we hardened every state in the server where a parallel request could be invisible: (1) a busy slot flag with no owner (no request holds it, no BDONE wait is running) is now freed after 3 s, with a log line, so a request waiting for a slot cannot wait for one nothing will free; (2) a request waiting for a slot is counted (metrics: live.admitting) and, after the stall time (STRATA_ENGINE_STALL_S, 90 s), the log names what is busy and who owns it; (3) a parallel request on a loaded engine no longer takes the FIFO (which an image encode, /v1/vram or a load can hold), and a request that waits for it to start the engine now stays counted as queued instead of being neither running nor queued. There is a fake-engine serve test for each (before the change two of them hang). If it still happens on v0.1.42, the log line from (2) and /metrics at that moment will tell us which state it is in.
Author
Owner

@ylzbj1-stack commented on GitHub (Oct 11, 2026):

Follow-up: a mid-decode hang that never recovered and blocked the whole server (parallel:1).

Engine 0.1.42, "parallel": 1, ~190K context, Windows. State at the time of the hang:

  • Process alive (strata.exe, 74.3 GB working set, PID unchanged).
  • Port 8087 still Listening; a client connection was Established (and an earlier one sat in CloseWait).
  • The server-console log stopped at 15:17:55 and did not grow for the next 85 minutes (verified: two samples 3 s apart, byte counts identical). It should have been a healthy idle server, it was not.

The request that hung

[strata] req openai: msgs=457 tools=32 max_tokens_raw=None/None max_new=89225 thinking=True stream=True prompt_tokens=172911 last='tool':'{"bytes_written": 991, "dirs_created": true ...'
[strata] thinking capped at 66919 of max_tokens 89225 to leave room for the answer (budget 128000)
[strata] reading the prompt: 129,887 tokens, 10 s so far
... (read completes at 129,886 of 129,887, 152 s) ...
[strata] thinking: 32 of budget 99187 (max 132249) tokens, 30.0 tok/s, 153 s
[strata] writing a tool call: skill_manage: 69 of max 132249 tokens, 33.1 tok/s, 154 s
[strata] writing a tool call: skill_manage: 109 of max 132249 tokens, 34.7 tok/s, 155 s
[strata] writing a tool call: skill_manage: 146 of max 132249 tokens, 34.9 tok/s, 156 s
[strata] writing a tool call: skill_manage: 188 of max 132249 tokens, 36.2 tok/s, 157 s
<-- nothing after this line, for 85 minutes -->

Read the request line twice, because the numbers disagree with themselves:

  • the request says max_new=89225 / max_tokens 89225
  • the cap line says max_tokens 89225
  • then the very next lines say budget 99187 (max 132249) -- a different number again.

I am not sure which is a bug and which is just two different counters (the request's cap vs the slot's cap), but the three numbers on four consecutive lines (89225, 89225, 99187, 132249) are worth a look on their own.

What is wrong, independent of the trigger

  1. No stall detection fires. We have the 90 s stall log from #1603 and it did not print. If that check only covers admission, it needs to cover mid-decode too -- a generation that produces no token for 85 minutes is exactly the case it is for.
  2. No timeout, no auto-cancel. A hung generation is never killed, so the slot is held forever.
  3. At "parallel": 1 a single hung request means the whole engine is dead for new work. New TCP connections are accepted (Established) but nothing is ever served. From the client side it looks like the server vanished, when the process is in fact alive and holding 74 GB.

Suggestion

  • Add a watchdog for in-flight generations: if no token is produced for N seconds (N well above the slowest read seen here, which was ~195 s for 190K tokens, so maybe 300 s), log it with the token index like the read lines do, and abort the request.
  • On abort, release the slot and answer the waiting connection with an error instead of leaving it Established forever.
  • Consider whether the stall log should fire on the read path too, not only after admission.

Note

This is not the #1603 hang pattern I could reproduce before (that one was at admission). This one is mid-decode: three tool-call progress lines were printed, then silence. The last emitted token index was 188 of a 132249 cap, so truncation is not the cause either.

Restarting the engine cleared it (a fresh start at 16:47:40 loads normally), i.e. the process was not crashed, only stuck.

<!-- gh-comment-id:6107293739 --> @ylzbj1-stack commented on GitHub (Oct 11, 2026): Follow-up: a mid-decode hang that never recovered and blocked the whole server (parallel:1). Engine 0.1.42, "parallel": 1, ~190K context, Windows. State at the time of the hang: - Process alive (strata.exe, 74.3 GB working set, PID unchanged). - Port 8087 still Listening; a client connection was Established (and an earlier one sat in CloseWait). - The server-console log stopped at 15:17:55 and did not grow for the next 85 minutes (verified: two samples 3 s apart, byte counts identical). It should have been a healthy idle server, it was not. ## The request that hung ``` [strata] req openai: msgs=457 tools=32 max_tokens_raw=None/None max_new=89225 thinking=True stream=True prompt_tokens=172911 last='tool':'{"bytes_written": 991, "dirs_created": true ...' [strata] thinking capped at 66919 of max_tokens 89225 to leave room for the answer (budget 128000) [strata] reading the prompt: 129,887 tokens, 10 s so far ... (read completes at 129,886 of 129,887, 152 s) ... [strata] thinking: 32 of budget 99187 (max 132249) tokens, 30.0 tok/s, 153 s [strata] writing a tool call: skill_manage: 69 of max 132249 tokens, 33.1 tok/s, 154 s [strata] writing a tool call: skill_manage: 109 of max 132249 tokens, 34.7 tok/s, 155 s [strata] writing a tool call: skill_manage: 146 of max 132249 tokens, 34.9 tok/s, 156 s [strata] writing a tool call: skill_manage: 188 of max 132249 tokens, 36.2 tok/s, 157 s <-- nothing after this line, for 85 minutes --> ``` Read the request line twice, because the numbers disagree with themselves: - the request says `max_new=89225` / `max_tokens 89225` - the cap line says `max_tokens 89225` - then the very next lines say `budget 99187 (max 132249)` -- a different number again. I am not sure which is a bug and which is just two different counters (the request's cap vs the slot's cap), but the three numbers on four consecutive lines (89225, 89225, 99187, 132249) are worth a look on their own. ## What is wrong, independent of the trigger 1. No stall detection fires. We have the 90 s stall log from #1603 and it did not print. If that check only covers admission, it needs to cover mid-decode too -- a generation that produces no token for 85 minutes is exactly the case it is for. 2. No timeout, no auto-cancel. A hung generation is never killed, so the slot is held forever. 3. At "parallel": 1 a single hung request means the whole engine is dead for new work. New TCP connections are accepted (Established) but nothing is ever served. From the client side it looks like the server vanished, when the process is in fact alive and holding 74 GB. ## Suggestion - Add a watchdog for in-flight generations: if no token is produced for N seconds (N well above the slowest read seen here, which was ~195 s for 190K tokens, so maybe 300 s), log it with the token index like the read lines do, and abort the request. - On abort, release the slot and answer the waiting connection with an error instead of leaving it Established forever. - Consider whether the stall log should fire on the read path too, not only after admission. ## Note This is not the #1603 hang pattern I could reproduce before (that one was at admission). This one is mid-decode: three tool-call progress lines were printed, then silence. The last emitted token index was 188 of a 132249 cap, so truncation is not the cause either. Restarting the engine cleared it (a fresh start at 16:47:40 loads normally), i.e. the process was not crashed, only stuck.
Author
Owner

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

Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.

If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.

<!-- gh-comment-id:6156149915 --> @Niko1221 commented on GitHub (Oct 13, 2026): Thanks for the report. To keep the tracker current we are closing issues older than three days: [0.1.44](https://github.com/Niko1221/Strata/releases/tag/v0.1.44) is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1. If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.
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#640
No description provided.