[GH-ISSUE #4284] [Engine] Deadlock on ~25K-token context: /v1/chat/completions hangs forever, engine busy-loops ~350% CPU, /v1/models stays 'loaded' (0.1.48, RTX 5080, Linux) #1888

Open
opened 2026-11-04 01:55:04 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @dedvmedved-dot on GitHub (Oct 27, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4284

Area

Engine — long-context generation deadlock (serve request path)

Strata version

Terminal 0.2.3.1 — engine 0.1.48 (Control 0.1.49.1)

Environment

  • GPU: RTX 5080 16 GB (Blackwell sm_120)
  • RAM: 96 GiB
  • OS: Linux (Proxmox VM)
  • Model: Qwen3.8-Flash-Next 125B MoE, Unsloth UD-Q4_K_XL
  • Launch: --parallel 1, nominal context 64K (n_ctx 65536)

Reproduction

Deterministic on this setup. Trigger: a long-lived agent session reaching ~100 messages /
~25,000 tokens. After that, every POST /v1/chat/completions wedges:

  1. POST /v1/chat/completions — never returns (curl (28) Operation timed out, 0 bytes).
  2. GET /v1/models — still HTTP 200 with "state": "loaded" (a naive health check sees "healthy").
  3. The strata --serve process sits at ~350% CPU (busy-loop), ~88% memory — alive but unresponsive.

With --parallel 1, every later request queues behind the stuck one, so the service is
effectively dead while monitoring reports "loaded". The nominal 64K context is not reachable —
the engine wedges at ~25K tokens.

strata update does not fix it: the engine reports "up to date" (only the Control component
updates).

Why this looks distinct from existing reports

  • Not the #29 / #2049 / #3807 hang-family signature: the engine does not self-kill with
    "no progress for 60 s"; it stays alive in a CPU busy-loop and the stall watchdog never fires.
  • Not #3961 (instant empty answer): here the request never returns at all.
  • The /v1/models-stays-loaded detail masks the deadlock from liveness probes.

Workaround

Restart the model (strata launch --stop / pkill -f 'strata --serve', then relaunch) and keep
sessions short (/new before ~25K tokens). Note: a watchdog probing only /v1/models will NOT
catch this; probing /v1/chat/completions under --parallel 1 also queues behind the stuck
request.

  • #3807 — hang family (engine self-kills; different signature)
  • #3961 — engine 0.1.48, /health stays ok (empty-answer symptom)
  • #2049 — deadlock at completion handshake (closed)
Originally created by @dedvmedved-dot on GitHub (Oct 27, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4284 ### Area Engine — long-context generation deadlock (serve request path) ### Strata version Terminal 0.2.3.1 — engine 0.1.48 (Control 0.1.49.1) ### Environment - GPU: RTX 5080 16 GB (Blackwell sm_120) - RAM: 96 GiB - OS: Linux (Proxmox VM) - Model: Qwen3.8-Flash-Next 125B MoE, Unsloth UD-Q4_K_XL - Launch: `--parallel 1`, nominal context 64K (n_ctx 65536) ### Reproduction Deterministic on this setup. Trigger: a long-lived agent session reaching ~100 messages / ~25,000 tokens. After that, every `POST /v1/chat/completions` wedges: 1. `POST /v1/chat/completions` — never returns (curl `(28) Operation timed out`, 0 bytes). 2. `GET /v1/models` — still HTTP 200 with `"state": "loaded"` (a naive health check sees "healthy"). 3. The `strata --serve` process sits at ~350% CPU (busy-loop), ~88% memory — alive but unresponsive. With `--parallel 1`, every later request queues behind the stuck one, so the service is effectively dead while monitoring reports "loaded". The nominal 64K context is not reachable — the engine wedges at ~25K tokens. `strata update` does not fix it: the engine reports "up to date" (only the Control component updates). ### Why this looks distinct from existing reports - Not the #29 / #2049 / #3807 hang-family signature: the engine does **not** self-kill with "no progress for 60 s"; it stays alive in a CPU busy-loop and the stall watchdog never fires. - Not #3961 (instant empty answer): here the request never returns at all. - The `/v1/models`-stays-`loaded` detail masks the deadlock from liveness probes. ### Workaround Restart the model (`strata launch --stop` / `pkill -f 'strata --serve'`, then relaunch) and keep sessions short (`/new` before ~25K tokens). Note: a watchdog probing only `/v1/models` will NOT catch this; probing `/v1/chat/completions` under `--parallel 1` also queues behind the stuck request. ### Related - #3807 — hang family (engine self-kills; different signature) - #3961 — engine 0.1.48, `/health` stays ok (empty-answer symptom) - #2049 — deadlock at completion handshake (closed)
Author
Owner

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

Engine 0.1.48 is old. Please run strata update, retest, and if the request still hangs at about 25K tokens send the engine stderr tail and, while it hangs, a stack of the busy thread (gdb -p PID -batch -ex "thread apply all bt").

<!-- gh-comment-id:6492022213 --> @Niko1221 commented on GitHub (Oct 29, 2026): Engine 0.1.48 is old. Please run `strata update`, retest, and if the request still hangs at about 25K tokens send the engine stderr tail and, while it hangs, a stack of the busy thread (`gdb -p PID -batch -ex "thread apply all bt"`).
Author
Owner

@dedvmedved-dot commented on GitHub (Nov 2, 2026):

Updated to engine 0.1.55 (Control 0.1.55). One note: the first strata update test-start failed only because the box had 32 GB RAM; after raising it back to 96 GB, strata update --force installed and test-started 0.1.55 cleanly.

Retested on 0.1.55 (UD-Q4_K_XL, RTX 5080, 96 GiB RAM, reasoning disabled):

  • single request: 34 901 prompt tokens → HTTP 200 in ~56 s (prefill ~638 tok/s), no hang;
  • session-style request: 101 messages / 32 957 prompt tokens → HTTP 200 in ~48 s, no hang.

No busy-loop, and /v1/models vs /v1/chat/completions stay consistent. The ~25K-token deadlock does not reproduce on 0.1.55 — looks fixed. Thanks for the pointer to update.

<!-- gh-comment-id:6566838302 --> @dedvmedved-dot commented on GitHub (Nov 2, 2026): Updated to engine 0.1.55 (Control 0.1.55). One note: the first `strata update` test-start failed only because the box had 32 GB RAM; after raising it back to 96 GB, `strata update --force` installed and test-started 0.1.55 cleanly. Retested on 0.1.55 (UD-Q4_K_XL, RTX 5080, 96 GiB RAM, reasoning disabled): - single request: 34 901 prompt tokens → HTTP 200 in ~56 s (prefill ~638 tok/s), no hang; - session-style request: 101 messages / 32 957 prompt tokens → HTTP 200 in ~48 s, no hang. No busy-loop, and `/v1/models` vs `/v1/chat/completions` stay consistent. The ~25K-token deadlock does not reproduce on 0.1.55 — looks fixed. Thanks for the pointer to update.
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#1888
No description provided.