[GH-ISSUE #1527] serve: the engine READY read times out and the engine is killed, but the pending request is still held (0.1.40.3) #615

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

Originally created by @justxiami on GitHub (Oct 8, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1527

Summary

The read timeouts that 0.1.40.2 took from #1317 do bound the engine READY read (the hung engine gets killed), but the request turn is not released: the client gets no response and the server prints no reason. Tested on a pristine v0.1.40.3 checkout, so this is not a merge artifact of my tree.

The same server does fail cleanly in the neighbouring case — engine already READY, then silent during a request: HTTP 503 with a clear message after engine_silence_s. So the gap is specific to "the engine is alive but never reports READY".

This is a serve-only finding: no GPU, no model, no engine binary is needed to reproduce.

What 0.1.40.2 fixed, and what is left

From #1317 (still open), and @Niko1221's reply: "0.1.40.2 takes the read timeouts: the engine's READY read now gives up after 900 s, and the image encoder's READY and ENC reads after 300 s each … A process that says nothing for that long is killed, the request fails with a clear message and the next one starts it again."

Measured on 0.1.40.3 (both claims tested, same machine, same fake processes, STRATA_ENGINE_READY_S=8, engine_silence_s=60 in the config):

Scenario Engine process The request turn
Engine never reports READY (load path) killed at ~8 s — the timeout fires no HTTP response at all: 130.00 s on 0.1.40.3, 320.00 s on our build; curl reports code=000; the server prints nothing containing did not report READY (0 hits)
Vision encoder starts and says nothing killed at 8 s fails with RuntimeError: the vision encoder did not start: it said nothing for 8 s (serve/server.py:1716)
Engine READY, then silent mid-request ended by the watchdog HTTP 503 at 61.14 s: the engine said nothing for 61 s during the request; the server ended the engine; the next request restarts it

So "killed" is delivered, "the request fails with a clear message" is not delivered in the first row.

Reproduction (no GPU, no model, no engine build)

  1. A fake engine that starts and never says READY:
#!/bin/bash
# fake_engine_silent.sh
trap 'exit 0' TERM INT
sleep 3600
  1. A config that points exe at it (any existing serve config works; vision removed, log and cwd pointed at a scratch dir).

  2. Start serve with --lazy so the port is bound before any loading, then send one request:

STRATA_ENGINE_READY_S=8 python serve/server.py --engine strata \
  --config /tmp/cfg.json --port 8099 --host 127.0.0.1 --tokenizer <a real tokenizer dir> --lazy

curl -s -m 130 -o out.json -w "%{http_code} %{time_total}s\n" \
  http://127.0.0.1:8099/v1/chat/completions -H 'Content-Type: application/json' \
  -d '{"model":"qwen3.8-flash-next","temperature":0,"max_tokens":8,"messages":[{"role":"user","content":"hi"}]}'

Expected (the patch's promise): the request ends with a clear failure. Actual: the request never returns (curl gives 000 130.00 s), the server's stdout stops at

[strata] loading the model again (it was unloaded) ...
[strata] starting the engine: reading the model's weights ...

and nothing more. The fake engine is gone by the first status check after the timeout, so the READY read did give up.

The control arm (the second row above) is the same script with this fake engine instead:

#!/bin/bash
# fake_engine_ready.sh — says READY, then never answers again
printf 'READY 32768 stop\n'
trap 'exit 0' TERM INT
while IFS= read -r _; do :; done

That one returns 503 with the reason in 61.14 s.

Why the existing watchdogs do not cover it

  • engine_silence_s (#481) is armed after the request has been handed to the engine; here the blocking read never returns before the request is armed. #1317's own report says this.
  • The engine-side #29 watchdog only counts while a request is running; the engine never got one.
  • #1317's patch also carried a stall watchdog that watches both log silence and the engine's CPU time (ENGINE_STALL_S, _cpu_flat_for, _cpu_seconds, _frozen(, gen_active, last_line_at). A pristine v0.1.40.3 serve/server.py has 0 occurrences of all six, so that half of the patch was not taken. (Not the cause of the row-1 gap — the READY timeout does fire — but it is the reason nothing else notices a load that never completes.)

What I did not determine

I did not localise which wait keeps the request thread. The READY timeout raises RuntimeError, restart() catches it and retries (RESTART_RETRY_S), re-raising only on the last try — yet no retry line ("the engine did not start (try i of N)") is printed in this scenario, and the client socket stays open with no bytes. Also untested: whether the same holds without --lazy (in that case the port is never bound at all, so a client cannot even connect — during a cold-start hang the server offers nothing, which is arguably a separate symptom).

What I would want

Once the READY read times out and the engine has been killed, the load attempt should fail the pending request the same way the #481 path does — 503 plus the reason the server already computed — and let the next request start a new engine, instead of holding that turn open.

Environment

  • Pristine v0.1.40.3 tree (serve/server.py md5 c7a94436b69f) and, as a second arm, a 0.1.40.1-based serve carrying the three #1317 commits merged by hand (md5 9b690b1249a7). Same result in both.
  • Linux (Ubuntu), Python 3.12, 4×V100 (sm_70) host, --layer-split 12,24,36 in the config used for the arms (irrelevant: the engine is a stub).
  • Both arms run side by side on ports 8098/8099 with the same config file and the same fake processes; the only difference between the arms is which serve/server.py is started.
Originally created by @justxiami on GitHub (Oct 8, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1527 ## Summary The read timeouts that 0.1.40.2 took from #1317 do bound the **engine `READY` read** (the hung engine gets killed), but the request turn is **not released**: the client gets no response and the server prints no reason. Tested on a pristine `v0.1.40.3` checkout, so this is not a merge artifact of my tree. The same server does fail cleanly in the neighbouring case — engine already `READY`, then silent during a request: HTTP 503 with a clear message after `engine_silence_s`. So the gap is specific to "the engine is alive but never reports READY". This is a serve-only finding: no GPU, no model, no engine binary is needed to reproduce. ## What 0.1.40.2 fixed, and what is left From #1317 (still open), and @Niko1221's reply: *"0.1.40.2 takes the read timeouts: the engine's READY read now gives up after 900 s, and the image encoder's READY and ENC reads after 300 s each … A process that says nothing for that long is killed, the request fails with a clear message and the next one starts it again."* Measured on 0.1.40.3 (both claims tested, same machine, same fake processes, `STRATA_ENGINE_READY_S=8`, `engine_silence_s=60` in the config): | Scenario | Engine process | The request turn | |---|---|---| | Engine never reports `READY` (load path) | killed at ~8 s — the timeout fires | **no HTTP response at all**: 130.00 s on 0.1.40.3, 320.00 s on our build; `curl` reports `code=000`; the server prints nothing containing `did not report READY` (0 hits) | | Vision encoder starts and says nothing | killed at 8 s | fails with `RuntimeError: the vision encoder did not start: it said nothing for 8 s` (`serve/server.py:1716`) | | Engine `READY`, then silent mid-request | ended by the watchdog | **HTTP 503 at 61.14 s**: `the engine said nothing for 61 s during the request; the server ended the engine; the next request restarts it` | So "killed" is delivered, "the request fails with a clear message" is not delivered in the first row. ## Reproduction (no GPU, no model, no engine build) 1. A fake engine that starts and never says `READY`: ```bash #!/bin/bash # fake_engine_silent.sh trap 'exit 0' TERM INT sleep 3600 ``` 2. A config that points `exe` at it (any existing serve config works; `vision` removed, `log` and `cwd` pointed at a scratch dir). 3. Start serve with `--lazy` so the port is bound before any loading, then send one request: ```bash STRATA_ENGINE_READY_S=8 python serve/server.py --engine strata \ --config /tmp/cfg.json --port 8099 --host 127.0.0.1 --tokenizer <a real tokenizer dir> --lazy curl -s -m 130 -o out.json -w "%{http_code} %{time_total}s\n" \ http://127.0.0.1:8099/v1/chat/completions -H 'Content-Type: application/json' \ -d '{"model":"qwen3.8-flash-next","temperature":0,"max_tokens":8,"messages":[{"role":"user","content":"hi"}]}' ``` Expected (the patch's promise): the request ends with a clear failure. Actual: the request never returns (curl gives `000 130.00 s`), the server's stdout stops at ``` [strata] loading the model again (it was unloaded) ... [strata] starting the engine: reading the model's weights ... ``` and nothing more. The fake engine is gone by the first status check after the timeout, so the `READY` read did give up. The control arm (the second row above) is the same script with this fake engine instead: ```bash #!/bin/bash # fake_engine_ready.sh — says READY, then never answers again printf 'READY 32768 stop\n' trap 'exit 0' TERM INT while IFS= read -r _; do :; done ``` That one returns 503 with the reason in 61.14 s. ## Why the existing watchdogs do not cover it - `engine_silence_s` (#481) is armed after the request has been handed to the engine; here the blocking read never returns before the request is armed. #1317's own report says this. - The engine-side #29 watchdog only counts while a request is running; the engine never got one. - #1317's patch also carried a stall watchdog that watches both log silence and the engine's CPU time (`ENGINE_STALL_S`, `_cpu_flat_for`, `_cpu_seconds`, `_frozen(`, `gen_active`, `last_line_at`). A pristine `v0.1.40.3` `serve/server.py` has **0 occurrences of all six**, so that half of the patch was not taken. (Not the cause of the row-1 gap — the `READY` timeout does fire — but it is the reason nothing else notices a load that never completes.) ## What I did not determine I did not localise which wait keeps the request thread. The `READY` timeout raises `RuntimeError`, `restart()` catches it and retries (`RESTART_RETRY_S`), re-raising only on the last try — yet no retry line ("the engine did not start (try i of N)") is printed in this scenario, and the client socket stays open with no bytes. Also untested: whether the same holds without `--lazy` (in that case the port is never bound at all, so a client cannot even connect — during a cold-start hang the server offers nothing, which is arguably a separate symptom). ## What I would want Once the `READY` read times out and the engine has been killed, the load attempt should fail the pending request the same way the #481 path does — 503 plus the reason the server already computed — and let the next request start a new engine, instead of holding that turn open. ## Environment - Pristine `v0.1.40.3` tree (`serve/server.py` md5 `c7a94436b69f`) and, as a second arm, a 0.1.40.1-based serve carrying the three #1317 commits merged by hand (md5 `9b690b1249a7`). Same result in both. - Linux (Ubuntu), Python 3.12, 4×V100 (sm_70) host, `--layer-split 12,24,36` in the config used for the arms (irrelevant: the engine is a stub). - Both arms run side by side on ports 8098/8099 with the same config file and the same fake processes; the only difference between the arms is which `serve/server.py` is started.
Author
Owner

@justxiami commented on GitHub (Oct 8, 2026):

Evidence 1 of 2 — the scripts that ran, verbatim

Script comments are in Chinese; the code is exactly what ran. My absolute paths are left as-is; only serve/server.py, --config, --port and the config's exe field matter here.

Provenance of the serve files:

tree file md5 (first 12) note
pristine v0.1.40.3 (codeload tarball 17,049,420 B, sha256 prefix a91cca637dc910a8, 2598 entries, project(strata VERSION 0.1.40.3)) serve/server.py c7a94436b69f unmodified
my build src/serve/server.py 9b690b1249a7 0.1.40.1 official serve + the three #1317 commits merged by hand
the build I replaced today src/serve/server.py 2b640a00dad3 0.1.39 serve, no read timeouts — the control in the first drill set

Every drill starts serve on port 8098 or 8099 with a stub exe, never runs the engine binary, and ends with a residual check (production :8095 listener = 1, stub processes = 0). No GPU work happens in these arms: the stub exits on TERM.

stub engine that starts and never reports READY (exe override)

#!/bin/bash
trap 'exit 0' TERM INT
sleep 3600

stub engine that reports READY once, then never answers again

#!/bin/bash
# 说 READY 之后就不吭声(把 stdin 吃掉,永不回话)
printf 'READY 32768 stop\n'
trap 'exit 0' TERM INT
while IFS= read -r _; do :; done

the config used (drill B1; per-arm differences are only exe, log and — in the READY-then-silent arms — "engine_silence_s": 60; vision is removed)

{
 "exe": "/home/lu/work/scratch/drill-1317-20261008/fake_engine_silent.sh",
 "cwd": "/home/lu/work/scratch/drill-1317-20261008",
 "model_name": "qwen3.8-flash-next",
 "gpu": "0,1,2,3",
 "log": "/home/lu/work/scratch/drill-1317-20261008/engine_B1.log",
 "env": {
  "STRATA_RESIDENT_HEADROOM_GIB": "6",
  "STRATA_REQUEST_LINES": "1"
 },
 "sampling": {
  "temperature": 1.0,
  "top_p": 0.95,
  "top_k": 20,
  "frequency_penalty": 0
 },
 "tokenizer": "/home/lu/work/scratch/strata/pack/tokenizer",
 "args": [
  "--pack",
  "/home/lu/work/scratch/strata/pack",
  "--native",
  "/home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf",
  "--ple-gguf",
  "/home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf",
  "--expert-profile",
  "/home/lu/work/scratch/strata/src/data/expert-profile.bin",
  "--mtp",
  "/home/lu/work/scratch/strata/mtp-rt",
  "--spec",
  "3",
  "--suffix-draft",
  "0",
  "--prefill",
  "auto",
  "--max-context",
  "262144",
  "--kv",
  "int8",
  "--expert-cache",
  "16384",
  "--vision",
  "--layer-split",
  "12,24,36",
  "--split-device",
  "1,2,3",
  "--trim-stage-weights",
  "--spec-min-p",
  "0.35"
 ],
 "reasoning_budget_tokens": 8192,
 "tool_call_recovery": true
}

The args list is irrelevant here: the engine is a stub that never reads a byte of it.

drill B1 — pristine v0.1.40.3 serve, request-triggered load (--lazy), engine never reports READY

#!/bin/bash
# B1:同一场景打到「上游原样 40.3 serve」上 —— 请求触发的装载 + 引擎永不说 READY,这一发会不会带原因回来。
set -o pipefail
D=/home/lu/work/scratch/drill-1317-20261008
UP=/home/lu/work/scratch/up403/Strata-0.1.40.3
PY=/home/lu/work/scratch/strata/venv/bin/python
TOK=/home/lu/work/scratch/strata/pack/tokenizer
ENG="$D/fake_engine_silent.sh"
CFG="$D/cfg_B1.json"; OUT="$D/serve_B1.out"; PORT=8099; TMO=8
L(){ echo "[$(date +%H:%M:%S)] $*"; }
python3 - "$D" "$CFG" <<'PY'
import json, sys
D, out = sys.argv[1], sys.argv[2]
c = json.load(open("/home/lu/work/scratch/strata/strata_pi_256k.json"))
c["exe"] = f"{D}/fake_engine_silent.sh"; c["cwd"] = D; c["log"] = f"{D}/engine_B1.log"; c.pop("vision", None)
json.dump(c, open(out, "w"), indent=1)
PY
L "上游原样 40.3 serve md5 $(md5sum "$UP/serve/server.py" | cut -c1-12)(现役那份 = $(md5sum /home/lu/work/scratch/strata-0140/src/serve/server.py|cut -c1-12))"
cd "$UP" || exit 1
STRATA_ENGINE_READY_S=$TMO "$PY" serve/server.py --engine strata --config "$CFG" --port "$PORT" --host 127.0.0.1 --tokenizer "$TOK" --lazy > "$OUT" 2>&1 &
SP=$!
for i in $(seq 1 25); do ss -tln 2>/dev/null | grep -q ":$PORT " && break; sleep 1; done
L "serve pid $SP 端口开=$(ss -tln|grep -c ":$PORT ") ENGINE_READY_S=$TMO lazy"
( for i in $(seq 1 7); do sleep 20; ep=$(pgrep -f "drill-1317-20261008/fake_engine_[s]ilent.sh" | head -1)
    L "t+$((i*20))s 假引擎=$( [[ -n "$ep" ]] && (kill -0 "$ep" 2>/dev/null && echo alive||echo dead) || echo none ) serve=$(kill -0 "$SP" 2>/dev/null && echo alive||echo GONE) serve行数=$(wc -l < "$OUT")"; done ) &
POL=$!
code=$(curl -s -m 130 -o "$D/req_B1.json" -w "%{http_code} %{time_total}s" \
  "http://127.0.0.1:$PORT/v1/chat/completions" -H 'Content-Type: application/json' \
  -d '{"model":"qwen3.8-flash-next","temperature":0,"max_tokens":8,"messages":[{"role":"user","content":"只回复两个字:收到"}]}' 2>/dev/null)
L "请求 code=$code 体=$(head -c 300 "$D/req_B1.json" 2>/dev/null | tr -d '\n')"
L "守卫原因串命中 = $(grep -c 'did not report READY' "$OUT") 处"
L "serve 输出全文:"; sed 's/^/    /' "$OUT"
kill "$POL" 2>/dev/null; kill "$SP" 2>/dev/null; pkill -9 -f "drill-1317-20261008/fake_engine_[s]ilent.sh" 2>/dev/null; sleep 2; kill -9 "$SP" 2>/dev/null
L "非8095 serve 残留=$(pgrep -af 'serve/server[.]py' | grep -v 8095 | wc -l) 生产8095=$(ss -tln|grep -c ':8095 ') 引擎=$(pgrep -x strata|wc -l)"

drill A6 — same scenario against my build, curl allowed 320 s (past the default engine_silence_s = 300)

Same shape as drill B1; the differences are SERVE= pointing at my tree's src/serve/server.py (no cd into the 40.3 tree), curl -m 320 instead of -m 130, and 17 poll iterations instead of 7.

#!/bin/bash
# A6:把 CAND 那一发请求等到 320 s(越过 engine_silence_s=300),看补丁最终会不会把请求带回来。
set -o pipefail
D=/home/lu/work/scratch/drill-1317-20261008
PY=/home/lu/work/scratch/strata/venv/bin/python
SERVE=/home/lu/work/scratch/strata-0140/src/serve/server.py
TOK=/home/lu/work/scratch/strata/pack/tokenizer
ENG="$D/fake_engine_silent.sh"
CFG="$D/cfg_A6.json"; PORT=8099; TMO=8
L(){ echo "[$(date +%H:%M:%S)] $*"; }
python3 - "$D" "$CFG" <<'PY'
import json, sys
D, out = sys.argv[1], sys.argv[2]
c = json.load(open("/home/lu/work/scratch/strata/strata_pi_256k.json"))
c["exe"] = f"{D}/fake_engine_silent.sh"; c["cwd"] = D; c["log"] = f"{D}/engine_A6.log"; c.pop("vision", None)
json.dump(c, open(out, "w"), indent=1)
PY

STRATA_ENGINE_READY_S=$TMO "$PY" "$SERVE" --engine strata --config "$CFG" --port "$PORT" --host 127.0.0.1 --tokenizer "$TOK" --lazy > "$D/serve_A6.out" 2>&1 &
SP=$!
for i in $(seq 1 20); do ss -tln 2>/dev/null | grep -q ":$PORT " && break; sleep 1; done
L "serve pid $SP 端口开=$(ss -tln|grep -c ":$PORT ") ENGINE_READY_S=$TMO lazy"

( for i in $(seq 1 17); do
    sleep 20
    ep=$(pgrep -f "drill-1317-20261008/fake_engine_[s]ilent.sh" | head -1)
    L "t+$((i*20))s 假引擎=$( [[ -n "$ep" ]] && (kill -0 "$ep" 2>/dev/null && echo alive || echo dead) || echo none ) serve=$(kill -0 "$SP" 2>/dev/null && echo alive || echo GONE) serve行数=$(wc -l < "$D/serve_A6.out")"
  done ) &
POL=$!

code=$(curl -s -m 320 -o "$D/req_A6.json" -w "%{http_code} %{time_total}s" \
  "http://127.0.0.1:$PORT/v1/chat/completions" -H 'Content-Type: application/json' \
  -d '{"model":"qwen3.8-flash-next","temperature":0,"max_tokens":8,"messages":[{"role":"user","content":"只回复两个字:收到"}]}' 2>/dev/null)
L "请求结果 code=$code 体=$(head -c 300 "$D/req_A6.json" 2>/dev/null | tr -d '\n')"
L "守卫命中 'did not report READY' = $(grep -c 'did not report READY' "$D/serve_A6.out") 处"
L "serve 输出全文:"; sed 's/^/    /' "$D/serve_A6.out"
kill "$POL" 2>/dev/null
kill "$SP" 2>/dev/null; pkill -9 -f "drill-1317-20261008/fake_engine_[s]ilent.sh" 2>/dev/null; sleep 2; kill -9 "$SP" 2>/dev/null
L "残留 serve=$(pgrep -cf 'src/serve/server[.]py' ) 生产8095=$(ss -tln|grep -c ':8095 ') 引擎=$(pgrep -x strata|wc -l)"

drill B2 — the control scenario (#1317's own description: engine READY, then silent mid-request), both serve files side by side, same machine, same config, same stub

#!/bin/bash
# B2:打 #1317 真正描述的那种卡死 —— 引擎已经 READY、请求进行中却再也不打印任何东西。
# 看 serve 会不会在 engine_silence_s(默认 300 s,#481)到点时把这发请求带回来并说明原因。
# 同一套打到上游原样 40.3 与现役 0140 两份 serve 上(双臂)。
set -o pipefail
D=/home/lu/work/scratch/drill-1317-20261008
PY=/home/lu/work/scratch/strata/venv/bin/python
TOK=/home/lu/work/scratch/strata/pack/tokenizer
ENG="$D/fake_engine_ready.sh"
SIL=60
L(){ echo "[$(date +%H:%M:%S)] $*"; }

arm(){ # $1=标签 $2=serve 目录根 $3=相对 serve 路径 $4=port $5=cfg名
  local tag=$1 root=$2 sp=$3 port=$4 cfg="$D/cfg_B2_$1.json" out="$D/serve_B2_$1.out"
  python3 - "$D" "$cfg" <<PY
import json, sys
D, out = sys.argv[1], sys.argv[2]
c = json.load(open("/home/lu/work/scratch/strata/strata_pi_256k.json"))
c["exe"] = "$ENG"; c["cwd"] = D; c["log"] = f"{D}/engine_B2_$tag.log"; c.pop("vision", None)
c["engine_silence_s"] = $SIL
json.dump(c, open(out, "w"), indent=1)
PY
  L "arm $tag serve=$(md5sum "$root/$sp"|cut -c1-12) port=$port engine_silence_s=$SIL"
  # 用 exec 顶掉子 shell,否则 $! 是子 shell 的 pid,kill 掉的是外壳、python 子进程会漏下(10/08 实测漏了两个)
  ( cd "$root" && exec env STRATA_ENGINE_READY_S=900 "$PY" "$sp" --engine strata --config "$cfg" --port "$port" --host 127.0.0.1 --tokenizer "$TOK" > "$out" 2>&1 ) &
  local sp_pid=$!
  for i in $(seq 1 30); do ss -tln 2>/dev/null | grep -q ":$port " && break; sleep 1; done
  L "arm $tag 端口开=$(ss -tln|grep -c ":$port ") serve pid $sp_pid"
  local code=$(curl -s -m 420 -o "$D/req_B2_$tag.json" -w "%{http_code} %{time_total}s" \
      "http://127.0.0.1:$port/v1/chat/completions" -H 'Content-Type: application/json' \
      -d '{"model":"qwen3.8-flash-next","temperature":0,"max_tokens":8,"messages":[{"role":"user","content":"只回复两个字:收到"}]}' 2>/dev/null)
  L "arm $tag 请求 code=$code 体=$(head -c 280 "$D/req_B2_$tag.json" 2>/dev/null | tr -d '\n')"
  L "arm $tag EngineSilent/原因串命中: silent=$(grep -ci 'silent' "$out") ready超时=$(grep -c 'did not report READY' "$out")"
  L "arm $tag serve 输出尾:"; tail -8 "$out" | sed 's/^/    /' | cut -c1-190
  kill "$sp_pid" 2>/dev/null; pkill -9 -f "drill-1317-20261008/fake_[e]ngine_ready.sh" 2>/dev/null; sleep 2; kill -9 "$sp_pid" 2>/dev/null
}

arm UP403 /home/lu/work/scratch/up403/Strata-0.1.40.3 serve/server.py 8099
arm OURS  /home/lu/work/scratch/strata-0140/src serve/server.py 8098
L "残留 非8095 serve=$(pgrep -af 'serve/server[.]py' | grep -v 8095 | wc -l) 假引擎=$(pgrep -cf 'fake_[e]ngine' 2>/dev/null|head -1) 生产8095=$(ss -tln|grep -c ':8095 ') 引擎=$(pgrep -x strata|wc -l)"
<!-- gh-comment-id:6057322385 --> @justxiami commented on GitHub (Oct 8, 2026): ## Evidence 1 of 2 — the scripts that ran, verbatim Script comments are in Chinese; the code is exactly what ran. My absolute paths are left as-is; only `serve/server.py`, `--config`, `--port` and the config's `exe` field matter here. Provenance of the `serve` files: | tree | file | md5 (first 12) | note | |---|---|---|---| | pristine `v0.1.40.3` (`codeload` tarball 17,049,420 B, sha256 prefix `a91cca637dc910a8`, 2598 entries, `project(strata VERSION 0.1.40.3)`) | `serve/server.py` | `c7a94436b69f` | unmodified | | my build | `src/serve/server.py` | `9b690b1249a7` | 0.1.40.1 official serve + the three #1317 commits merged by hand | | the build I replaced today | `src/serve/server.py` | `2b640a00dad3` | 0.1.39 serve, no read timeouts — the control in the first drill set | Every drill starts `serve` on port 8098 or 8099 with a stub `exe`, never runs the engine binary, and ends with a residual check (`production :8095 listener = 1`, stub processes = 0). No GPU work happens in these arms: the stub exits on `TERM`. ### stub engine that starts and never reports READY (`exe` override) ```bash #!/bin/bash trap 'exit 0' TERM INT sleep 3600 ``` ### stub engine that reports READY once, then never answers again ```bash #!/bin/bash # 说 READY 之后就不吭声(把 stdin 吃掉,永不回话) printf 'READY 32768 stop\n' trap 'exit 0' TERM INT while IFS= read -r _; do :; done ``` ### the config used (drill B1; per-arm differences are only `exe`, `log` and — in the READY-then-silent arms — `"engine_silence_s": 60`; `vision` is removed) ```json { "exe": "/home/lu/work/scratch/drill-1317-20261008/fake_engine_silent.sh", "cwd": "/home/lu/work/scratch/drill-1317-20261008", "model_name": "qwen3.8-flash-next", "gpu": "0,1,2,3", "log": "/home/lu/work/scratch/drill-1317-20261008/engine_B1.log", "env": { "STRATA_RESIDENT_HEADROOM_GIB": "6", "STRATA_REQUEST_LINES": "1" }, "sampling": { "temperature": 1.0, "top_p": 0.95, "top_k": 20, "frequency_penalty": 0 }, "tokenizer": "/home/lu/work/scratch/strata/pack/tokenizer", "args": [ "--pack", "/home/lu/work/scratch/strata/pack", "--native", "/home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf", "--ple-gguf", "/home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf", "--expert-profile", "/home/lu/work/scratch/strata/src/data/expert-profile.bin", "--mtp", "/home/lu/work/scratch/strata/mtp-rt", "--spec", "3", "--suffix-draft", "0", "--prefill", "auto", "--max-context", "262144", "--kv", "int8", "--expert-cache", "16384", "--vision", "--layer-split", "12,24,36", "--split-device", "1,2,3", "--trim-stage-weights", "--spec-min-p", "0.35" ], "reasoning_budget_tokens": 8192, "tool_call_recovery": true } ``` The `args` list is irrelevant here: the engine is a stub that never reads a byte of it. ### drill B1 — pristine v0.1.40.3 serve, request-triggered load (`--lazy`), engine never reports READY ```bash #!/bin/bash # B1:同一场景打到「上游原样 40.3 serve」上 —— 请求触发的装载 + 引擎永不说 READY,这一发会不会带原因回来。 set -o pipefail D=/home/lu/work/scratch/drill-1317-20261008 UP=/home/lu/work/scratch/up403/Strata-0.1.40.3 PY=/home/lu/work/scratch/strata/venv/bin/python TOK=/home/lu/work/scratch/strata/pack/tokenizer ENG="$D/fake_engine_silent.sh" CFG="$D/cfg_B1.json"; OUT="$D/serve_B1.out"; PORT=8099; TMO=8 L(){ echo "[$(date +%H:%M:%S)] $*"; } python3 - "$D" "$CFG" <<'PY' import json, sys D, out = sys.argv[1], sys.argv[2] c = json.load(open("/home/lu/work/scratch/strata/strata_pi_256k.json")) c["exe"] = f"{D}/fake_engine_silent.sh"; c["cwd"] = D; c["log"] = f"{D}/engine_B1.log"; c.pop("vision", None) json.dump(c, open(out, "w"), indent=1) PY L "上游原样 40.3 serve md5 $(md5sum "$UP/serve/server.py" | cut -c1-12)(现役那份 = $(md5sum /home/lu/work/scratch/strata-0140/src/serve/server.py|cut -c1-12))" cd "$UP" || exit 1 STRATA_ENGINE_READY_S=$TMO "$PY" serve/server.py --engine strata --config "$CFG" --port "$PORT" --host 127.0.0.1 --tokenizer "$TOK" --lazy > "$OUT" 2>&1 & SP=$! for i in $(seq 1 25); do ss -tln 2>/dev/null | grep -q ":$PORT " && break; sleep 1; done L "serve pid $SP 端口开=$(ss -tln|grep -c ":$PORT ") ENGINE_READY_S=$TMO lazy" ( for i in $(seq 1 7); do sleep 20; ep=$(pgrep -f "drill-1317-20261008/fake_engine_[s]ilent.sh" | head -1) L "t+$((i*20))s 假引擎=$( [[ -n "$ep" ]] && (kill -0 "$ep" 2>/dev/null && echo alive||echo dead) || echo none ) serve=$(kill -0 "$SP" 2>/dev/null && echo alive||echo GONE) serve行数=$(wc -l < "$OUT")"; done ) & POL=$! code=$(curl -s -m 130 -o "$D/req_B1.json" -w "%{http_code} %{time_total}s" \ "http://127.0.0.1:$PORT/v1/chat/completions" -H 'Content-Type: application/json' \ -d '{"model":"qwen3.8-flash-next","temperature":0,"max_tokens":8,"messages":[{"role":"user","content":"只回复两个字:收到"}]}' 2>/dev/null) L "请求 code=$code 体=$(head -c 300 "$D/req_B1.json" 2>/dev/null | tr -d '\n')" L "守卫原因串命中 = $(grep -c 'did not report READY' "$OUT") 处" L "serve 输出全文:"; sed 's/^/ /' "$OUT" kill "$POL" 2>/dev/null; kill "$SP" 2>/dev/null; pkill -9 -f "drill-1317-20261008/fake_engine_[s]ilent.sh" 2>/dev/null; sleep 2; kill -9 "$SP" 2>/dev/null L "非8095 serve 残留=$(pgrep -af 'serve/server[.]py' | grep -v 8095 | wc -l) 生产8095=$(ss -tln|grep -c ':8095 ') 引擎=$(pgrep -x strata|wc -l)" ``` ### drill A6 — same scenario against my build, `curl` allowed 320 s (past the default `engine_silence_s` = 300) Same shape as drill B1; the differences are `SERVE=` pointing at my tree's `src/serve/server.py` (no `cd` into the 40.3 tree), `curl -m 320` instead of `-m 130`, and 17 poll iterations instead of 7. ```bash #!/bin/bash # A6:把 CAND 那一发请求等到 320 s(越过 engine_silence_s=300),看补丁最终会不会把请求带回来。 set -o pipefail D=/home/lu/work/scratch/drill-1317-20261008 PY=/home/lu/work/scratch/strata/venv/bin/python SERVE=/home/lu/work/scratch/strata-0140/src/serve/server.py TOK=/home/lu/work/scratch/strata/pack/tokenizer ENG="$D/fake_engine_silent.sh" CFG="$D/cfg_A6.json"; PORT=8099; TMO=8 L(){ echo "[$(date +%H:%M:%S)] $*"; } python3 - "$D" "$CFG" <<'PY' import json, sys D, out = sys.argv[1], sys.argv[2] c = json.load(open("/home/lu/work/scratch/strata/strata_pi_256k.json")) c["exe"] = f"{D}/fake_engine_silent.sh"; c["cwd"] = D; c["log"] = f"{D}/engine_A6.log"; c.pop("vision", None) json.dump(c, open(out, "w"), indent=1) PY STRATA_ENGINE_READY_S=$TMO "$PY" "$SERVE" --engine strata --config "$CFG" --port "$PORT" --host 127.0.0.1 --tokenizer "$TOK" --lazy > "$D/serve_A6.out" 2>&1 & SP=$! for i in $(seq 1 20); do ss -tln 2>/dev/null | grep -q ":$PORT " && break; sleep 1; done L "serve pid $SP 端口开=$(ss -tln|grep -c ":$PORT ") ENGINE_READY_S=$TMO lazy" ( for i in $(seq 1 17); do sleep 20 ep=$(pgrep -f "drill-1317-20261008/fake_engine_[s]ilent.sh" | head -1) L "t+$((i*20))s 假引擎=$( [[ -n "$ep" ]] && (kill -0 "$ep" 2>/dev/null && echo alive || echo dead) || echo none ) serve=$(kill -0 "$SP" 2>/dev/null && echo alive || echo GONE) serve行数=$(wc -l < "$D/serve_A6.out")" done ) & POL=$! code=$(curl -s -m 320 -o "$D/req_A6.json" -w "%{http_code} %{time_total}s" \ "http://127.0.0.1:$PORT/v1/chat/completions" -H 'Content-Type: application/json' \ -d '{"model":"qwen3.8-flash-next","temperature":0,"max_tokens":8,"messages":[{"role":"user","content":"只回复两个字:收到"}]}' 2>/dev/null) L "请求结果 code=$code 体=$(head -c 300 "$D/req_A6.json" 2>/dev/null | tr -d '\n')" L "守卫命中 'did not report READY' = $(grep -c 'did not report READY' "$D/serve_A6.out") 处" L "serve 输出全文:"; sed 's/^/ /' "$D/serve_A6.out" kill "$POL" 2>/dev/null kill "$SP" 2>/dev/null; pkill -9 -f "drill-1317-20261008/fake_engine_[s]ilent.sh" 2>/dev/null; sleep 2; kill -9 "$SP" 2>/dev/null L "残留 serve=$(pgrep -cf 'src/serve/server[.]py' ) 生产8095=$(ss -tln|grep -c ':8095 ') 引擎=$(pgrep -x strata|wc -l)" ``` ### drill B2 — the control scenario (#1317's own description: engine `READY`, then silent mid-request), both serve files side by side, same machine, same config, same stub ```bash #!/bin/bash # B2:打 #1317 真正描述的那种卡死 —— 引擎已经 READY、请求进行中却再也不打印任何东西。 # 看 serve 会不会在 engine_silence_s(默认 300 s,#481)到点时把这发请求带回来并说明原因。 # 同一套打到上游原样 40.3 与现役 0140 两份 serve 上(双臂)。 set -o pipefail D=/home/lu/work/scratch/drill-1317-20261008 PY=/home/lu/work/scratch/strata/venv/bin/python TOK=/home/lu/work/scratch/strata/pack/tokenizer ENG="$D/fake_engine_ready.sh" SIL=60 L(){ echo "[$(date +%H:%M:%S)] $*"; } arm(){ # $1=标签 $2=serve 目录根 $3=相对 serve 路径 $4=port $5=cfg名 local tag=$1 root=$2 sp=$3 port=$4 cfg="$D/cfg_B2_$1.json" out="$D/serve_B2_$1.out" python3 - "$D" "$cfg" <<PY import json, sys D, out = sys.argv[1], sys.argv[2] c = json.load(open("/home/lu/work/scratch/strata/strata_pi_256k.json")) c["exe"] = "$ENG"; c["cwd"] = D; c["log"] = f"{D}/engine_B2_$tag.log"; c.pop("vision", None) c["engine_silence_s"] = $SIL json.dump(c, open(out, "w"), indent=1) PY L "arm $tag serve=$(md5sum "$root/$sp"|cut -c1-12) port=$port engine_silence_s=$SIL" # 用 exec 顶掉子 shell,否则 $! 是子 shell 的 pid,kill 掉的是外壳、python 子进程会漏下(10/08 实测漏了两个) ( cd "$root" && exec env STRATA_ENGINE_READY_S=900 "$PY" "$sp" --engine strata --config "$cfg" --port "$port" --host 127.0.0.1 --tokenizer "$TOK" > "$out" 2>&1 ) & local sp_pid=$! for i in $(seq 1 30); do ss -tln 2>/dev/null | grep -q ":$port " && break; sleep 1; done L "arm $tag 端口开=$(ss -tln|grep -c ":$port ") serve pid $sp_pid" local code=$(curl -s -m 420 -o "$D/req_B2_$tag.json" -w "%{http_code} %{time_total}s" \ "http://127.0.0.1:$port/v1/chat/completions" -H 'Content-Type: application/json' \ -d '{"model":"qwen3.8-flash-next","temperature":0,"max_tokens":8,"messages":[{"role":"user","content":"只回复两个字:收到"}]}' 2>/dev/null) L "arm $tag 请求 code=$code 体=$(head -c 280 "$D/req_B2_$tag.json" 2>/dev/null | tr -d '\n')" L "arm $tag EngineSilent/原因串命中: silent=$(grep -ci 'silent' "$out") ready超时=$(grep -c 'did not report READY' "$out")" L "arm $tag serve 输出尾:"; tail -8 "$out" | sed 's/^/ /' | cut -c1-190 kill "$sp_pid" 2>/dev/null; pkill -9 -f "drill-1317-20261008/fake_[e]ngine_ready.sh" 2>/dev/null; sleep 2; kill -9 "$sp_pid" 2>/dev/null } arm UP403 /home/lu/work/scratch/up403/Strata-0.1.40.3 serve/server.py 8099 arm OURS /home/lu/work/scratch/strata-0140/src serve/server.py 8098 L "残留 非8095 serve=$(pgrep -af 'serve/server[.]py' | grep -v 8095 | wc -l) 假引擎=$(pgrep -cf 'fake_[e]ngine' 2>/dev/null|head -1) 生产8095=$(ss -tln|grep -c ':8095 ') 引擎=$(pgrep -x strata|wc -l)" ```
Author
Owner

@justxiami commented on GitHub (Oct 8, 2026):

Evidence 2 of 2 — the logs, verbatim

The three transcripts are re-runs of the same three drills on the same host, 2026-10-08 17:43–17:53 (UTC+8), captured with tee; the earlier runs (16:36–17:31) produced the same numbers. Poll lines are one check every 20 s: fake engine = none means the stub process no longer exists (killed by the READY timeout), serve = alive means the serve process is still up and still holding the client connection, lines = how many lines serve has printed.

A6 — my build (9b690b1249a7): request-triggered load, stub never says READY, STRATA_ENGINE_READY_S=8, curl -m 320

[17:48:16] serve pid 34260 端口开=1 ENGINE_READY_S=8 lazy
[17:48:36] t+20s 假引擎=none serve=alive serve行数=8
[17:48:56] t+40s 假引擎=none serve=alive serve行数=8
[17:49:16] t+60s 假引擎=none serve=alive serve行数=8
[17:49:36] t+80s 假引擎=none serve=alive serve行数=8
[17:49:56] t+100s 假引擎=none serve=alive serve行数=8
[17:50:16] t+120s 假引擎=none serve=alive serve行数=8
[17:50:36] t+140s 假引擎=none serve=alive serve行数=8
[17:50:56] t+160s 假引擎=none serve=alive serve行数=8
[17:51:16] t+180s 假引擎=none serve=alive serve行数=8
[17:51:36] t+200s 假引擎=none serve=alive serve行数=8
[17:51:56] t+220s 假引擎=none serve=alive serve行数=8
[17:52:16] t+240s 假引擎=none serve=alive serve行数=8
[17:52:36] t+260s 假引擎=none serve=alive serve行数=8
[17:52:56] t+280s 假引擎=none serve=alive serve行数=8
[17:53:16] t+300s 假引擎=none serve=alive serve行数=8
[17:53:36] 请求结果 code=000 320.002542s 体=
[17:53:36] 守卫命中 'did not report READY' = 0 处
[17:53:36] serve 输出全文:
    [strata] sampling defaults from the config: temperature=1.0, top_p=0.95, top_k=20, frequency_penalty=0.0
    model unloaded; the first request loads it ...
    [strata] layer split across GPUs [0, 1, 2, 3] (auto)
    [strata] thinking budget: 8192 tokens (reasoning_budget_tokens; a request can set its own)
    ready: http://127.0.0.1:8099/v1  (OpenAI: /v1/chat/completions, Anthropic: /v1/messages, context 262144 tokens)
           open http://127.0.0.1:8099/ in a browser to chat; close this window to stop the model
    [strata] loading the model again (it was unloaded) ...
    [strata] starting the engine: reading the model's weights ...
drill_1317_A6_20261008.sh: 第 40 行: 34260 已杀死               STRATA_ENGINE_READY_S=$TMO "$PY" "$SERVE" --engine strata --config "$CFG" --port "$PORT" --host 127.0.0.1 --tokenizer "$TOK" --lazy > "$D/serve_A6.out" 2>&1
[17:53:38] 残留 serve=1 生产8095=1 引擎=1

Stub gone by the first poll; serve stdout frozen at 8 lines for the whole 320 s; the client gets nothing: code=000 320.002542 s. Grep for the reason string the 0.1.40.2 notes promise (did not report READY): 0 occurrences.

B1 — pristine v0.1.40.3 serve (c7a94436b69f): same scenario, curl -m 130

[17:43:32] 上游原样 40.3 serve md5 c7a94436b69f(现役那份 = 9b690b1249a7)
[17:43:33] serve pid 33946 端口开=1 ENGINE_READY_S=8 lazy
[17:43:53] t+20s 假引擎=none serve=alive serve行数=8
[17:44:13] t+40s 假引擎=none serve=alive serve行数=8
[17:44:33] t+60s 假引擎=none serve=alive serve行数=8
[17:44:53] t+80s 假引擎=none serve=alive serve行数=8
[17:45:13] t+100s 假引擎=none serve=alive serve行数=8
[17:45:34] t+120s 假引擎=none serve=alive serve行数=8
[17:45:43] 请求 code=000 130.002547s 体=
[17:45:43] 守卫原因串命中 = 0 处
[17:45:43] serve 输出全文:
    [strata] sampling defaults from the config: temperature=1.0, top_p=0.95, top_k=20, frequency_penalty=0.0
    model unloaded; the first request loads it ...
    [strata] layer split across GPUs [0, 1, 2, 3] (auto)
    [strata] thinking budget: 8192 tokens (reasoning_budget_tokens; a request can set its own)
    ready: http://127.0.0.1:8099/v1  (OpenAI: /v1/chat/completions, Anthropic: /v1/messages, context 262144 tokens)
           open http://127.0.0.1:8099/ in a browser to chat; close this window to stop the model
    [strata] loading the model again (it was unloaded) ...
    [strata] starting the engine: reading the model's weights ...
drill_1317_B1_403_20261008.sh: 第 35 行: 33946 已杀死               STRATA_ENGINE_READY_S=$TMO "$PY" serve/server.py --engine strata --config "$CFG" --port "$PORT" --host 127.0.0.1 --tokenizer "$TOK" --lazy > "$OUT" 2>&1
[17:45:45] 非8095 serve 残留=0 生产8095=1 引擎=1

code=000 130.002547 s, same frozen 8-line serve output, same 0 occurrences. The "Killed" line at the end is the drill's own kill of the serve process, not the server exiting.

B2 — control scenario: stub prints READY 32768 stop then never answers, engine_silence_s=60 in the config, both serve files back to back

[17:45:57] arm UP403 serve=c7a94436b69f port=8099 engine_silence_s=60
[17:45:58] arm UP403 端口开=1 serve pid 34087
[17:47:00] arm UP403 请求 code=503 61.144866s 体={"error": {"type": "server_error", "message": "the engine said nothing for 61 s during the request; the server ended the engine; the next request restarts it"}}
[17:47:00] arm UP403 EngineSilent/原因串命中: silent=0 ready超时=0
[17:47:00] arm UP403 serve 输出尾:
    [strata] reading the prompt: 57 tokens, 10 s so far
    [strata] reading the prompt: 57 tokens, 20 s so far
    [strata] reading the prompt: 57 tokens, 30 s so far
    [strata] reading the prompt: 57 tokens, 40 s so far
    [strata] reading the prompt: 57 tokens, 50 s so far
    [strata] reading the prompt: 57 tokens, 60 s so far
    [strata] the engine said nothing for 61 s during the request; the server ended the engine. The engine and the server lost step (issue #481; a very slow PC can raise "engine_silence_s" in
    [strata] done: 0 tokens in 61 s (0.0 tok/s) (error, cancel=False)
[17:47:02] arm OURS serve=9b690b1249a7 port=8098 engine_silence_s=60
[17:47:03] arm OURS 端口开=1 serve pid 34128
[17:48:04] arm OURS 请求 code=503 61.144695s 体={"error": {"type": "server_error", "message": "the engine said nothing for 61 s during the request; the server ended the engine; the next request restarts it"}}
[17:48:04] arm OURS EngineSilent/原因串命中: silent=0 ready超时=0
[17:48:04] arm OURS serve 输出尾:
    [strata] reading the prompt: 57 tokens, 10 s so far
    [strata] reading the prompt: 57 tokens, 20 s so far
    [strata] reading the prompt: 57 tokens, 30 s so far
    [strata] reading the prompt: 57 tokens, 40 s so far
    [strata] reading the prompt: 57 tokens, 50 s so far
    [strata] reading the prompt: 57 tokens, 60 s so far
    [strata] the engine said nothing for 61 s during the request; the server ended the engine. The engine and the server lost step (issue #481; a very slow PC can raise "engine_silence_s" in
    [strata] done: 0 tokens in 61 s (0.0 tok/s) (error, cancel=False)
[17:48:06] 残留 非8095 serve=0 假引擎=0 生产8095=1 引擎=1

61.144866 s vs 61.144695 s, identical 503 body, identical serve transcript. That half of the fix is present and working in 0.1.40.3 — which is why the difference in the two transcripts above is not a merge artifact of my tree.

Engine-side logs for the three arms (whole file; the stub wrote one line at start and nothing else):

engine_B1.log: [strata] 2026-10-08 17:24:57 engine started: /home/lu/work/scratch/drill-1317-20261008/fake_engine_silent.sh --serve --pack /home/lu/work/scratch/strata/pack --native /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf --ple-gguf /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf --expert-profile /home/lu/work/scratch/strata/src/data/expert-profile.bin --mtp /home/lu/work/scratch/strata/mtp-rt --spec 3 --suffix-draft 0 --prefill auto --max-context 262144 --kv int8 --expert-cache 16384 --vision --layer-split 12,24,36 --split-device 1,2,3 --trim-stage-weights --spec-min-p 0.35
[strata] 2026-10-08 17:43:33 engine started: /home/lu/work/scratch/drill-1317-20261008/fake_engine_silent.sh --serve --pack /home/lu/work/scratch/strata/pack --native /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf --ple-gguf /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf --expert-profile /home/lu/work/scratch/strata/src/data/expert-profile.bin --mtp /home/lu/work/scratch/strata/mtp-rt --spec 3 --suffix-draft 0 --prefill auto --max-context 262144 --kv int8 --expert-cache 16384 --vision --layer-split 12,24,36 --split-device 1,2,3 --trim-stage-weights --spec-min-p 0.35
engine_B2_UP403.log: [strata] 2026-10-08 17:28:05 engine started: /home/lu/work/scratch/drill-1317-20261008/fake_engine_ready.sh --serve --pack /home/lu/work/scratch/strata/pack --native /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf --ple-gguf /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf --expert-profile /home/lu/work/scratch/strata/src/data/expert-profile.bin --mtp /home/lu/work/scratch/strata/mtp-rt --spec 3 --suffix-draft 0 --prefill auto --max-context 262144 --kv int8 --expert-cache 16384 --vision --layer-split 12,24,36 --split-device 1,2,3 --trim-stage-weights --spec-min-p 0.35
[strata] 2026-10-08 17:45:58 engine started: /home/lu/work/scratch/drill-1317-20261008/fake_engine_ready.sh --serve --pack /home/lu/work/scratch/strata/pack --native /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf --ple-gguf /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf --expert-profile /home/lu/work/scratch/strata/src/data/expert-profile.bin --mtp /home/lu/work/scratch/strata/mtp-rt --spec 3 --suffix-draft 0 --prefill auto --max-context 262144 --kv int8 --expert-cache 16384 --vision --layer-split 12,24,36 --split-device 1,2,3 --trim-stage-weights --spec-min-p 0.35
engine_B2_OURS.log: [strata] 2026-10-08 17:29:09 engine started: /home/lu/work/scratch/drill-1317-20261008/fake_engine_ready.sh --serve --pack /home/lu/work/scratch/strata/pack --native /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf --ple-gguf /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf --expert-profile /home/lu/work/scratch/strata/src/data/expert-profile.bin --mtp /home/lu/work/scratch/strata/mtp-rt --spec 3 --suffix-draft 0 --prefill auto --max-context 262144 --kv int8 --expert-cache 16384 --vision --layer-split 12,24,36 --split-device 1,2,3 --trim-stage-weights --spec-min-p 0.35
[strata] 2026-10-08 17:47:02 engine started: /home/lu/work/scratch/drill-1317-20261008/fake_engine_ready.sh --serve --pack /home/lu/work/scratch/strata/pack --native /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf --ple-gguf /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf --expert-profile /home/lu/work/scratch/strata/src/data/expert-profile.bin --mtp /home/lu/work/scratch/strata/mtp-rt --spec 3 --suffix-draft 0 --prefill auto --max-context 262144 --kv int8 --expert-cache 16384 --vision --layer-split 12,24,36 --split-device 1,2,3 --trim-stage-weights --spec-min-p 0.35

for contrast: the vision encoder arm of the same read timeout does fail with a message (my build, stub encoder that says nothing)

[strata] sampling defaults from the config: temperature=1.0, top_p=0.95, top_k=20, frequency_penalty=0.0
loading the vision encoder ...
Traceback (most recent call last):
  File "/home/lu/work/scratch/strata-0140/src/serve/server.py", line 5134, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/lu/work/scratch/strata-0140/src/serve/server.py", line 4948, in main
    vision = Vision(vcfg, log=open(cfg["log"], "a", encoding="utf-8") if cfg.get("log") else None,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lu/work/scratch/strata-0140/src/serve/server.py", line 1701, in __init__
    self._start()
  File "/home/lu/work/scratch/strata-0140/src/serve/server.py", line 1716, in _start
    raise RuntimeError(str(e)) from None
RuntimeError: the vision encoder did not start: it said nothing for 8 s

The engine READY read has no equivalent of this RuntimeError path: when it times out, the pending request is not failed with a reason — it is just held.

<!-- gh-comment-id:6057322846 --> @justxiami commented on GitHub (Oct 8, 2026): ## Evidence 2 of 2 — the logs, verbatim The three transcripts are re-runs of the same three drills on the same host, 2026-10-08 17:43–17:53 (UTC+8), captured with `tee`; the earlier runs (16:36–17:31) produced the same numbers. Poll lines are one check every 20 s: `fake engine = none` means the stub process no longer exists (killed by the `READY` timeout), `serve = alive` means the serve process is still up and still holding the client connection, `lines` = how many lines serve has printed. ### A6 — my build (`9b690b1249a7`): request-triggered load, stub never says READY, `STRATA_ENGINE_READY_S=8`, `curl -m 320` ``` [17:48:16] serve pid 34260 端口开=1 ENGINE_READY_S=8 lazy [17:48:36] t+20s 假引擎=none serve=alive serve行数=8 [17:48:56] t+40s 假引擎=none serve=alive serve行数=8 [17:49:16] t+60s 假引擎=none serve=alive serve行数=8 [17:49:36] t+80s 假引擎=none serve=alive serve行数=8 [17:49:56] t+100s 假引擎=none serve=alive serve行数=8 [17:50:16] t+120s 假引擎=none serve=alive serve行数=8 [17:50:36] t+140s 假引擎=none serve=alive serve行数=8 [17:50:56] t+160s 假引擎=none serve=alive serve行数=8 [17:51:16] t+180s 假引擎=none serve=alive serve行数=8 [17:51:36] t+200s 假引擎=none serve=alive serve行数=8 [17:51:56] t+220s 假引擎=none serve=alive serve行数=8 [17:52:16] t+240s 假引擎=none serve=alive serve行数=8 [17:52:36] t+260s 假引擎=none serve=alive serve行数=8 [17:52:56] t+280s 假引擎=none serve=alive serve行数=8 [17:53:16] t+300s 假引擎=none serve=alive serve行数=8 [17:53:36] 请求结果 code=000 320.002542s 体= [17:53:36] 守卫命中 'did not report READY' = 0 处 [17:53:36] serve 输出全文: [strata] sampling defaults from the config: temperature=1.0, top_p=0.95, top_k=20, frequency_penalty=0.0 model unloaded; the first request loads it ... [strata] layer split across GPUs [0, 1, 2, 3] (auto) [strata] thinking budget: 8192 tokens (reasoning_budget_tokens; a request can set its own) ready: http://127.0.0.1:8099/v1 (OpenAI: /v1/chat/completions, Anthropic: /v1/messages, context 262144 tokens) open http://127.0.0.1:8099/ in a browser to chat; close this window to stop the model [strata] loading the model again (it was unloaded) ... [strata] starting the engine: reading the model's weights ... drill_1317_A6_20261008.sh: 第 40 行: 34260 已杀死 STRATA_ENGINE_READY_S=$TMO "$PY" "$SERVE" --engine strata --config "$CFG" --port "$PORT" --host 127.0.0.1 --tokenizer "$TOK" --lazy > "$D/serve_A6.out" 2>&1 [17:53:38] 残留 serve=1 生产8095=1 引擎=1 ``` Stub gone by the first poll; serve stdout frozen at 8 lines for the whole 320 s; the client gets nothing: `code=000 320.002542 s`. Grep for the reason string the 0.1.40.2 notes promise (`did not report READY`): 0 occurrences. ### B1 — pristine v0.1.40.3 serve (`c7a94436b69f`): same scenario, `curl -m 130` ``` [17:43:32] 上游原样 40.3 serve md5 c7a94436b69f(现役那份 = 9b690b1249a7) [17:43:33] serve pid 33946 端口开=1 ENGINE_READY_S=8 lazy [17:43:53] t+20s 假引擎=none serve=alive serve行数=8 [17:44:13] t+40s 假引擎=none serve=alive serve行数=8 [17:44:33] t+60s 假引擎=none serve=alive serve行数=8 [17:44:53] t+80s 假引擎=none serve=alive serve行数=8 [17:45:13] t+100s 假引擎=none serve=alive serve行数=8 [17:45:34] t+120s 假引擎=none serve=alive serve行数=8 [17:45:43] 请求 code=000 130.002547s 体= [17:45:43] 守卫原因串命中 = 0 处 [17:45:43] serve 输出全文: [strata] sampling defaults from the config: temperature=1.0, top_p=0.95, top_k=20, frequency_penalty=0.0 model unloaded; the first request loads it ... [strata] layer split across GPUs [0, 1, 2, 3] (auto) [strata] thinking budget: 8192 tokens (reasoning_budget_tokens; a request can set its own) ready: http://127.0.0.1:8099/v1 (OpenAI: /v1/chat/completions, Anthropic: /v1/messages, context 262144 tokens) open http://127.0.0.1:8099/ in a browser to chat; close this window to stop the model [strata] loading the model again (it was unloaded) ... [strata] starting the engine: reading the model's weights ... drill_1317_B1_403_20261008.sh: 第 35 行: 33946 已杀死 STRATA_ENGINE_READY_S=$TMO "$PY" serve/server.py --engine strata --config "$CFG" --port "$PORT" --host 127.0.0.1 --tokenizer "$TOK" --lazy > "$OUT" 2>&1 [17:45:45] 非8095 serve 残留=0 生产8095=1 引擎=1 ``` `code=000 130.002547 s`, same frozen 8-line serve output, same 0 occurrences. The "Killed" line at the end is the drill's own `kill` of the serve process, not the server exiting. ### B2 — control scenario: stub prints `READY 32768 stop` then never answers, `engine_silence_s=60` in the config, both serve files back to back ``` [17:45:57] arm UP403 serve=c7a94436b69f port=8099 engine_silence_s=60 [17:45:58] arm UP403 端口开=1 serve pid 34087 [17:47:00] arm UP403 请求 code=503 61.144866s 体={"error": {"type": "server_error", "message": "the engine said nothing for 61 s during the request; the server ended the engine; the next request restarts it"}} [17:47:00] arm UP403 EngineSilent/原因串命中: silent=0 ready超时=0 [17:47:00] arm UP403 serve 输出尾: [strata] reading the prompt: 57 tokens, 10 s so far [strata] reading the prompt: 57 tokens, 20 s so far [strata] reading the prompt: 57 tokens, 30 s so far [strata] reading the prompt: 57 tokens, 40 s so far [strata] reading the prompt: 57 tokens, 50 s so far [strata] reading the prompt: 57 tokens, 60 s so far [strata] the engine said nothing for 61 s during the request; the server ended the engine. The engine and the server lost step (issue #481; a very slow PC can raise "engine_silence_s" in [strata] done: 0 tokens in 61 s (0.0 tok/s) (error, cancel=False) [17:47:02] arm OURS serve=9b690b1249a7 port=8098 engine_silence_s=60 [17:47:03] arm OURS 端口开=1 serve pid 34128 [17:48:04] arm OURS 请求 code=503 61.144695s 体={"error": {"type": "server_error", "message": "the engine said nothing for 61 s during the request; the server ended the engine; the next request restarts it"}} [17:48:04] arm OURS EngineSilent/原因串命中: silent=0 ready超时=0 [17:48:04] arm OURS serve 输出尾: [strata] reading the prompt: 57 tokens, 10 s so far [strata] reading the prompt: 57 tokens, 20 s so far [strata] reading the prompt: 57 tokens, 30 s so far [strata] reading the prompt: 57 tokens, 40 s so far [strata] reading the prompt: 57 tokens, 50 s so far [strata] reading the prompt: 57 tokens, 60 s so far [strata] the engine said nothing for 61 s during the request; the server ended the engine. The engine and the server lost step (issue #481; a very slow PC can raise "engine_silence_s" in [strata] done: 0 tokens in 61 s (0.0 tok/s) (error, cancel=False) [17:48:06] 残留 非8095 serve=0 假引擎=0 生产8095=1 引擎=1 ``` 61.144866 s vs 61.144695 s, identical 503 body, identical serve transcript. That half of the fix is present and working in 0.1.40.3 — which is why the difference in the two transcripts above is not a merge artifact of my tree. Engine-side logs for the three arms (whole file; the stub wrote one line at start and nothing else): ``` engine_B1.log: [strata] 2026-10-08 17:24:57 engine started: /home/lu/work/scratch/drill-1317-20261008/fake_engine_silent.sh --serve --pack /home/lu/work/scratch/strata/pack --native /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf --ple-gguf /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf --expert-profile /home/lu/work/scratch/strata/src/data/expert-profile.bin --mtp /home/lu/work/scratch/strata/mtp-rt --spec 3 --suffix-draft 0 --prefill auto --max-context 262144 --kv int8 --expert-cache 16384 --vision --layer-split 12,24,36 --split-device 1,2,3 --trim-stage-weights --spec-min-p 0.35 [strata] 2026-10-08 17:43:33 engine started: /home/lu/work/scratch/drill-1317-20261008/fake_engine_silent.sh --serve --pack /home/lu/work/scratch/strata/pack --native /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf --ple-gguf /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf --expert-profile /home/lu/work/scratch/strata/src/data/expert-profile.bin --mtp /home/lu/work/scratch/strata/mtp-rt --spec 3 --suffix-draft 0 --prefill auto --max-context 262144 --kv int8 --expert-cache 16384 --vision --layer-split 12,24,36 --split-device 1,2,3 --trim-stage-weights --spec-min-p 0.35 engine_B2_UP403.log: [strata] 2026-10-08 17:28:05 engine started: /home/lu/work/scratch/drill-1317-20261008/fake_engine_ready.sh --serve --pack /home/lu/work/scratch/strata/pack --native /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf --ple-gguf /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf --expert-profile /home/lu/work/scratch/strata/src/data/expert-profile.bin --mtp /home/lu/work/scratch/strata/mtp-rt --spec 3 --suffix-draft 0 --prefill auto --max-context 262144 --kv int8 --expert-cache 16384 --vision --layer-split 12,24,36 --split-device 1,2,3 --trim-stage-weights --spec-min-p 0.35 [strata] 2026-10-08 17:45:58 engine started: /home/lu/work/scratch/drill-1317-20261008/fake_engine_ready.sh --serve --pack /home/lu/work/scratch/strata/pack --native /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf --ple-gguf /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf --expert-profile /home/lu/work/scratch/strata/src/data/expert-profile.bin --mtp /home/lu/work/scratch/strata/mtp-rt --spec 3 --suffix-draft 0 --prefill auto --max-context 262144 --kv int8 --expert-cache 16384 --vision --layer-split 12,24,36 --split-device 1,2,3 --trim-stage-weights --spec-min-p 0.35 engine_B2_OURS.log: [strata] 2026-10-08 17:29:09 engine started: /home/lu/work/scratch/drill-1317-20261008/fake_engine_ready.sh --serve --pack /home/lu/work/scratch/strata/pack --native /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf --ple-gguf /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf --expert-profile /home/lu/work/scratch/strata/src/data/expert-profile.bin --mtp /home/lu/work/scratch/strata/mtp-rt --spec 3 --suffix-draft 0 --prefill auto --max-context 262144 --kv int8 --expert-cache 16384 --vision --layer-split 12,24,36 --split-device 1,2,3 --trim-stage-weights --spec-min-p 0.35 [strata] 2026-10-08 17:47:02 engine started: /home/lu/work/scratch/drill-1317-20261008/fake_engine_ready.sh --serve --pack /home/lu/work/scratch/strata/pack --native /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf --ple-gguf /home/lu/models/Qwen3.8-Flash-Next-GSQ-RCO/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf --expert-profile /home/lu/work/scratch/strata/src/data/expert-profile.bin --mtp /home/lu/work/scratch/strata/mtp-rt --spec 3 --suffix-draft 0 --prefill auto --max-context 262144 --kv int8 --expert-cache 16384 --vision --layer-split 12,24,36 --split-device 1,2,3 --trim-stage-weights --spec-min-p 0.35 ``` ### for contrast: the vision encoder arm of the same read timeout does fail with a message (my build, stub encoder that says nothing) ``` [strata] sampling defaults from the config: temperature=1.0, top_p=0.95, top_k=20, frequency_penalty=0.0 loading the vision encoder ... Traceback (most recent call last): File "/home/lu/work/scratch/strata-0140/src/serve/server.py", line 5134, in <module> sys.exit(main()) ^^^^^^ File "/home/lu/work/scratch/strata-0140/src/serve/server.py", line 4948, in main vision = Vision(vcfg, log=open(cfg["log"], "a", encoding="utf-8") if cfg.get("log") else None, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/lu/work/scratch/strata-0140/src/serve/server.py", line 1701, in __init__ self._start() File "/home/lu/work/scratch/strata-0140/src/serve/server.py", line 1716, in _start raise RuntimeError(str(e)) from None RuntimeError: the vision encoder did not start: it said nothing for 8 s ``` The engine `READY` read has no equivalent of this `RuntimeError` path: when it times out, the pending request is not failed with a reason — it is just held.
Author
Owner

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

Fixed in v0.1.42 through #1588: when the engine's READY read times out, the request that was waiting on the load now ends with a 503 that says the engine did not report READY, and the next request restarts it. The lazy first start also no longer fails in restart() for a missing slot_cv.

<!-- gh-comment-id:6099602126 --> @Niko1221 commented on GitHub (Oct 10, 2026): Fixed in v0.1.42 through #1588: when the engine's READY read times out, the request that was waiting on the load now ends with a 503 that says the engine did not report READY, and the next request restarts it. The lazy first start also no longer fails in restart() for a missing slot_cv.
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:6156125049 --> @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#615
No description provided.