[GH-ISSUE #1898] Windows + Radeon AI PRO R9700 (gfx1201): first request always stalls in the first verify window ("reading the prompt (verify windows), from token 0"), 503 after 60 s #745

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

Originally created by @newosj9050 on GitHub (Oct 10, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1898

Setup

  • Strata engine 0.1.41 (START-HERE.bat installer, ready-made engine zip)
  • Windows 11 Pro 10.0.26300, AMD driver 32.0.31036.15
  • Radeon AI PRO R9700 32 GB (gfx1201). strata-device --list-devices: device 0: AMD Radeon AI PRO R9700, arch gfx1201, wave32. --selftest passes (plan FITS)
  • 61 GB RAM, Qwen3.8-Flash-Next IQ2_XS native pack, --mmap-experts
  • Args: --spec 4 --spec-min-p 0.5 --mtp ... --prefill 512 --kv int8 --expert-cache auto --max-context 8192 --adapt-every 0 --pcie-frac 0 --vram-reserve-mib 3072 --no-prefill-borrow

What happens

The server starts and /health reports loaded: true. Every first chat request stalls for 60 s, the watchdog (#29) stops the engine, and the client gets 503. About 12 times in a row, always at the same place:

strata verify: captured the 6-token window (upload no error, sync no error)
strata serve: no progress for 60 s during a request (reading the prompt (verify windows), from token 0) ...
  stall report: 0 layers served since the last finished step
  expert pool: 7 of 7 workers parked, 7 sleeping; host idle for 70866 ms
  verify window (last window, not the current stage): 6 tokens at position 0, host at layer step 1; the GPU rang 1; flags: served 0, plan (A) 0, copies (B) 0
strata: released the verify window's GPU waits (#267): the GPU finished in 2 ms

After the waits are released the GPU finishes in 2 ms (56 ms in another run), so the GPU itself is not hung. It looks like the host and the GPU do not see each other's flag writes in the first verify window. This resembles #697 (Windows, gfx1201, GPU rang 0, fixed by a fence after the doorbell store in 0.1.40), but here the GPU rang once (rang 1), the engine is 0.1.41, and the stall is in the verify-window path.

What I tried (none helped; the stall is identical each time)

  • --no-prefill-borrow
  • GPU_PINNED_MIN_XFER_SIZE=1048576 in the server env (#920)
  • no --mtp, --spec 2 (stall report: 4 tokens at position 0, GPU rang 1, same)
  • both of the above together
  • different --expert-cache and reserve sizes

--spec cannot be removed: the native pack requires --spec >= 2.

Question

Is the first verify window known to need a fence / volatile store on gfx1201 Windows (see the STRATA_DOORBELL_STORE note in #1705)? Is there an env switch to run the first window the old way? As far as I can tell this is the first R9700 + Windows report. I have thread-stack dumps (strata-stall-*.dmp, about 490 KB each) and full logs, and I am happy to test builds.

Related: #697 #267 #29 #613 #579

Originally created by @newosj9050 on GitHub (Oct 10, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1898 ## Setup - Strata engine 0.1.41 (START-HERE.bat installer, ready-made engine zip) - Windows 11 Pro 10.0.26300, AMD driver 32.0.31036.15 - Radeon AI PRO R9700 32 GB (gfx1201). `strata-device --list-devices`: `device 0: AMD Radeon AI PRO R9700, arch gfx1201, wave32`. `--selftest` passes (plan FITS) - 61 GB RAM, Qwen3.8-Flash-Next IQ2_XS native pack, `--mmap-experts` - Args: `--spec 4 --spec-min-p 0.5 --mtp ... --prefill 512 --kv int8 --expert-cache auto --max-context 8192 --adapt-every 0 --pcie-frac 0 --vram-reserve-mib 3072 --no-prefill-borrow` ## What happens The server starts and `/health` reports `loaded: true`. Every first chat request stalls for 60 s, the watchdog (#29) stops the engine, and the client gets 503. About 12 times in a row, always at the same place: ``` strata verify: captured the 6-token window (upload no error, sync no error) strata serve: no progress for 60 s during a request (reading the prompt (verify windows), from token 0) ... stall report: 0 layers served since the last finished step expert pool: 7 of 7 workers parked, 7 sleeping; host idle for 70866 ms verify window (last window, not the current stage): 6 tokens at position 0, host at layer step 1; the GPU rang 1; flags: served 0, plan (A) 0, copies (B) 0 strata: released the verify window's GPU waits (#267): the GPU finished in 2 ms ``` After the waits are released the GPU finishes in 2 ms (56 ms in another run), so the GPU itself is not hung. It looks like the host and the GPU do not see each other's flag writes in the first verify window. This resembles #697 (Windows, gfx1201, `GPU rang 0`, fixed by a fence after the doorbell store in 0.1.40), but here the GPU rang once (`rang 1`), the engine is 0.1.41, and the stall is in the verify-window path. ## What I tried (none helped; the stall is identical each time) - `--no-prefill-borrow` - `GPU_PINNED_MIN_XFER_SIZE=1048576` in the server `env` (#920) - no `--mtp`, `--spec 2` (stall report: `4 tokens at position 0`, `GPU rang 1`, same) - both of the above together - different `--expert-cache` and reserve sizes `--spec` cannot be removed: the native pack requires `--spec >= 2`. ## Question Is the first verify window known to need a fence / volatile store on gfx1201 Windows (see the `STRATA_DOORBELL_STORE` note in #1705)? Is there an env switch to run the first window the old way? As far as I can tell this is the first R9700 + Windows report. I have thread-stack dumps (`strata-stall-*.dmp`, about 490 KB each) and full logs, and I am happy to test builds. Related: #697 #267 #29 #613 #579
Author
Owner

@newosj9050 commented on GitHub (Oct 11, 2026):

Update: likely root cause is the HIP graph capture path on Windows (llama.cpp on the same PC crashes unless graphs are disabled)

Same machine (R9700, gfx1201, Windows 11 10.0.26300). I updated the AMD driver to 26.9.2 (32.0.32015.2008) and it still stalls, so it is not the VRAM-eviction bug from ggml-org/llama.cpp#23443.

I built llama.cpp (2026-10-10) with ROCm 10.1 for gfx1201. With GPU offload, llama-server always dies with 0xC0000374 (heap corruption) at warmup or on the first request. test-backend-ops -b ROCm0 passes thousands of ops including MUL_MAT, so it is not an individual kernel. GGML_CUDA_DISABLE_GRAPHS=1 fixes it: 3B and 26B models both run on the GPU. These did not help: DEBUG_HIP_GRAPH_CLASSIC_PATH=1, DEBUG_HIP_GRAPH_SEGMENT_SCHEDULING=0, GGML_CUDA_NO_PINNED, building without OpenMP.

Strata's log stalls right after strata verify: captured the 6-token window, and #1785 also fails at verify-window capture. So I suspect the same graph capture/replay path. Is there (or could there be) a switch to run the verify window without graph capture on HIP/Windows? I could not find one in strata.exe or the docs. I'm happy to test builds.

<!-- gh-comment-id:6106209091 --> @newosj9050 commented on GitHub (Oct 11, 2026): **Update: likely root cause is the HIP graph capture path on Windows (llama.cpp on the same PC crashes unless graphs are disabled)** Same machine (R9700, gfx1201, Windows 11 10.0.26300). I updated the AMD driver to 26.9.2 (32.0.32015.2008) and it still stalls, so it is not the VRAM-eviction bug from ggml-org/llama.cpp#23443. I built llama.cpp (2026-10-10) with ROCm 10.1 for gfx1201. With GPU offload, `llama-server` always dies with `0xC0000374` (heap corruption) at warmup or on the first request. `test-backend-ops -b ROCm0` passes thousands of ops including MUL_MAT, so it is not an individual kernel. **`GGML_CUDA_DISABLE_GRAPHS=1` fixes it**: 3B and 26B models both run on the GPU. These did not help: `DEBUG_HIP_GRAPH_CLASSIC_PATH=1`, `DEBUG_HIP_GRAPH_SEGMENT_SCHEDULING=0`, `GGML_CUDA_NO_PINNED`, building without OpenMP. Strata's log stalls right after `strata verify: captured the 6-token window`, and #1785 also fails at verify-window capture. So I suspect the same graph capture/replay path. Is there (or could there be) a switch to run the verify window without graph capture on HIP/Windows? I could not find one in `strata.exe` or the docs. I'm happy to test builds.
Author
Owner

@newosj9050 commented on GitHub (Oct 11, 2026):

Minimal repro for the HIP graph problem (no llama.cpp / Strata involved)

A 40-line HIP program crashes on this machine (Windows 11 26300, driver 32.0.32015.2008 = 26.9.2, R9700 gfx1201; also on the second GPU), so the Strata stall above is probably the same runtime bug: launching a captured graph several times corrupts the heap inside hipStreamSynchronize (PAL path, palvirtual.cpp in AMD_LOG_LEVEL=3).

#include <hip/hip_runtime.h>
#include <cstdio>
#include <cstdlib>
#define CK(x) do { hipError_t e = (x); if (e != hipSuccess) { printf("FAIL %s -> %s\n", #x, hipGetErrorString(e)); exit(1);} } while (0)
__global__ void addk(float* a, float v, int n) { int i = blockIdx.x * blockDim.x + threadIdx.x; if (i < n) a[i] += v; }
int main(int argc, char** argv) {
    int reps = argc > 1 ? atoi(argv[1]) : 100;
    int n = 1 << 20; float* d; CK(hipMalloc(&d, n * 4)); CK(hipMemset(d, 0, n * 4));
    hipStream_t s; CK(hipStreamCreate(&s));
    CK(hipStreamBeginCapture(s, hipStreamCaptureModeGlobal));
    addk<<<(n + 255) / 256, 256, 0, s>>>(d, 1.0f, n);
    hipGraph_t g; CK(hipStreamEndCapture(s, &g));
    hipGraphExec_t ex; CK(hipGraphInstantiate(&ex, g, nullptr, nullptr, 0));
    for (int r = 0; r < reps; r++) { CK(hipGraphLaunch(ex, s)); CK(hipStreamSynchronize(s)); }
    printf("ALL OK\n");
}

Build: clang++ -x hip graph.hip --offload-arch=gfx1201 -lamdhip64 (ROCm 10.1 SDK from the AMD wheels), run graph.exe 100.

Result: exit code 0xC0000374 (heap corruption) or 0xC0000005, random per run. 3 runs each: 5 launches 1/3 crash, 100 launches 1/3, 200 launches 2/3. With 1 launch it always passes. The first variant (10 kernels per graph, 100 launches without syncing in between) crashes almost every time.

Same result with amdhip64 10.0.3679, 10.0.3684 (ROCm 10.1) and the nightly 7.14.0a20260612 runtime. Not fixed by DEBUG_CLR_GRAPH_PACKET_CAPTURE=0, HIP_FORCE_DEV_KERNARG=0/1, ROC_USE_FGS_KERNARG=0, HIP_GRAPH_MEM_POOL=0, AMD_SERIALIZE_KERNEL=3, holding VRAM, or running a GPU load beside it. Without graphs (llama.cpp with GGML_CUDA_DISABLE_GRAPHS=1) everything works but slowly.

So the question for Strata: is there a way to run the verify window without a captured graph (an env switch or build flag)? Happy to test builds.

<!-- gh-comment-id:6106937547 --> @newosj9050 commented on GitHub (Oct 11, 2026): **Minimal repro for the HIP graph problem (no llama.cpp / Strata involved)** A 40-line HIP program crashes on this machine (Windows 11 26300, driver 32.0.32015.2008 = 26.9.2, R9700 gfx1201; also on the second GPU), so the Strata stall above is probably the same runtime bug: launching a captured graph several times corrupts the heap inside `hipStreamSynchronize` (PAL path, `palvirtual.cpp` in `AMD_LOG_LEVEL=3`). ```cpp #include <hip/hip_runtime.h> #include <cstdio> #include <cstdlib> #define CK(x) do { hipError_t e = (x); if (e != hipSuccess) { printf("FAIL %s -> %s\n", #x, hipGetErrorString(e)); exit(1);} } while (0) __global__ void addk(float* a, float v, int n) { int i = blockIdx.x * blockDim.x + threadIdx.x; if (i < n) a[i] += v; } int main(int argc, char** argv) { int reps = argc > 1 ? atoi(argv[1]) : 100; int n = 1 << 20; float* d; CK(hipMalloc(&d, n * 4)); CK(hipMemset(d, 0, n * 4)); hipStream_t s; CK(hipStreamCreate(&s)); CK(hipStreamBeginCapture(s, hipStreamCaptureModeGlobal)); addk<<<(n + 255) / 256, 256, 0, s>>>(d, 1.0f, n); hipGraph_t g; CK(hipStreamEndCapture(s, &g)); hipGraphExec_t ex; CK(hipGraphInstantiate(&ex, g, nullptr, nullptr, 0)); for (int r = 0; r < reps; r++) { CK(hipGraphLaunch(ex, s)); CK(hipStreamSynchronize(s)); } printf("ALL OK\n"); } ``` Build: `clang++ -x hip graph.hip --offload-arch=gfx1201 -lamdhip64` (ROCm 10.1 SDK from the AMD wheels), run `graph.exe 100`. Result: exit code `0xC0000374` (heap corruption) or `0xC0000005`, random per run. 3 runs each: 5 launches 1/3 crash, 100 launches 1/3, 200 launches 2/3. With 1 launch it always passes. The first variant (10 kernels per graph, 100 launches without syncing in between) crashes almost every time. Same result with amdhip64 10.0.3679, 10.0.3684 (ROCm 10.1) and the nightly 7.14.0a20260612 runtime. Not fixed by `DEBUG_CLR_GRAPH_PACKET_CAPTURE=0`, `HIP_FORCE_DEV_KERNARG=0/1`, `ROC_USE_FGS_KERNARG=0`, `HIP_GRAPH_MEM_POOL=0`, `AMD_SERIALIZE_KERNEL=3`, holding VRAM, or running a GPU load beside it. Without graphs (llama.cpp with `GGML_CUDA_DISABLE_GRAPHS=1`) everything works but slowly. So the question for Strata: is there a way to run the verify window without a captured graph (an env switch or build flag)? Happy to test builds.
Author
Owner

@newosj9050 commented on GitHub (Oct 11, 2026):

Reported the minimal HIP repro to AMD: https://github.com/ROCm/rocm-systems/issues/13246

Also tried HSA_TOOLS_DISABLE_REGISTER=1 and HIP_LAUNCH_BLOCKING=1 on the repro: no effect.

<!-- gh-comment-id:6107011705 --> @newosj9050 commented on GitHub (Oct 11, 2026): Reported the minimal HIP repro to AMD: https://github.com/ROCm/rocm-systems/issues/13246 Also tried `HSA_TOOLS_DISABLE_REGISTER=1` and `HIP_LAUNCH_BLOCKING=1` on the repro: no effect.
Author
Owner

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

Thanks for taking the time to report this.

We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.0-beta. 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:6270660286 --> @Niko1221 commented on GitHub (Oct 19, 2026): Thanks for taking the time to report this. We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.0-beta. 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).
Author
Owner

@newosj9050 commented on GitHub (Oct 19, 2026):

Thanks for taking the time to answer. I retested on 0.2.0-beta and the stall is gone, so this can stay closed.

Setup: Windows 11 Pro, Radeon AI PRO R9700 (gfx1201, 32 GB), repo at tag v0.2.0-beta (3d1fb480), engine strata-engine-0.1.45.3-windows-x86_64-hip-rx9070 (SHA256 matches the release's SHA256SUMS.txt), same settings as in the report (--mmap-experts --spec 4 --prefill 512 --kv int8 ..., Qwen3.8-Flash-Next IQ2_XS).

Result:

  • first request after start: answered in 2 s (40.5 tok/s); before, it stalled for 60 s in the first verify window and returned 503, 12 times in a row
  • a 2,920-token prompt: 11 s and 7 s; several requests in a row all passed, no watchdog stall

Side note for other users on Windows: START-HERE.bat --update printed No ready-made AMD engine for v0.1.45.3 (HTTP Error 404) because it asks for a strata-windows-x86_64-hip.zip, while the release asset is strata-engine-0.1.45.3-windows-x86_64-hip-rx9070.tar.gz. I unpacked that file into engine\ by hand.

<!-- gh-comment-id:6271512457 --> @newosj9050 commented on GitHub (Oct 19, 2026): Thanks for taking the time to answer. I retested on **0.2.0-beta** and the stall is gone, so this can stay closed. Setup: Windows 11 Pro, Radeon AI PRO R9700 (gfx1201, 32 GB), repo at tag `v0.2.0-beta` (3d1fb480), engine `strata-engine-0.1.45.3-windows-x86_64-hip-rx9070` (SHA256 matches the release's SHA256SUMS.txt), same settings as in the report (`--mmap-experts --spec 4 --prefill 512 --kv int8 ...`, Qwen3.8-Flash-Next IQ2_XS). Result: - first request after start: answered in 2 s (40.5 tok/s); before, it stalled for 60 s in the first verify window and returned 503, 12 times in a row - a 2,920-token prompt: 11 s and 7 s; several requests in a row all passed, no watchdog stall Side note for other users on Windows: `START-HERE.bat --update` printed `No ready-made AMD engine for v0.1.45.3 (HTTP Error 404)` because it asks for a `strata-windows-x86_64-hip.zip`, while the release asset is `strata-engine-0.1.45.3-windows-x86_64-hip-rx9070.tar.gz`. I unpacked that file into `engine\` by hand.
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#745
No description provided.