Repository navigation
Description
Area
[Engine] (speed, kernels, models, the server and API)
The defect is in the inference engine's HIP path: a deterministic access violation in
amdhip64_7.dll while serving requests, reached right after the engine's dynamic
expert-cache growth. It is not a web UI, Terminal/launch, docs or benchmark issue.
Terminal or source?
Source (START-HERE.bat, setup.sh or a build)
Specifically a local HIP build of release tag v0.2.20-poly.2, because the
ready-made Windows engine is CUDA-only and this is an RDNA3 card. The exact CMake and
build command is in "Build command" below. The baseline comparison is the local
pre-poly.10 engine already on the same machine.
Reproduction status
Reproduced locally
Six crashes in two independent guarded runs (three per run): identical faulting
module, exception code and fault offset each time, and identical client symptom. The
second run had a 90-second cooldown and a fresh expert-profile copy, so this is not a
one-off or a VRAM handoff race.
POLYSTRATA VERSION
- Reported build: PolyStrata 0.2.20-poly.2, tag
v0.2.20-poly.2, commit
5c838331cb8f99b0ef27630846dcca99505ee207, cloned from
https://github.com/simplexai-labs/PolyStrata.git. Engine binary: locally built
strata-poly.exe, 20,148,224 bytes, SHA-256
86238C662C1A547D8F2EE318F79F8D18B2CDB2053533B1F7D260708EF789A600. - Baseline build (identical workload, no crash): local pre-poly.10 engine, git
7a6c098362d014cd7a0b498897ae387635169c41(tag
pre-poly10-20261118-poly10), SHA-256
3A50C224D8244421E64F7C5E2F9079DD24227E38E56EF24BB562760E5B6F379F. - HIP runtime:
amdhip64_7.dll, 16,399,360 bytes. The file on disk in the packaged
ROCm toolchain reports version10.0.3686.0; the Windows Error Reporting record
names10.0.3683.0. Both engines were given the same DLL path from
A:\StrataTools\PolyStrata\.rocm-win\Lib\site-packages\_rocm_sdk_devel\bin.
GRAPHICS CARD, MEMORY AND SYSTEM
- GPU 0: AMD Radeon RX 7600 XT, 16 GB, RDNA3 / gfx1102, device id
0x7480,
driver32.0.32015.16001. Secondary: AMD Radeon(TM) Graphics iGPU, 512 MB. - CPU: AMD Ryzen 5 7600X (6 cores / 12 threads), Gigabyte B650 EAGLE AX board.
- RAM: 31.1 GiB. OS: Windows 11 Home, 10.0.26300 build 26300.
MODEL, SIZE AND SETTINGS
- Model:
Qwen3.6-35B-A3B-UD-Q3_K_M.gguf(MoE, 10,496 routed experts). - Both engines served through
serve/server.py --engine strata, on port 8082, with
identical args:
--max-context 98304 --expert-profile <copy> --conversation-cache-mib 0 --tail-skip 6 --kv-whole --cache-bias 0.25 --vram-reserve-mib 2000. - Each engine got its own copy of the same expert profile, byte-identical at
load. No daily config, profile, binary or user setting was modified for the trial.
WHAT HAPPENED
poly.2 loads dramatically faster than the baseline (6.2 s vs 37.2 s) and serves a
long chat completion at 79.3 tok/s. It then dies with an access violation inside the
AMD HIP runtime on the first request of a real agentic session, and every
automatic restart dies the same way. The daily pre-poly.10 engine ran the identical
workload through all four repair fixtures (121 logged requests, mean 78.7 tok/s
decode) without a single crash.
The last engine-log line before every crash is a dynamic expert-cache growth:
strata-poly: the expert cache 5452 -> 5504 experts (7.10 GiB) for the VRAM free now, 2068 MiB left
It appears immediately after the long completion and before the next agentic request.
The single chat completion alone does not trigger the fault; the first tool-use
turn of the agentic stream does.
Memory was never the cause: commit stayed around 30/57 GiB, the guard never aborted,
and the engine printed 2068 MiB of VRAM left at the moment of the resize.
SMALLEST STEPS OR COMMAND THAT REPRODUCE IT
- Clone tag
v0.2.20-poly.2, build a gfx1102 HIP engine (exact command below). - Host the model with the flags above on port 8082 via
serve/server.py --engine strata. - POST one chat completion:
{"model":"anything","messages":[{"role":"user","content":"tell me a nice long sci-fi story"}],"max_tokens":2048,"temperature":0.9,"stream":false}.
It succeeds (~79 tok/s) and the engine grows its expert cache afterwards. - Send a second, ordinary follow-up request with a few thousand tokens of context
(an agent tool-use turn is what we used). The engine faults inamdhip64_7.dll;
the server restarts it three times and each restart faults again. - Read the fault records with
Get-WinEvent -FilterHashtable @{LogName='Application'; Level=2}.
Build command
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
set PATH=C:\Program Files\CMake\bin;A:\Strata\terminal\.venv\Scripts;%PATH%
set HIP_PLATFORM=amd
set HIP_PATH=A:\StrataTools\PolyStrata\.rocm-win\Lib\site-packages\_rocm_sdk_devel
set ROCM_PATH=%HIP_PATH%
set PATH=%HIP_PATH%\bin;%HIP_PATH%\lib\llvm\bin;%PATH%
cmake -G Ninja -S "<src>\engine" -B "<build>" -DCMAKE_BUILD_TYPE=Release ^
-DSTRATA_ENABLE_HIP=ON -DSTRATA_ENABLE_CUDA=OFF -DSTRATA_BUILD_TESTS=OFF ^
-DSTRATA_PREFILL_MMQ=ON -DSTRATA_PORTABLE=OFF ^
-DCMAKE_HIP_ARCHITECTURES=gfx1102 ^
"-DCMAKE_C_COMPILER=%ROCM_F%/lib/llvm/bin/clang.exe" ^
"-DCMAKE_CXX_COMPILER=%ROCM_F%/lib/llvm/bin/clang++.exe" ^
"-DCMAKE_HIP_COMPILER=%ROCM_F%/lib/llvm/bin/clang++.exe" ^
"-DCMAKE_HIP_COMPILER_ROCM_ROOT=%ROCM_F%" "-DCMAKE_PREFIX_PATH=%ROCM_F%" ^
"-DCMAKE_HIP_FLAGS=--rocm-path=%ROCM_F% --rocm-device-lib-path=%ROCM_F%/lib/llvm/amdgcn/bitcode"
cmake --build "<build>" --target strata-poly -j 6
Build flags were matched to the daily engine (STRATA_PORTABLE=OFF,
STRATA_PREFILL_MMQ=ON, same ROCm toolchain, gfx1102) to rule out a simple flag
difference. STRATA_GGML_DIR cannot be matched: poly.2 uses vendored ggml.
LOGS
Engine log, first attempt (the ready and prompt lines show the successful probe;
the resize is the last line before the restart):
[strata] 2026-11-23 23:21:24 engine started: ...\build-matched\strata-poly.exe --serve --model ... --max-context 98304 ...
strata-poly: STRATA_GDN_MMA: unchanged (needs a CUDA build)
strata: Windows budgets 15557 of this card's 16368 MiB for this process; free VRAM is counted within that (STRATA_WDDM_BUDGET=0: off)
strata: other programs hold 1186 MiB of card 0; free VRAM is counted without it and a 1024 MiB margin (STRATA_WDDM_OTHERS=0: off, STRATA_WDDM_MARGIN_MIB=N)
strata-poly: loaded in 6.3 s; 5332 of 10496 routed experts in VRAM (6.9 GiB), 8 CPU threads
strata-poly: cache bias 0.25: a token that comes a few at a time routes with 0.25 added to the score of each expert in VRAM; the weights stay the router's own
strata-poly: tail skip 6: an expert outside VRAM that every token of a window ranks at place 7 or later among its experts is left out; STRATA_ROUTE_TAIL_SKIP=0 turns it off
strata-poly: ready for requests (context 98304); an engine that waits for one uses no CPU
strata serve: prompt 20 tokens = 0 reused + 20 read in 281 ms (71.1 tok/s), 2048 generated in 25822 ms (79.3 tok/s), drafts accepted 1105 of 1573
strata-poly: the expert cache 5452 -> 5504 experts (7.10 GiB) for the VRAM free now, 2068 MiB left
[strata] 2026-11-23 23:22:11 engine started: ...
... (two more identical start/crash cycles)
Windows Application Error records (all six, identical apart from time and PID):
Faulting application name: strata-poly.exe, version: 0.0.0.0, time stamp: 0x6b04b7f3
Faulting module name: amdhip64_7.dll, version: 10.0.3683.0, time stamp: 0x6ac83dd1
Exception code: 0xc0000005 (access violation)
Fault offset: 0x00000000002d874a (IDENTICAL in all 6 events)
Times, attempt 1: 23:22:05, 23:22:18, 23:22:33
Times, attempt 2: 23:25:38, 23:25:51, 23:26:06
Client-side symptom, repeated after each of the three automatic retries:
custom didn't answer after 3 attempts — it looks temporarily unavailable. Wait a minute and send /retry, or switch models with /model.
Provider said: the engine stopped unexpectedly (exit code 3221225477); the next request restarts it
Your request was not processed. Send it again if you still want me to carry it out.
3221225477 decimal = 0xC0000005 hex.
POLYMATH HARNESS — POSSIBLE COMPATIBILITY FACTOR
The agentic workload comes from polymath, an open local-model test harness at
https://github.com/JuggyBob/polymath (local commit
eb7e220ccb60504d6bc9b777cfc0959d02758a23). The failing fixture is
repair/python/v5 — an async job coordinator with 25 visible and 55 hidden tests.
The client is Hermes using the already-existing qwen96k profile
(base_url: http://127.0.0.1:8082/v1), launched with:
hermes -m qwen96k -z "<task prompt: fix the bugs in this repository, workspace is trial dir, ignore parent READMEs, re-run tests after each fix because failures may be masked>" --yolo --reasoning none
That prompt produces a multi-turn, tool-heavy stream with long, heavily
prefix-cached prompts. The server log shows requests such as
prompt 32225 tokens = 31853 reused + 372 read in 1196 ms (311.0 tok/s), 215 generated in 2710 ms (79.3 tok/s),
arriving every few seconds.
Why this may matter:
- The crash did not happen with a single long chat completion. It happened on the
first request of the agentic stream, directly after the expert-cache resize. A
rapid series of prefix-cached tool-use turns may be the trigger, or it may simply be
the first request after the resize. - The same polymath v5 harness, Hermes profile, config and prompts ran the
pre-poly.10 engine through python, cpp, js and rust — 121 logged requests, no
crashes. So this is not a generic harness defect. It is an interaction between
poly.2's changed cache behaviour and this request pattern; worth checking whether
your own benchmark suites exercise that shape (high reuse ratio, many small
subsequent reads, rapid client turns). - One unrelated detail, so it is not mistaken for an engine fault: the v5 C++ fixture's
own scorer has a bug (NameError: shutilin
repair/cpp/v5/_grader/score.py). It fails identically for both engines.
The full evidence file, with every request line, command and guard outcome, is
A:\StrataTools\docs\reports\POLY2-SERVER-AB-FULL-2026-11-23.md on the reporting
machine. I can paste any section here on request.
WHAT I TRIED
- Two independent guarded runs, each with a fresh expert-profile copy and identical
flags. Six crashes total, same fault address. - A 90-second cooldown after stopping the baseline engine before starting poly.2.
The "other programs hold ~1068 MiB" line persists afterwards, so the reported VRAM
held by other processes is not the 1-second handoff from the previous run. - Matched build flags with the daily engine to rule out a simple build-option cause.
STRATA_FREEZE_EXPERTS=1is being tested now (see next section); the engine log
confirms it took effect: "the experts' split is frozen for the engine's whole run
(STRATA_FREEZE_EXPERTS)".
SEARCHED FIRST
- [Engine] gfx1032 (RX 6600): 0.2.20 prefill 1.5-2.5x below 0.1.45-poly.10 at every prompt size; poly.1 also oscillated the expert cache per request #289 — gfx1032 prefill regression and poly.1 expert-cache oscillation; same cache
area, different GPU, no crash. Cross-linked from that thread. - [Engine] v0.1.45-poly.10 on Windows gfx1102: engine loads, then deadlocks at 0 CPU and exits silently on every start after the first #195 — gfx1102 deadlock on v0.1.45-poly.10; same GPU, different symptom.
- [Engine] gfx1102: decode collapses to 8 tok/s after idle + conversation switch with parked conversations #281 — gfx1102 idle/conversation-cache decode collapse on the daily engine.
- strata-poly: router: an illegal memory access during a 4.8K-token prompt on Qwen3.6-35B UD-Q6_K_XL, RX 6700 XT 12 GB (short prompts work; Q4_K_XL on the same box is fine) #82 — illegal memory access on gfx1010 with a different model and quantization.
No open or closed thread covers a deterministic HIP access violation on 0.2.20-poly.2
with gfx1102.
QUESTIONS
- Is the dynamic expert-cache growth path (
the expert cache N -> M experts ... for the VRAM free now) known to fault on RDNA3/gfx1102 when a rapid agentic request
stream follows? The identical offset six times points to one specific code path. - Is
STRATA_FREEZE_EXPERTS=1the recommended workaround, or is there a cheaper way
to pin or stabilize the split (for example an--expert-cache Nflag)? - Are the build differences relevant — vendored ggml instead of
STRATA_GGML_DIR,
andSTRATA_GDN_MMA: unchanged (needs a CUDA build)— or is that message expected
and inert on HIP? - What debug output would help? I can provide a minidump, per-kernel logs or an
instrumented build if you say what is useful.
Note: poly.2's ~6 s load time against ~37 s is a major improvement for us. If the
crash can be fixed or reliably worked around, I would switch to this build immediately.
Activity
github-actions commentedon Nov 24, 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
github-actions commentedon Nov 24, 2026
Thanks, this follows the format now.
JuggyBob commentedon Nov 24, 2026
Update on
STRATA_FREEZE_EXPERTS=1, requested in #289 as a possible workaround.Result: inconclusive, but it did not reach the crash. With the flag set, the engine
accepted it and printed:
It then never became READY. The start script gave up after 600 s
(
NOT READY after 600s), the guard exited 1 at 605.4 s, and no request was served,so no v5 campaign ran and the original
0xC0000005crash was not reproduced in thismode. The engine log's last line was:
Windows Error Log shows no
strata-poly.exefault during this run. Machine wasverified clean afterwards (no model processes, no listener, 11.6/57.1 GiB commit).
Important caveat: this run happened right after a PC reboot, so the model file's OS
cache was cold. The earlier 6.2 s poly.2 loads were with a warm cache; a cold load of
this ~20 GB model can take several minutes. So the 600 s readiness window may simply
have been too short, and the rocBLAS destructor message may be a shutdown artifact
when the guard tore the tree down. This does not yet tell us whether freezing the
expert split prevents the access violation.
If it is useful, I will repeat with a warmed file cache and a 1,200 s readiness window,
so the frozen run actually gets to the agentic request. Please say whether that is worth
doing, or whether the fault offset and logs already give you enough to go on.
okada-shogo commentedon Nov 24, 2026
@JuggyBob Thank you for the detailed report.
Can you try
port/hip-win-no-lendon https://github.com/okada-shogo/PolyStrata?There seems to be an issue with lending buffers to the expert cache between prompts. I saw this crash when testing with WSL2 but it's possibly related to the Windows AMD driver.
If it still crashes, these would help most:
On your other questions: STRATA_FREEZE_EXPERTS=1 does not fully turn the lending off (the prompt's work memory is still lent from the start), so it is not a workaround here. STRATA_GDN_MMA: unchanged (needs a CUDA build) is expected on HIP and does nothing. -DSTRATA_PREFILL_MMQ=ON is not read by this CMake tree, so it changes nothing; the build flags are not the cause.