[GH-ISSUE #4414] [Engine] pl_drain() drops verifier drain errors without a word, and the pipelined request-end waits carry no progress heartbeat - the #2065 convention stops at the pipelined path #1968

Closed
opened 2026-11-04 01:55:39 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @udqe on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4414

Area

[Engine] (speed, kernels, models, the server and API)

Desktop app, Terminal or source?

Source (START-HERE.bat, setup.sh or a build)

What happened

Note

AI-assisted static analysis — model: Qwen3.8-Flash-Next (Unsloth UD-Q4_K_XL) served by this repo's own engine 0.1.52, driven by a DeepSeek-based harness; framed by the documented #2065 convention, not by an observed hang on my machine. Every cited line was re-read against the v0.2.7 source twice on two separate days.

1. pl_drain fails silently. pl_drain (generate.cpp ~10254-10275) is the INVARIANT gate of the pipelined request — its call sites comment "nothing in flight: both stages' commits and the drafter have landed" (~16357, ~14694) — yet it has no way to say anything went wrong: if (v.service(...) < 0) return; (~10263) and else if (!e2.empty()) return; (~10265) abandon the drain on a verifier error, the 10000000-round cap (~10256) exits silently when exhausted, and the function returns void regardless. The callers cannot tell a clean drain from a failed one, and the request-end park and checkpoint paths run on the comment's promise, not on the result.

2. No pipelined wait carries the #2065 progress marking. The convention (mtp.cpp ~1686/~1723, progress_at("mtp draft: waiting for the GPU") // #2065: a stall here read as "decode") exists exactly so a WDDM paging stall reads correctly; the pipelined path — what --pipeline-windows 2 actually runs — has two unmarked GPU waits: the request-end chain spin while (mtp.chain_live() && mtp.chain_poll(err) == 0) {} (generate.cpp ~16381) and the per-commit spin while ((q = cudaEventQuery(ev_commit_)) == cudaErrorNotReady) strata_cpu_pause(); (verify.cpp ~5051, on the serve thread before every pipelined commit). A merely-slow chain or commit on a two-card WDDM split starves the watchdog of beats while no token is emitted.

3. The request-end spin also drops the error. chain_poll returns -1 with a message and clears chain_live_ first (mtp.cpp ~1892-1905); the condition at ~16381 tests only == 0, so an errored chain exits the loop as if it landed, the message is never printed, and chain_tok_ keeps the PREVIOUS chain's tokens — silently reused as the next proposal. The in-file pattern to follow is right there: pl_commit_async propagates the same class of error (if (q != cudaSuccess) { err = ...; return false; }, verify.cpp ~5052) and the verdict handlers return die(err) on it (generate.cpp ~16311/~16320/~16327).

Honest scoping: a true HANG inside pl_drain is reported — diag_pipeline_fn is still registered there (it is cleared at ~16358) and the drain ends with cudaStreamSynchronize(mtp.stream()) (~10274) — so the realistic exposure is silent stale-chain continuation (3) and error swallowing at the invariant gate (1), not an unreported hang.

Expected: a drain failure surfaces (an ERR line or a die) the way every other chain/commit failure does, and the two pipelined waits carry progress_at like the serial draft does. Actual: the drain is silent on error and the waits are unmarked.

Smallest steps or command that reproduce it

Static finding; three recipes (each independently verifiable): (1) fault-inject a split-stage Verifier::service failure after one pipelined window - pl_drain returns silently and the request ends, parks and checkpoints with no diagnostic; (2) delay the request's last chain with concurrent GPU work on a two-WDDM-card box and check whether the watchdog report names the right phase (it cannot, the waits are unmarked); (3) force a chain-event error and observe one silent stale-token proposal round with no message.

Reproduction status

unconfirmed static analysis (recipes above); every cited line re-read twice against the v0.2.7 source. No hang or drain failure observed on this machine.

Strata version

Terminal and app 0.2.7, engine 0.1.52 (release store build windows-x86_64-cuda-cuda13); code citations checked against the v0.2.7 source checkout, re-read twice on two separate days.

Graphics card, memory and system

2x RTX 4090 24 GiB (both PCIe 4.0 x16, engine probe 26.3-26.4 GB/s), Threadripper 3970X, 128 GiB RAM, Windows 11 (WDDM), driver 610.88.

Model, size and settings

Qwen3.8-Flash-Next Unsloth UD-Q4_K_XL, --max-context 307200 --kv int8 --kv-resident 32768 --spec 4 --mtp rt --pipeline-windows 2 --layer-split auto (K=22) --vram-reserve-mib 1728 --vram-reserve-later-mib 972 --pcie-frac 0.20 --spec-min-p 0.70 --adapt-async 1 --conversation-cache-mib 12288 --conversation-cache-slots 4 --expert-cache auto --prefill auto. The pipelined chain path this report is about runs on every decode request of this machine (no fault seen here yet).

Originally created by @udqe on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4414 ### Area [Engine] (speed, kernels, models, the server and API) ### Desktop app, Terminal or source? Source (START-HERE.bat, setup.sh or a build) ### What happened > [!NOTE] > AI-assisted static analysis — model: **Qwen3.8-Flash-Next (Unsloth UD-Q4_K_XL)** served by this repo's own engine 0.1.52, driven by a DeepSeek-based harness; framed by the documented #2065 convention, not by an observed hang on my machine. Every cited line was re-read against the v0.2.7 source twice on two separate days. **1. `pl_drain` fails silently.** `pl_drain` (generate.cpp ~10254-10275) is the INVARIANT gate of the pipelined request — its call sites comment "nothing in flight: both stages' commits and the drafter have landed" (~16357, ~14694) — yet it has no way to say anything went wrong: `if (v.service(...) < 0) return;` (~10263) and `else if (!e2.empty()) return;` (~10265) abandon the drain on a verifier error, the 10000000-round cap (~10256) exits silently when exhausted, and the function returns `void` regardless. The callers cannot tell a clean drain from a failed one, and the request-end park and checkpoint paths run on the comment's promise, not on the result. **2. No pipelined wait carries the #2065 progress marking.** The convention (mtp.cpp ~1686/~1723, `progress_at("mtp draft: waiting for the GPU") // #2065: a stall here read as "decode"`) exists exactly so a WDDM paging stall reads correctly; the pipelined path — what `--pipeline-windows 2` actually runs — has two unmarked GPU waits: the request-end chain spin `while (mtp.chain_live() && mtp.chain_poll(err) == 0) {}` (generate.cpp ~16381) and the per-commit spin `while ((q = cudaEventQuery(ev_commit_)) == cudaErrorNotReady) strata_cpu_pause();` (verify.cpp ~5051, on the serve thread before every pipelined commit). A merely-**slow** chain or commit on a two-card WDDM split starves the watchdog of beats while no token is emitted. **3. The request-end spin also drops the error.** `chain_poll` returns -1 with a message and clears `chain_live_` first (mtp.cpp ~1892-1905); the condition at ~16381 tests only `== 0`, so an errored chain exits the loop as if it landed, the message is never printed, and `chain_tok_` keeps the PREVIOUS chain's tokens — silently reused as the next proposal. The in-file pattern to follow is right there: `pl_commit_async` propagates the same class of error (`if (q != cudaSuccess) { err = ...; return false; }`, verify.cpp ~5052) and the verdict handlers `return die(err)` on it (generate.cpp ~16311/~16320/~16327). Honest scoping: a true HANG inside `pl_drain` is reported — `diag_pipeline_fn` is still registered there (it is cleared at ~16358) and the drain ends with `cudaStreamSynchronize(mtp.stream())` (~10274) — so the realistic exposure is silent stale-chain continuation (3) and error swallowing at the invariant gate (1), not an unreported hang. Expected: a drain failure surfaces (an ERR line or a die) the way every other chain/commit failure does, and the two pipelined waits carry `progress_at` like the serial draft does. Actual: the drain is silent on error and the waits are unmarked. ### Smallest steps or command that reproduce it Static finding; three recipes (each independently verifiable): (1) fault-inject a split-stage Verifier::service failure after one pipelined window - pl_drain returns silently and the request ends, parks and checkpoints with no diagnostic; (2) delay the request's last chain with concurrent GPU work on a two-WDDM-card box and check whether the watchdog report names the right phase (it cannot, the waits are unmarked); (3) force a chain-event error and observe one silent stale-token proposal round with no message. ### Reproduction status unconfirmed static analysis (recipes above); every cited line re-read twice against the v0.2.7 source. No hang or drain failure observed on this machine. ### Strata version Terminal and app 0.2.7, engine 0.1.52 (release store build windows-x86_64-cuda-cuda13); code citations checked against the v0.2.7 source checkout, re-read twice on two separate days. ### Graphics card, memory and system 2x RTX 4090 24 GiB (both PCIe 4.0 x16, engine probe 26.3-26.4 GB/s), Threadripper 3970X, 128 GiB RAM, Windows 11 (WDDM), driver 610.88. ### Model, size and settings Qwen3.8-Flash-Next Unsloth UD-Q4_K_XL, --max-context 307200 --kv int8 --kv-resident 32768 --spec 4 --mtp rt --pipeline-windows 2 --layer-split auto (K=22) --vram-reserve-mib 1728 --vram-reserve-later-mib 972 --pcie-frac 0.20 --spec-min-p 0.70 --adapt-async 1 --conversation-cache-mib 12288 --conversation-cache-slots 4 --expert-cache auto --prefill auto. The pipelined chain path this report is about runs on every decode request of this machine (no fault seen here yet).
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:6660442997 --> @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#1968
No description provided.