[GH-ISSUE #468] v0.1.34 Windows AMD (discrete W7900): crash 0xC0000005 on first request — engine loads the driver's System32 amdhip64_7.dll #217

Closed
opened 2026-11-04 01:41:00 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @phntsm408 on GitHub (Oct 2, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/468

What happens
Fresh clone of v0.1.34, set up with START-HERE.bat --setup --backend hip --low-ram on. The engine loads fine (all 24,576 experts in the GPU cache), then crashes on the very first request with exit code 3221225477 (0xC0000005). It happens every time, on every model.

Cause
The crash is inside C:\WINDOWS\SYSTEM32\amdhip64_7.dll (the AMD driver's HIP runtime, 10.0.3683.0), called from the bundled engine\rocm\bin\rocblas.dll via hipblasGemmEx. Windows' DLL search order picks the driver's System32 runtime ahead of the bundled ROCm, so the bundled rocBLAS/hipBLAS run on a mismatched HIP runtime.

Stack (top):
#0 amdhip64_7.dll+0x2d874a (C:\WINDOWS\SYSTEM32)
#6 rocblas_zgemv (engine\rocm\bin\rocblas.dll)
#11 rocblas_gemm_ex
#12 hipblasGemmEx (engine\rocm\bin\hipblas.dll)
#13 strata.exe+0x1899da

Workaround (confirmed)
Copying a matching amdhip64_7.dll (ROCm 10.2 nightly, 10.0.3686.0) into engine\ next to strata.exe makes Windows load it instead of the System32 copy. The crash is gone and everything works.

Suggested fix: ship the matching amdhip64_7.dll next to strata.exe, or load it by full path (LoadLibraryExW) at startup before any ROCm library, so the driver's copy can't win.

Results after the workaround (discrete-card data point)

  • Q2_0, 256K context, 8-bit KV, low-RAM mode: 24,576 experts in VRAM, 100% decode hit rate
  • 102.5 tok/s decode on a 513-token answer (6.2 s total)
  • System RAM in use: 13.3 of 48 GB
  • Clearly faster than the earlier jagsan-cyber win-hip-gfx1201 branch on the same PC (about 80 tok/s, about 43 GB RAM)

Also seen

  • The PCIe probe reports impossible bandwidth (about 6,600 to 73,000 GB/s host->device across runs) and always falls back to the 0.55 default.

Setup

  • Strata v0.1.34 (1678de3)
  • GPU: AMD Radeon PRO W7900, 48 GB, gfx1100 (discrete)
  • AMD driver: 32.0.32015.2008 (9/28/2026)
  • CPU: Intel i5-13600K (AVX2, no AVX-512)
  • RAM: 48 GB
  • OS: Windows 11
Originally created by @phntsm408 on GitHub (Oct 2, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/468 **What happens** Fresh clone of v0.1.34, set up with `START-HERE.bat --setup --backend hip --low-ram on`. The engine loads fine (all 24,576 experts in the GPU cache), then crashes on the very first request with exit code 3221225477 (0xC0000005). It happens every time, on every model. **Cause** The crash is inside `C:\WINDOWS\SYSTEM32\amdhip64_7.dll` (the AMD driver's HIP runtime, 10.0.3683.0), called from the bundled `engine\rocm\bin\rocblas.dll` via `hipblasGemmEx`. Windows' DLL search order picks the driver's System32 runtime ahead of the bundled ROCm, so the bundled rocBLAS/hipBLAS run on a mismatched HIP runtime. Stack (top): #0 amdhip64_7.dll+0x2d874a (C:\WINDOWS\SYSTEM32) #6 rocblas_zgemv (engine\rocm\bin\rocblas.dll) #11 rocblas_gemm_ex #12 hipblasGemmEx (engine\rocm\bin\hipblas.dll) #13 strata.exe+0x1899da **Workaround (confirmed)** Copying a matching `amdhip64_7.dll` (ROCm 10.2 nightly, 10.0.3686.0) into `engine\` next to `strata.exe` makes Windows load it instead of the System32 copy. The crash is gone and everything works. Suggested fix: ship the matching `amdhip64_7.dll` next to `strata.exe`, or load it by full path (LoadLibraryExW) at startup before any ROCm library, so the driver's copy can't win. **Results after the workaround (discrete-card data point)** - Q2_0, 256K context, 8-bit KV, low-RAM mode: 24,576 experts in VRAM, 100% decode hit rate - 102.5 tok/s decode on a 513-token answer (6.2 s total) - System RAM in use: 13.3 of 48 GB - Clearly faster than the earlier jagsan-cyber `win-hip-gfx1201` branch on the same PC (about 80 tok/s, about 43 GB RAM) **Also seen** - The PCIe probe reports impossible bandwidth (about 6,600 to 73,000 GB/s host->device across runs) and always falls back to the 0.55 default. **Setup** - Strata v0.1.34 (1678de3) - GPU: AMD Radeon PRO W7900, 48 GB, gfx1100 (discrete) - AMD driver: 32.0.32015.2008 (9/28/2026) - CPU: Intel i5-13600K (AVX2, no AVX-512) - RAM: 48 GB - OS: Windows 11
Author
Owner

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

Thanks, and your workaround pointed straight at the cause. Windows looks for amdhip64_7.dll in the program's folder first, then System32, and only then on PATH, which is where the zip's engine\rocm\bin is. Your AMD driver installs its own amdhip64_7.dll in System32 (10.0.3683, the bundled one is 10.0.3686), so the engine loaded the driver's runtime under the bundled rocBLAS/hipBLAS, and that mix crashes on the first prompt.

The fix is ready for the next release: setup copies amdhip64_7.dll and amd_comgr.dll from engine\rocm\bin next to strata.exe on every start (so existing installs are fixed too), the zip ships them there, and the engine log names the runtime it loaded.

Until then, from the Strata folder:

copy engine\rocm\bin\amdhip64_7.dll engine\
copy engine\rocm\bin\amd_comgr.dll engine\

Please confirm it runs; we'll close this with the release.

<!-- gh-comment-id:5947588459 --> @Niko1221 commented on GitHub (Oct 2, 2026): Thanks, and your workaround pointed straight at the cause. Windows looks for `amdhip64_7.dll` in the program's folder first, then **System32**, and only then on PATH, which is where the zip's `engine\rocm\bin` is. Your AMD driver installs its own `amdhip64_7.dll` in System32 (10.0.3683, the bundled one is 10.0.3686), so the engine loaded the driver's runtime under the bundled rocBLAS/hipBLAS, and that mix crashes on the first prompt. The fix is ready for the next release: setup copies `amdhip64_7.dll` and `amd_comgr.dll` from `engine\rocm\bin` next to `strata.exe` on every start (so existing installs are fixed too), the zip ships them there, and the engine log names the runtime it loaded. Until then, from the Strata folder: ``` copy engine\rocm\bin\amdhip64_7.dll engine\ copy engine\rocm\bin\amd_comgr.dll engine\ ``` Please confirm it runs; we'll close this with the release.
Author
Owner

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

Fixed in 0.1.35: setup puts the bundled amdhip64_7.dll and amd_comgr.dll next to strata.exe (on every start, so your install is fixed by just running START-HERE.bat), the zip ships them there, and the engine log names the runtime it loaded (strata generate: HIP runtime ...). Run START-HERE.bat (Linux: ./setup.sh) once to update. Please reopen if it still crashes, with that log line.

<!-- gh-comment-id:5948757784 --> @Niko1221 commented on GitHub (Oct 2, 2026): Fixed in [0.1.35](https://github.com/Niko1221/Strata/releases/tag/v0.1.35): setup puts the bundled `amdhip64_7.dll` and `amd_comgr.dll` next to `strata.exe` (on every start, so your install is fixed by just running START-HERE.bat), the zip ships them there, and the engine log names the runtime it loaded (`strata generate: HIP runtime ...`). Run `START-HERE.bat` (Linux: `./setup.sh`) once to update. Please reopen if it still crashes, with that log line.
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#217
No description provided.