mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4664] dsv41 CUDA tp2: >=42K-token prompts stall at the prompt-reading tail - all workers parked on condvars (lost wakeup); full backtrace inside #2121
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2121
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jinsoo on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4664
Summary
Prompts of ~42K+ tokens (chunked prefill, 4096-token chunks) stall at the very end of prompt reading on CUDA 2×RTX 4090 (
--tp 2). The stall sits at the final chunk boundary ("reading the prompt: 47,850 of 47,850 tokens" stops updating), lasts minutes or forever, and a full-thread backtrace shows every worker parked on a condition variable — no thread is computing, and the GPU is idle. This looks like a lost-wakeup / missing-notify at the last chunk, not a performance cliff.Environment
build_dsv41_cuda.sh, ARCH=89-real, CUDA 12.4) — both reproduce--tp 2 --reserve-mib 3072,--max-context 131072Behavior timeline (0.1.52, consistent across runs)
error, cancel=trueFull-thread backtrace at the stall (source build, symbols on)
Captured by SIGINT-ing gdb while the progress line was frozen (120 s + into the stall). 107 threads. Nobody is in a CUDA call, nobody is reading, nobody is spinning:
All remaining threads are parked in the generic CPU-lane worker pool or the RPC reader (
getc). ZerocudaEventSynchronize/cudaMemcpyframes anywhere.Analysis
EgReaderis a clean job queue (submit()setsb.left, readersfetch_suband the last one notifiesdone_cv_). With all 16 readers parked incv_.waitwaiting for a new job, the in-flight EgBatch already completed — the readers are not the problem. The stall is in the layer that should issue the tail of the last chunk or observe its completion and wakeserve_lane/cache_loop(src/dsv41/ds4_model.cu,eg_issue/eg_finish/cache_loop). It matches the "N-7 of N" tail-stall family reported in #3297 and the chunk-boundary reports in #4363.Workaround
External watchdog: if the engine's progress line holds the same token count for 120 s (or prompt throughput drops under 50 tok/s for 180 s), restart the engine; warm restart is ~1 min. Also #2065-style VRAM headroom matters: without
--reserve-mib 3072, the degradation starts as low as 12–24K-token prompts.Full raw backtrace and logs available on request.
@github-actions[bot] commented on GitHub (Oct 30, 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:
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
@Niko1221 commented on GitHub (Oct 31, 2026):
Thanks for the backtrace. We could not test this: we have no DeepSeek pack here where tensor parallel takes effect (on two cards our packs fall back to a layer split), so we have not seen your stall. We did fix a small race in the CPU worker pool that can make a batch run slower; it goes into the next update. We do not know that it is your stall. When the update is out, please try it on your two 4090s and tell us whether the 47,850-token prompt still stops at the end.
@github-actions[bot] commented on GitHub (Nov 4, 2026):
Closing this issue because it still did not follow the format after 5 days. That is housekeeping, not a rejection.
To bring it back: fix the title (area prefix) and the missing parts, then comment
/reopen. A check runs and reopens it, or tells you what is still missing. See CONTRIBUTING.md.