[GH-ISSUE #1275] Windows HIP: --prefill auto can pick a chunk whose VRAM borrow leaves too little for the verify captures — silent engine exit at serve init #523

Closed
opened 2026-11-04 01:43:45 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @slogomansdad on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1275

Engine 0.1.40 (also reproduced on 0.1.39), Windows 11, RX 9060 XT 16 GB (gfx1200), IQ2_XS, 128K context,
--kv-resident 32768, expert cache auto (6,053 slots / 8.11 GiB), --resident-budget-gib 12.

With plain --prefill auto the chunk selection picked 15,104 tokens, borrowing 5,119 cache slots
(6.85 GiB). After "313 MiB of VRAM free with everything loaded" the engine exited silently during the
verify-window capture phase — no log line after the free-VRAM line; the server reports "the engine exited
before it was ready". Reproduced on 4 consecutive starts.

With --prefill auto:8192 (borrow 2,925 slots / 3.90 GiB) the same machine starts and serves normally,
so that's the workaround.

Possibly related: #1250 (host OOM while allocating the page-locked IQ2_XS copy) — different allocation
and different failure point, but both are Windows memory-pressure edge cases around the budget copy.

Expected: the auto chunk rule could account for the post-borrow allocations (the verify captures are
57.2 MiB of device buffers, plus whatever else serve init needs), or clamp the borrow so post-borrow free
VRAM stays above a floor.

Originally created by @slogomansdad on GitHub (Oct 6, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1275 Engine 0.1.40 (also reproduced on 0.1.39), Windows 11, RX 9060 XT 16 GB (gfx1200), IQ2_XS, 128K context, `--kv-resident 32768`, expert cache auto (6,053 slots / 8.11 GiB), `--resident-budget-gib 12`. With plain `--prefill auto` the chunk selection picked **15,104 tokens**, borrowing 5,119 cache slots (6.85 GiB). After "313 MiB of VRAM free with everything loaded" the engine exited silently during the verify-window capture phase — no log line after the free-VRAM line; the server reports "the engine exited before it was ready". Reproduced on 4 consecutive starts. With `--prefill auto:8192` (borrow 2,925 slots / 3.90 GiB) the same machine starts and serves normally, so that's the workaround. Possibly related: #1250 (host OOM while allocating the page-locked IQ2_XS copy) — different allocation and different failure point, but both are Windows memory-pressure edge cases around the budget copy. Expected: the auto chunk rule could account for the post-borrow allocations (the verify captures are 57.2 MiB of device buffers, plus whatever else serve init needs), or clamp the borrow so post-borrow free VRAM stays above a floor.
Author
Owner

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

Partly addressed in 0.1.40.2, not fixed. We could not reproduce this (no Windows AMD card here). The engine now prints the free VRAM before each verify-window capture, and a Windows start with under 512 MiB free and --prefill auto says to try --prefill auto:8192 or a larger --vram-reserve-mib. The chunk choice is unchanged. Please send the log of a failing start on 0.1.40.2: the new capture line shows where it stops.

<!-- gh-comment-id:6038122851 --> @Niko1221 commented on GitHub (Oct 7, 2026): Partly addressed in 0.1.40.2, not fixed. We could not reproduce this (no Windows AMD card here). The engine now prints the free VRAM before each verify-window capture, and a Windows start with under 512 MiB free and --prefill auto says to try --prefill auto:8192 or a larger --vram-reserve-mib. The chunk choice is unchanged. Please send the log of a failing start on 0.1.40.2: the new capture line shows where it stops.
Author
Owner

@Metalazzo commented on GitHub (Oct 10, 2026):

Following up on #1275 — same verify-window-capture failure, on a discrete card you don't have (Radeon AI PRO R9700, gfx1201)

I reproduce the verify-window capture failure at serve init on Windows HIP, but with two findings that complicate the VRAM-borrow-pressure theory.

1. The 0.1.40.2 failing start you asked for (matches your shape):

# 0.1.40.2 · --max-context 262144
...
warning: 447 MiB of VRAM free … that is little room for the verify windows' buffers under WDDM
# [engine exits during verify-window capture — no line printed after]

Full strata-.log attached (drag-dropped below). So on 0.1.40.2 it really does look like #1275 — low post-borrow VRAM, near-silent exit. That part holds.

2. But on 0.1.41 it fails the SAME way with healthy VRAM — and as a hard TDR wedge, not a silent exit:

  • Card: Radeon AI PRO R9700 32 GB (gfx1201), driver 32.0.23033.1002, ROCm 10.2.0a20260930, engine 0.1.41
  • --max-context 262144 → dies at first capture:
strata serve: 2308 MiB of VRAM free with everything loaded
hipModuleUnload failed:
 error: unspecified launch failure
Exception Code: 0xC00000FD
  • --max-context 229376 on the same box → all six windows captured, serves a 119,136-token prompt fine.
  • Free VRAM at the crash (2308 MiB) is identical to the working start (2306 MiB). So this is not post-borrow VRAM pressure. And it is not a silent exit: Windows logs LiveKernelEvent 141 twice (watchdog reset / TDR). Four consecutive 262144 starts died the same way.

So the 0.1.40.2 runs may be your borrow-pressure case, but the 0.1.41 runs wedge the driver regardless of free VRAM. That points at the capture path itself, not the borrow budget.

strata-iq3_s.log

<!-- gh-comment-id:6092412106 --> @Metalazzo commented on GitHub (Oct 10, 2026): ## Following up on #1275 — same verify-window-capture failure, on a discrete card you don't have (Radeon AI PRO R9700, gfx1201) I reproduce the verify-window capture failure at serve init on Windows HIP, but with two findings that complicate the VRAM-borrow-pressure theory. **1. The 0.1.40.2 failing start you asked for (matches your shape):** ```text # 0.1.40.2 · --max-context 262144 ... warning: 447 MiB of VRAM free … that is little room for the verify windows' buffers under WDDM # [engine exits during verify-window capture — no line printed after] ``` Full `strata-.log` attached (drag-dropped below). So on 0.1.40.2 it really does look like #1275 — low post-borrow VRAM, near-silent exit. That part holds. **2. But on 0.1.41 it fails the SAME way with healthy VRAM — and as a hard TDR wedge, not a silent exit:** - Card: **Radeon AI PRO R9700 32 GB (gfx1201)**, driver 32.0.23033.1002, ROCm 10.2.0a20260930, engine 0.1.41 - `--max-context 262144` → dies at first capture: ```text strata serve: 2308 MiB of VRAM free with everything loaded hipModuleUnload failed: error: unspecified launch failure Exception Code: 0xC00000FD ``` - `--max-context 229376` on the same box → all six windows captured, serves a 119,136-token prompt fine. - Free VRAM at the crash (**2308 MiB**) is **identical** to the working start (**2306 MiB**). So this is not post-borrow VRAM pressure. And it is not a silent exit: Windows logs `LiveKernelEvent 141` twice (watchdog reset / TDR). Four consecutive 262144 starts died the same way. So the 0.1.40.2 runs may be your borrow-pressure case, but the 0.1.41 runs wedge the driver regardless of free VRAM. That points at the capture path itself, not the borrow budget. [strata-iq3_s.log](https://github.com/user-attachments/files/33272531/strata-iq3_s.log)
Author
Owner

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

Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.

If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.

<!-- gh-comment-id:6156050060 --> @Niko1221 commented on GitHub (Oct 13, 2026): Thanks for the report. To keep the tracker current we are closing issues older than three days: [0.1.44](https://github.com/Niko1221/Strata/releases/tag/v0.1.44) is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1. If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.
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#523
No description provided.