mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4512] [Engine] 0.1.52 hip-rx9070 ships no amdgcn/bitcode: HIP cannot build its blit kernels and the engine SEGVs at startup #2031
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#2031
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 @l33tm4st3r on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4512
Area
[Engine]Desktop app, Terminal or source?
Desktop app (Windows, Linux or Mac) — Linux AppImage 0.2.7, engine installed through Update engine.
What happened
Engine
0.1.52-linux-x86_64-hip-rx9070dies withSIGSEGVa few seconds after it starts, before the model is ready.strata-vision-hipdies at the same instruction a second earlier.The crash is not in a kernel and not in the driver. It is a null-pointer dereference inside the bundled
libamdhip64.so.7, releasing a reference count of an object that was never created, because the HIP runtime could not build its blit kernels:The component ships
libamdhip64.so.7,libhsa-runtime64.so.1,libamd_comgr.so.3,libLLVM.so.22.0git,rocblas/andhipblaslt/, but noamdgcn/bitcode. At HIP init, ROCclr JIT-links its blit kernels against the ROCm device libraries (ockl.bc,ocml.bc,opencl.bc,hip.bc); without them the link fails,BlitManageris never created, and the first strided host→device copy dereferences it.Expected instead: bundle the device libraries that match the bundled toolchain, or fail with the
cannot find ROCm device librarymessage instead of a segmentation fault.Smallest steps or command that reproduce it
0.1.52-linux-x86_64-hip-rx9070with Update engine.Qwen3.8-Flash-Next IQ3_XXSwith pictures on.Strata engine 0.1.52 is installed; no model is loaded yet, then both engine processes die within ~5 s andcoredumpctl listshows the SIGSEGV entries.Without the app, with the same arguments the app writes into
strata-<model>.json:--vision,--mtp,--specand the context size are not involved: with--max-context 2048, no--vision, no--mtpand no--spec, the log still printsCouldn't create blit kernels!and the process dies the same way.What matters is which HIP library is loaded.
stratahasRUNPATH $ORIGIN, and the app's launcher (serve/server.py,child_env()) puts the component directory first inLD_LIBRARY_PATH, so the bundled HIP 7.2.53210 / COMGR 3.0 are always used on the app path. Running the same binary with/opt/rocm/libfirst inLD_LIBRARY_PATHloads the system runtime instead and does not crash (workaround below).Reproduction status
Reproduced locally. 15 coredumps in 12 minutes, all at the same instruction, in two binaries (
strataandstrata-vision-hip).Strata version
Strata 0.2.7 · engine 0.1.52 · variant
rx9070·build_id f-amd-vision a42cc3d7df70+rocm·engine-component.jsonschema 2 · hipBLASLt 100200Graphics card, memory and system
1002:7551,gfx1201), no display attachedgfx1036); KFD node 1 =gfx1201, node 2 =gfx1036, so HIP device 0 is the R9700amdgpu3.64.0,linux-firmware1:20261019-1xf86-video-amdgpu25.0.0rocm-bin 10.1.0-1) at/opt/rocm;/opt/rocm/amdgcn/bitcodehas the 75.bcfiles includingoclc_isa_version_1201.bc,opencl.bc,ockl.bc,ocml.bc,hip.bc/opt/rocm/lib: HIP 7.16.26385, COMGR 3.5No
amdgpureset, ring timeout or VM fault in the kernel log around the crashes.Model, size and settings
Qwen3.8-Flash-Next IQ3_XXS native pack (2 shards, ~70.6 GiB) +
mmproj-…-BF16.gguf(865 MiB) ·--max-context 131072·--kv int8· pictures on ·--spec 4 --spec-min-p 0.5·--mtp rt·--pool-workers 13·--resident-budget-gib 27·--vram-reserve-mib 6533. VRAM free at the time: ~31.8 GiB of 31.86 GiB.Logs
AMD_LOG_LEVEL=3, last lines before the death (timestamps removed):Coredump, main thread (paths shortened):
The faulting instruction is an atomic refcount decrement on
rdi(thethispointer), andrdiis0:Kernel log, same for both processes:
strata-vision-hipkeeps its symbols, so the path that reaches the broken copy is visible:Why the device library is not found
The component directory has no
amdgcn/at all:strace -f -e trace=openat,newfstatat,stat,accessof the failing run: the bundled COMGR's clang driver reads/opt/rocm/share/hip/version, accepts the directory given byHIP_DEVICE_LIB_PATH(/opt/rocm/lib/llvm/amdgcn/bitcode,openat(..., O_DIRECTORY) = 5), and still fails the link withcannot find ROCm device library. It also probes its own resource directory, which the component does not ship:So the variables are read; the bundled LLVM 22 / COMGR 3.0 does not accept the ROCm 10.1 device libraries, and it has no bitcode of its own to fall back to. These do not change the failure:
Workaround (verified)
Run the engine on the system ROCm runtime instead of the bundled one. Tested with the app's own engine arguments, pictures on, 8192 context.
Put
/opt/rocm/libbefore the component directory:Or keep the launcher's
LD_LIBRARY_PATHand preload the system runtime:For the desktop app, variant 2 needs no change inside the component: the engine config
~/.local/share/strata/install/strata-<model>.jsoncarries anenvobject that the launcher applies to both the engine andstrata-vision-hip:Result with that in place, starting the model from the app (or
serve/server.pywith the same config):No
Couldn't create blit kernels, noCould not create BlitManager, no SIGSEGV, no new coredump, and the GPU picture reader starts instead of falling back to the CPU.Notes:
librocblas.so.5,libhipblas.so.3andlibhipblaslt.so.1are still loaded from the component and work against the system HIP; onlylibamdhip64,libamd_comgrandlibhsa-runtime64come from/opt/rocm.Suggested fix
amdgcn/bitcodefrom the ROCm toolchain the engine was built with (build_id …+rocm) inside the component package and list it inengine-component.jsonso updates keep it. Thehip-rx7900report in #3263 shows the packaging already varies between builds, so this looks like the same class of gap.HIP_DEVICE_LIB_PATHand thenROCM_PATH, and make that fallback actually work with the bundled COMGR, which today reads those paths and still reportscannot find ROCm device library.Could not create BlitManager!: report thecannot find ROCm device libraryline as a normal engine error and exit, instead of dereferencing the missing object later on the first strided copy.Validation
AMD_LOG_LEVEL=3, exit 139); the JIT failure that precedes it captured; same failure without--vision;ROCM_PATH,HIP_DEVICE_LIB_PATHand theamdgcnsymlink do not help; both workarounds remove the JIT failure, load the weights and reachREADY/ready: http://127.0.0.1:8080/v1, including through the app's own launcher with pictures on.@github-actions[bot] commented on GitHub (Oct 28, 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[bot] commented on GitHub (Oct 28, 2026):
Thanks, this follows the format now.
@Niko1221 commented on GitHub (Nov 5, 2026):
Thanks for taking the time to report this.
Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.