[GH-ISSUE #3961] [Engine] serve: a new agent request answers empty in 0.2 s (200, 1 chunk, no finish_reason) while the engine never logs it; /health stays ok — Linux Docker, 0.2.3, engine 0.1.48 #1697

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

Originally created by @ShaggyDragon on GitHub (Oct 24, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3961

Area

Engine — serve request path (wrapper)

Desktop app, Terminal or source?

Terminal in Docker (strata launch --no-tui, image ghcr.io/niko1221/strata:0.2.3-cuda13)

Reproduction status

Not reproduced — single occurrence; full engine log and launch state of the fault window kept

Strata version

0.2.3 (cuda13 image) — engine 0.1.48

Graphics card, memory and system

RTX 5080 16 GB, 256 GB RAM, 2x Xeon Gold 8176 (PCIe Gen3), Unraid host, Docker, Linux

  • #1603 (closed 2026-10-13): same family — an agent request stuck in a state the stall watchdog cannot see. The closing note says: if it still happens after 0.1.44, file a new issue that links the old one, with the engine log and the version line. This is that report. Engine 0.1.48, Linux, Docker.
  • #1317 (closed): its frozen-engine watchdog (STRATA_ENGINE_STALL_S, 90 s) never fired in our log. Zero matches, ever.

What happened

One user, one agent session (Hermes), all traffic through serve. The engine served normally for about 90 minutes: about 50 agent calls, 120K-token replays, 99%+ prompt reuse, decode 82-90 tok/s.

Timeline (local time, 2026-10-24):

  1. 22:47:21 — a request finishes normally. Engine log, last line before the fault:
    strata serve: prompt 125109 tokens = 123114 reused + 1995 read in 4065 ms (490.7 tok/s), 1562 generated in 17791 ms (87.8 tok/s), drafts accepted 724 of 951, 6 checkpoints
  2. Same second — two new long-context requests arrive one second apart: a background self-review fork (replays the same conversation with a different instruction) and a user turn. Both replay the same ~122-125K-token conversation.
  3. 22:47:22 — the next stream request gets: HTTP 200, 40 bytes total, one SSE chunk, no finish_reason, elapsed 0.21 s. Not a hang: a fast, empty, successful-looking answer.
  4. The client retried (3 attempts). Same empty answer, then waits that produced no output (one user interrupt counted after 273 s).
  5. 22:47 -> 22:55 — every later request got the same empty answer or a silent wait. /health kept answering {"status":"ok","loaded":true}. /v1/models answered.
  6. 22:55 — a human restarted the container. Everything recovered and served normally after.

What the logs show

  • Engine log: the line quoted above is the last thing the engine logged before the restart. There is no request line for the stuck requests — the engine never saw them.
  • Full engine log (20,809 lines, 3.3 MB) grepped for EngineSilent, frozen, has said nothing for: 0 matches. The #1317 watchdog had nothing to watch.
  • serve stdout (docker logs): no error, no warning in that window. serve produced the empty 200s itself.

What we think

serve answered new requests without ever handing them to the engine. Something in the request-turn / engine-pipe state was already held, in a way that /health, /metrics, and the 90 s stall watchdog all miss. Close to #1603, but here parallel is the default 1, the platform is Linux Docker, and the fault is not a slow hang: it is a fast empty 200. Why the earlier overlap (the two-session replay pattern ran for ~90 minutes; two earlier stall episodes at 21:56 and 22:02 were transient) did not go permanent until 22:47, we cannot explain.

Environment

  • Unraid host, Docker, image ghcr.io/niko1221/strata:0.2.3-cuda13 (image sha256:94ff0b3b...c49fb), serve/server.py from the image. Version line printed at start: Engine 0.1.48 (cuda) is installed.
  • Hardware: dual Xeon Gold 8176 (2x16C, PCIe Gen3), RTX 5080 16 GB, 256 GB RAM.
  • Model: Qwen3.8-Flash-Next IQ3_S, native MTP drafting. Preset ai-srvr, CONTEXT=262144, KV=int8, VISION=on.
  • STRATA_SET verbatim: expert-cache=auto prefill=auto spec=4 spec-min-p=0.7 mtp=/data/Strata-data/mtp/rt kv-resident=20480 vram-reserve-mib=1408 conversation-cache-mib=65536 conversation-cache-slots=8 adapt-async=1 short-read=0 pcie-frac=0.00 pool-workers=27 ple-io=ram prompt-cache-every=4096
  • Traffic: one Hermes agent session; every turn re-sends the whole conversation (about 98-100% reused); plus the self-review fork that re-sends the same conversation. Two long requests can overlap.

What we suggest

  1. Make the empty-stream condition observable. When serve answers 200 + one chunk + no finish_reason, log it and count it, the same way the #1603 fix made orphaned busy slots visible with a log line.
  2. Make /health reflect the request path, not only the wrapper. A wrapper that answers every request with an empty stream is not healthy; a client that trusts /health cannot notice. A cheap fix: /health returns 503 when the last N completed answers were empty, or when no request has started for a while although requests keep arriving.
  3. A small tripwire: after N consecutive empty answers with no engine request start, fail new requests with 503 (or restart the request path) so client retries can escape and clients can fail over.

Offer

We kept the full engine log and the launch state for the fault window. We can attach it, run a test build, or drive a reproduction attempt on this exact box (single user, 5080, 262K context, Hermes agent workload).

A word on the fix history

The #1603 design — free an orphaned busy slot after 3 s with a log line, and count live.admitting so the stall log can name what is busy and who owns it — is exactly the right way to fight invisible states. This case says there is one more invisible state left, one level up in serve, and it announces itself as a fast empty 200 instead of a slow hang. Our client-side armor is in place (120 s stale-stream kill with provider failover, plus a 5-minute generation-probe watchdog that restarts the container), so this is a field report to help you fix the root, not a cry for help.

Originally created by @ShaggyDragon on GitHub (Oct 24, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3961 ### Area Engine — serve request path (wrapper) ### Desktop app, Terminal or source? Terminal in Docker (`strata launch --no-tui`, image `ghcr.io/niko1221/strata:0.2.3-cuda13`) ### Reproduction status Not reproduced — single occurrence; full engine log and launch state of the fault window kept ### Strata version 0.2.3 (cuda13 image) — engine 0.1.48 ### Graphics card, memory and system RTX 5080 16 GB, 256 GB RAM, 2x Xeon Gold 8176 (PCIe Gen3), Unraid host, Docker, Linux ## Related issues - **#1603** (closed 2026-10-13): same family — an agent request stuck in a state the stall watchdog cannot see. The closing note says: if it still happens after 0.1.44, file a new issue that links the old one, with the engine log and the version line. This is that report. Engine 0.1.48, Linux, Docker. - **#1317** (closed): its frozen-engine watchdog (`STRATA_ENGINE_STALL_S`, 90 s) **never fired in our log. Zero matches, ever.** ## What happened One user, one agent session (Hermes), all traffic through `serve`. The engine served normally for about 90 minutes: about 50 agent calls, 120K-token replays, 99%+ prompt reuse, decode 82-90 tok/s. Timeline (local time, 2026-10-24): 1. 22:47:21 — a request finishes normally. Engine log, last line before the fault: `strata serve: prompt 125109 tokens = 123114 reused + 1995 read in 4065 ms (490.7 tok/s), 1562 generated in 17791 ms (87.8 tok/s), drafts accepted 724 of 951, 6 checkpoints` 2. Same second — two new long-context requests arrive one second apart: a background self-review fork (replays the same conversation with a different instruction) and a user turn. Both replay the same ~122-125K-token conversation. 3. 22:47:22 — the next stream request gets: **HTTP 200, 40 bytes total, one SSE chunk, no finish_reason, elapsed 0.21 s.** Not a hang: a fast, empty, successful-looking answer. 4. The client retried (3 attempts). Same empty answer, then waits that produced no output (one user interrupt counted after 273 s). 5. 22:47 -> 22:55 — every later request got the same empty answer or a silent wait. `/health` kept answering `{"status":"ok","loaded":true}`. `/v1/models` answered. 6. 22:55 — a human restarted the container. Everything recovered and served normally after. ## What the logs show - **Engine log:** the line quoted above is the last thing the engine logged before the restart. There is **no request line for the stuck requests — the engine never saw them.** - Full engine log (20,809 lines, 3.3 MB) grepped for `EngineSilent`, `frozen`, `has said nothing for`: **0 matches.** The #1317 watchdog had nothing to watch. - `serve` stdout (`docker logs`): no error, no warning in that window. `serve` produced the empty 200s itself. ## What we think `serve` answered new requests without ever handing them to the engine. Something in the request-turn / engine-pipe state was already held, in a way that `/health`, `/metrics`, and the 90 s stall watchdog all miss. Close to #1603, but here `parallel` is the default 1, the platform is Linux Docker, and the fault is not a slow hang: it is a fast empty 200. Why the earlier overlap (the two-session replay pattern ran for ~90 minutes; two earlier stall episodes at 21:56 and 22:02 were transient) did not go permanent until 22:47, we cannot explain. ## Environment - Unraid host, Docker, image `ghcr.io/niko1221/strata:0.2.3-cuda13` (image sha256:94ff0b3b...c49fb), `serve/server.py` from the image. Version line printed at start: `Engine 0.1.48 (cuda) is installed.` - Hardware: dual Xeon Gold 8176 (2x16C, PCIe Gen3), RTX 5080 16 GB, 256 GB RAM. - Model: Qwen3.8-Flash-Next IQ3_S, native MTP drafting. Preset `ai-srvr`, `CONTEXT=262144`, `KV=int8`, `VISION=on`. - `STRATA_SET` verbatim: `expert-cache=auto prefill=auto spec=4 spec-min-p=0.7 mtp=/data/Strata-data/mtp/rt kv-resident=20480 vram-reserve-mib=1408 conversation-cache-mib=65536 conversation-cache-slots=8 adapt-async=1 short-read=0 pcie-frac=0.00 pool-workers=27 ple-io=ram prompt-cache-every=4096` - Traffic: one Hermes agent session; every turn re-sends the whole conversation (about 98-100% reused); plus the self-review fork that re-sends the same conversation. Two long requests can overlap. ## What we suggest 1. **Make the empty-stream condition observable.** When `serve` answers 200 + one chunk + no finish_reason, log it and count it, the same way the #1603 fix made orphaned busy slots visible with a log line. 2. **Make `/health` reflect the request path, not only the wrapper.** A wrapper that answers every request with an empty stream is not healthy; a client that trusts `/health` cannot notice. A cheap fix: `/health` returns 503 when the last N completed answers were empty, or when no request has started for a while although requests keep arriving. 3. **A small tripwire:** after N consecutive empty answers with no engine request start, fail new requests with 503 (or restart the request path) so client retries can escape and clients can fail over. ## Offer We kept the full engine log and the launch state for the fault window. We can attach it, run a test build, or drive a reproduction attempt on this exact box (single user, 5080, 262K context, Hermes agent workload). ## A word on the fix history The #1603 design — free an orphaned busy slot after 3 s with a log line, and count `live.admitting` so the stall log can name what is busy and who owns it — is exactly the right way to fight invisible states. This case says there is one more invisible state left, one level up in `serve`, and it announces itself as a fast empty 200 instead of a slow hang. Our client-side armor is in place (120 s stale-stream kill with provider failover, plus a 5-minute generation-probe watchdog that restarts the container), so this is a field report to help you fix the root, not a cry for help.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 24, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".
  • Fill in "Area".
  • Fill in "Desktop app, Terminal or source?".
  • Fill in "Reproduction status".
  • Fill in "Strata version".
  • Fill in "Graphics card, memory and system".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6384695765 --> @github-actions[bot] commented on GitHub (Oct 24, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". - [ ] Fill in "Area". - [ ] Fill in "Desktop app, Terminal or source?". - [ ] Fill in "Reproduction status". - [ ] Fill in "Strata version". - [ ] Fill in "Graphics card, memory and system". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@github-actions[bot] commented on GitHub (Oct 25, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6392141558 --> @github-actions[bot] commented on GitHub (Oct 25, 2026): Thanks, this follows the format now.
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Hello ShaggyDragon,

Thank you for the report. We could not reproduce the empty answer, so this is a safety net, not a proven fix. In Strata 0.2.11, when the OpenAI-style stream finishes without an end event the request ends with an error ("the engine ended the request without an answer; the next request restarts it") and the engine is restarted, but only if it is still the process that request ran on and nobody else has the turn. The Responses and Anthropic stream paths are not covered yet. If you see the empty 200 again on 0.2.11, the new log line will tell us which request it was; please send it.

The Strata project

<!-- gh-comment-id:6658489825 --> @Niko1221 commented on GitHub (Nov 5, 2026): Hello ShaggyDragon, Thank you for the report. We could not reproduce the empty answer, so this is a safety net, not a proven fix. In Strata 0.2.11, when the OpenAI-style stream finishes without an end event the request ends with an error ("the engine ended the request without an answer; the next request restarts it") and the engine is restarted, but only if it is still the process that request ran on and nobody else has the turn. The Responses and Anthropic stream paths are not covered yet. If you see the empty 200 again on 0.2.11, the new log line will tell us which request it was; please send it. The Strata project
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Thanks for taking the time to report this.

Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.11. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6659830694 --> @Niko1221 commented on GitHub (Nov 5, 2026): Thanks for taking the time to report this. Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.11. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
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#1697
No description provided.