[GH-ISSUE #4682] [Engine] 0.1.54: deep cold prompt replay still stalls 60 s on __iomap_dio_rw x16 -> watchdog kills the engine (Linux/Docker, 5060 Ti 16GB + 64GB RAM) #2136

Open
opened 2026-11-04 01:56:57 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @hejm2000 on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4682

Summary

On serve 0.2.8 / engine 0.1.54 (Linux, Docker, RTX 5060 Ti 16 GB + 64 GB RAM, single-GPU slot, NVMe btrfs volume), the "engine stopped unexpectedly" family that plagued 0.1.46/0.1.47 still fires: two deep cold-prompt replays stalled 60 s at reading the prompt (batched): layer 1 with 16 threads in state D inside __iomap_dio_rw — identical signature to the 0.1.46/0.1.47 stall reports, one day after the upgrade. The VRAM-side (#2065) and swap-side pressures were eliminated on this host before those two deaths, which isolates the remaining cause to the --ple-io direct random-read layer.

Environment

  • Host: Linux, RTX 5060 Ti 16 GB, 64 GB DDR5, NVMe SSD (btrfs), engine in Docker volume
  • serve 0.2.8 (switched 2026-10-30 ~11:09), engine 0.1.54, --ple-io direct (default path), --max-context 155000, --vram-reserve-mib 700
  • Model: qwen3.8-flash-next IQ3_XXS MoE (PLE table ~27 GB on disk), ple cpu mode, expert cache on
  • Client: multi-session agent backend (OpenAI-compatible), retries on engine stopped unexpectedly; each death costs a full engine reload (~123 s) before the retry succeeds

Death ledger (our side)

  • Engine 0.1.46/0.1.47 (2026-10-25 → 10-27): repeated engine stopped unexpectedly — exit -6 (SIGABRT from the stall watchdog) and stream-kill (exit None) variants; the recorded stall reports show request-start VRAM free 122-314 MiB with host swap 1.7-1.9 GiB, same stage line and same __iomap_dio_rw x16 line as the 0.1.54 reports above. A five-death run 22:22→10:33 (10-26/10-27, engine 0.1.47) plus two post-restart cold-window deaths are on our ledger with character-identical signatures.
  • 2026-10-27: upgraded engine 0.1.46→0.1.47 + --vram-reserve-mib 700; the stall signature kept firing on 0.1.47 with the same shape.
  • 2026-10-30 11:09: upgraded to 0.2.8 / engine 0.1.54. Two deaths the same day:
    • 11:38:52 — exit -6, stall at token 81380
    • 13:09:45 — exit None, stall at token 158662
      Both were deep conversations replaying a cold prompt (~81K / ~158K token positions); client saw engine stopped unexpectedly (exit -6) / The engine says it stopped because it made no progress for 60 s during a request (issue #29). See issue #29 and its watchdog-abandon note.

Stall reports from 0.1.54 (verbatim, launch/docker.engine.log)

strata serve: stall report (engine 0.1.54): stage "reading the prompt (batched): layer 1 of the prompt chunk from token 81380" for 60 s; 0 layers served since the last finished step (0 = stopped, more = slow)
VRAM free when this request began: 570 MiB
expert pool: epoch 2162844, batch epoch 2162844: 36 of 36 jobs claimed, 36 done; 11 of 11 workers parked, 11 sleeping; mode 0
expert pool threads: w0=sleeping ... w10=sleeping; host idle for 112029 ms
verify window (last window, not the current stage): 4 tokens at position 56022, host at layer step 48; the GPU rang 48; flags: served 48, plan (A) 48, copies (B) 48
threads waiting on the disk (state D): 16 of 43 (__iomap_dio_rw x16) - the engine is waiting for the drive: a rotational or failing disk with --ple-io direct (#605: --ple-io ram), or a drive too slow for the reads asked of it
memory: 43894 MiB resident, 270 MiB in swap, 3767 MiB RAM available; 295 major page faults so far
strata serve: stall report (engine 0.1.54): stage "reading the prompt (batched): layer 1 of the prompt chunk from token 158662" for 60 s; 0 layers served since the last finished step (0 = stopped, more = slow)
verify window (last window, not the current stage): 3 tokens at position 158659, host at layer step 48; the GPU rang 48; flags: served 48, plan (A) 48, copies (B) 48
threads waiting on the disk (state D): 16 of 43 (__iomap_dio_rw x16) - the engine is waiting for the drive: a rotational or failing disk with --ple-io direct (#605: --ple-io ram), or a drive too slow for the reads asked of it
memory: 44040 MiB resident, 1164 MiB in swap, 4080 MiB RAM available; 3418 major page faults so far

(The 60 s window for this request advanced 158659 -> 158662 = 3 tokens total — measurable movement, then a hard stop; the engine was alive and blocked on I/O, not wedged in software.)

For contrast, the 0.1.46-era report (same stage, same __iomap_dio_rw x16, VRAM free 312-314 MiB, swap 1.7-1.9 GiB) — the stage line and D-state line are character-for-character identical across engine versions.

What we eliminated on this host (differential)

  1. #2065 sysmem-fallback / GPU-pressured host: request-start VRAM free improved from 122-314 MiB (0.1.46/47 deaths) to 570 MiB (both 0.1.54 deaths) after --vram-reserve-mib 700 + the 0.2.8 sizing work — the LOW-VRAM annotation is gone from the new reports, the stall is not.
  2. Swap exhaustion / host thrash: host had been at swap-out 647-1393 MiB/s with avail 2.8-3.9 GiB during the 10-25/10-27 deaths; after capping host swappiness the two 0.1.54 deaths show engine swap 270 MiB / 1094 MiB and RAM available 3.8-4.1 GiB — no thrash at stall time.
  3. Expert-pool wedging: 36/36 jobs claimed and done, all workers sleeping — pool is idle, waiting on the disk.
  4. Failing/rotational disk: NVMe SSD; smart state OK; the host drive is not slow for ordinary reads — the reads asked of it at that moment (random 4 KiB-class PLE/expert reads under a ~44 GiB resident engine with a small page-cache budget) are what block, and __iomap_dio_rw keeps them in uninterruptible D for the full 60 s.

What is left standing is the --ple-io direct path itself: the same 16 __iomap_dio_rw D threads the watchdog blames in its own report text (#605 lineage), unchanged in 0.1.54.

  • #2267 "iq3-xss engine keeps stopping with code -6" — same signature (probe measured --ple-io direct at 1-3 MB/s of random 4 KiB reads, then 60 s no-progress + 16 D threads). Closed 10-15 with the reporter's own note that --ple-io mmap "was rejected by server.py" and STRATA_PLE_AUTO_MMAP "had no effect in the env"; they survived by setting STRATA_WATCHDOG_S=180. No maintainer follow-up.
  • #2797 (ple-io direct slow reads) — closed 10-19 in the 1300-issue tracker reset with no substantive reply.
  • #4051 was closed 10-29 with a fix aimed at the handover/RAM-wait side ("waits up to 120 s for the old engine ... STRATA_ARENA_RAM_WAIT_S"); our deaths are mid-request stall reports, not handover wedges, so we could not tell from the changelog whether anything touched this read path.

Questions / asks

  1. Is --ple-io mmap accepted on this stack, and through which channel? #2267 suggests the server rejects the launch argument and the env knob is a no-op — if mmap (or --ple-io ram with a table this size) is not the supported remedy on a Docker/NVMe host with a thin RAM budget, what is?
  2. Would the team consider making the stall watchdog tolerant of barely-progressing windows (e.g. a window that advances a few tokens but whose thread spend is 100% in __iomap_dio_rw D) — abort on no-progress-plus-not-waiting-disk, rather than killing an engine that is demonstrably alive and blocked on I/O? Our two deaths both had measurable (3-4 token) window movement and a full D-state account.
  3. We can run instrumented tests on this host (it reproduces the signature on command with a deep cold replay) — happy to validate a candidate patch or a new flag against the two recorded token positions.

Data available on request: full stall report pairs (0.1.46/47 vs 0.1.54), request ledger from /api/requests, and the death notes from launch-docker.server.log for both 0.1.54 deaths.

Originally created by @hejm2000 on GitHub (Oct 30, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4682 ## Summary On serve 0.2.8 / engine 0.1.54 (Linux, Docker, RTX 5060 Ti 16 GB + 64 GB RAM, single-GPU slot, NVMe btrfs volume), the "engine stopped unexpectedly" family that plagued 0.1.46/0.1.47 still fires: two deep cold-prompt replays stalled 60 s at `reading the prompt (batched): layer 1` with **16 threads in state D inside `__iomap_dio_rw`** — identical signature to the 0.1.46/0.1.47 stall reports, one day after the upgrade. The VRAM-side (#2065) and swap-side pressures were eliminated on this host before those two deaths, which isolates the remaining cause to the `--ple-io direct` random-read layer. ## Environment - Host: Linux, RTX 5060 Ti 16 GB, 64 GB DDR5, NVMe SSD (btrfs), engine in Docker volume - serve 0.2.8 (switched 2026-10-30 ~11:09), engine 0.1.54, `--ple-io direct` (default path), `--max-context 155000`, `--vram-reserve-mib 700` - Model: qwen3.8-flash-next IQ3_XXS MoE (PLE table ~27 GB on disk), ple cpu mode, expert cache on - Client: multi-session agent backend (OpenAI-compatible), retries on `engine stopped unexpectedly`; each death costs a full engine reload (~123 s) before the retry succeeds ## Death ledger (our side) - Engine 0.1.46/0.1.47 (2026-10-25 → 10-27): repeated `engine stopped unexpectedly` — exit -6 (SIGABRT from the stall watchdog) and stream-kill (exit None) variants; the recorded stall reports show request-start VRAM free 122-314 MiB with host swap 1.7-1.9 GiB, same stage line and same `__iomap_dio_rw` x16 line as the 0.1.54 reports above. A five-death run 22:22→10:33 (10-26/10-27, engine 0.1.47) plus two post-restart cold-window deaths are on our ledger with character-identical signatures. - 2026-10-27: upgraded engine 0.1.46→0.1.47 + `--vram-reserve-mib 700`; the stall signature kept firing on 0.1.47 with the same shape. - 2026-10-30 11:09: upgraded to 0.2.8 / engine 0.1.54. Two deaths the same day: - 11:38:52 — exit -6, stall at token 81380 - 13:09:45 — exit None, stall at token 158662 Both were deep conversations replaying a cold prompt (~81K / ~158K token positions); client saw `engine stopped unexpectedly (exit -6) / The engine says it stopped because it made no progress for 60 s during a request (issue #29). See issue #29 and its watchdog-abandon note.` ## Stall reports from 0.1.54 (verbatim, launch/docker.engine.log) ``` strata serve: stall report (engine 0.1.54): stage "reading the prompt (batched): layer 1 of the prompt chunk from token 81380" for 60 s; 0 layers served since the last finished step (0 = stopped, more = slow) VRAM free when this request began: 570 MiB expert pool: epoch 2162844, batch epoch 2162844: 36 of 36 jobs claimed, 36 done; 11 of 11 workers parked, 11 sleeping; mode 0 expert pool threads: w0=sleeping ... w10=sleeping; host idle for 112029 ms verify window (last window, not the current stage): 4 tokens at position 56022, host at layer step 48; the GPU rang 48; flags: served 48, plan (A) 48, copies (B) 48 threads waiting on the disk (state D): 16 of 43 (__iomap_dio_rw x16) - the engine is waiting for the drive: a rotational or failing disk with --ple-io direct (#605: --ple-io ram), or a drive too slow for the reads asked of it memory: 43894 MiB resident, 270 MiB in swap, 3767 MiB RAM available; 295 major page faults so far ``` ``` strata serve: stall report (engine 0.1.54): stage "reading the prompt (batched): layer 1 of the prompt chunk from token 158662" for 60 s; 0 layers served since the last finished step (0 = stopped, more = slow) verify window (last window, not the current stage): 3 tokens at position 158659, host at layer step 48; the GPU rang 48; flags: served 48, plan (A) 48, copies (B) 48 threads waiting on the disk (state D): 16 of 43 (__iomap_dio_rw x16) - the engine is waiting for the drive: a rotational or failing disk with --ple-io direct (#605: --ple-io ram), or a drive too slow for the reads asked of it memory: 44040 MiB resident, 1164 MiB in swap, 4080 MiB RAM available; 3418 major page faults so far ``` (The 60 s window for this request advanced 158659 -> 158662 = 3 tokens total — measurable movement, then a hard stop; the engine was alive and blocked on I/O, not wedged in software.) For contrast, the 0.1.46-era report (same stage, same `__iomap_dio_rw` x16, VRAM free 312-314 MiB, swap 1.7-1.9 GiB) — the stage line and D-state line are **character-for-character identical across engine versions**. ## What we eliminated on this host (differential) 1. **#2065 sysmem-fallback / GPU-pressured host**: request-start VRAM free improved from 122-314 MiB (0.1.46/47 deaths) to 570 MiB (both 0.1.54 deaths) after `--vram-reserve-mib 700` + the 0.2.8 sizing work — the LOW-VRAM annotation is gone from the new reports, the stall is not. 2. **Swap exhaustion / host thrash**: host had been at swap-out 647-1393 MiB/s with avail 2.8-3.9 GiB during the 10-25/10-27 deaths; after capping host swappiness the two 0.1.54 deaths show engine swap 270 MiB / 1094 MiB and RAM available 3.8-4.1 GiB — no thrash at stall time. 3. **Expert-pool wedging**: 36/36 jobs claimed and done, all workers sleeping — pool is idle, waiting on the disk. 4. **Failing/rotational disk**: NVMe SSD; smart state OK; the host drive is not slow for ordinary reads — the reads asked of it at that moment (random 4 KiB-class PLE/expert reads under a ~44 GiB resident engine with a small page-cache budget) are what block, and `__iomap_dio_rw` keeps them in uninterruptible D for the full 60 s. What is left standing is the `--ple-io direct` path itself: the same 16 `__iomap_dio_rw` D threads the watchdog blames in its own report text (#605 lineage), unchanged in 0.1.54. ## Related closed issues this revives - **#2267** "iq3-xss engine keeps stopping with code -6" — same signature (probe measured `--ple-io direct` at 1-3 MB/s of random 4 KiB reads, then 60 s no-progress + 16 D threads). Closed 10-15 with the reporter's own note that `--ple-io mmap` "was rejected by server.py" and `STRATA_PLE_AUTO_MMAP` "had no effect in the env"; they survived by setting `STRATA_WATCHDOG_S=180`. No maintainer follow-up. - **#2797** (ple-io direct slow reads) — closed 10-19 in the 1300-issue tracker reset with no substantive reply. - **#4051** was closed 10-29 with a fix aimed at the handover/RAM-wait side ("waits up to 120 s for the old engine ... `STRATA_ARENA_RAM_WAIT_S`"); our deaths are mid-request stall reports, not handover wedges, so we could not tell from the changelog whether anything touched this read path. ## Questions / asks 1. Is `--ple-io mmap` accepted on this stack, and through which channel? #2267 suggests the server rejects the launch argument and the env knob is a no-op — if mmap (or `--ple-io ram` with a table this size) is not the supported remedy on a Docker/NVMe host with a thin RAM budget, what is? 2. Would the team consider making the stall watchdog tolerant of *barely-progressing* windows (e.g. a window that advances a few tokens but whose thread spend is 100% in `__iomap_dio_rw` D) — abort on no-progress-plus-not-waiting-disk, rather than killing an engine that is demonstrably alive and blocked on I/O? Our two deaths both had measurable (3-4 token) window movement and a full D-state account. 3. We can run instrumented tests on this host (it reproduces the signature on command with a deep cold replay) — happy to validate a candidate patch or a new flag against the two recorded token positions. Data available on request: full stall report pairs (0.1.46/47 vs 0.1.54), request ledger from `/api/requests`, and the death notes from launch-docker.server.log for both 0.1.54 deaths.
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#2136
No description provided.