ollama - 💡(How to fix) Fix Any ollama command causes an instant crash and an unresponsive terminal. [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#15181Fetched 2026-04-08 01:58:12
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
closed ×1labeled ×1

Error Message

ollama pull qwen3.5:9b Exception 0xc0000005 0x8 0x7ff8993acb12 0x7ff8993acb12 PC=0x7ff8993acb12 signal arrived during external code execution

runtime.cgocall(0x7ff7ac96c860, 0xc000047da0) runtime/cgocall.go:167 +0x3e fp=0xc000047d78 sp=0xc000047d10 pc=0x7ff7ab86243e github.com/ollama/ollama/x/imagegen/mlx._Cfunc_mlx_random_key(0xc0000902e0, 0x19d45959b23) _cgo_gotypes.go:1978 +0x50 fp=0xc000047da0 sp=0xc000047d78 pc=0x7ff7abedea50 github.com/ollama/ollama/x/imagegen/mlx.RandomKey.func1(...) github.com/ollama/ollama/x/imagegen/mlx/mlx.go:1870 github.com/ollama/ollama/x/imagegen/mlx.RandomKey(0x19d45959b23) github.com/ollama/ollama/x/imagegen/mlx/mlx.go:1870 +0x5d fp=0xc000047dd8 sp=0xc000047da0 pc=0x7ff7abee797d github.com/ollama/ollama/x/imagegen/mlx.init.0() github.com/ollama/ollama/x/imagegen/mlx/mlx.go:1848 +0xa9 fp=0xc000047e28 sp=0xc000047dd8 pc=0x7ff7abee7789 runtime.doInit1(0x7ff7adcdf2c0) runtime/proc.go:7350 +0xdd fp=0xc000047f50 sp=0xc000047e28 pc=0x7ff7ab84343d runtime.doInit(...) runtime/proc.go:7317 runtime.main() runtime/proc.go:254 +0x325 fp=0xc000047fe0 sp=0xc000047f50 pc=0x7ff7ab834e85 runtime.goexit({}) runtime/asm_amd64.s:1700 +0x1 fp=0xc000047fe8 sp=0xc000047fe0 pc=0x7ff7ab86db21

goroutine 2 gp=0xc0000028c0 m=nil [force gc (idle)]: runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?) runtime/proc.go:435 +0xce fp=0xc000089fa8 sp=0xc000089f88 pc=0x7ff7ab86598e runtime.goparkunlock(...) runtime/proc.go:441 runtime.forcegchelper() runtime/proc.go:348 +0xb8 fp=0xc000089fe0 sp=0xc000089fa8 pc=0x7ff7ab8350f8 runtime.goexit({}) runtime/asm_amd64.s:1700 +0x1 fp=0xc000089fe8 sp=0xc000089fe0 pc=0x7ff7ab86db21 created by runtime.init.7 in goroutine 1 runtime/proc.go:336 +0x1a

goroutine 3 gp=0xc000002c40 m=nil [GC sweep wait]: runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?) runtime/proc.go:435 +0xce fp=0xc00008bf80 sp=0xc00008bf60 pc=0x7ff7ab86598e runtime.goparkunlock(...) runtime/proc.go:441 runtime.bgsweep(0xc000098000) runtime/mgcsweep.go:276 +0x94 fp=0xc00008bfc8 sp=0xc00008bf80 pc=0x7ff7ab81de74 runtime.gcenable.gowrap1() runtime/mgc.go:204 +0x25 fp=0xc00008bfe0 sp=0xc00008bfc8 pc=0x7ff7ab812285 runtime.goexit({}) runtime/asm_amd64.s:1700 +0x1 fp=0xc00008bfe8 sp=0xc00008bfe0 pc=0x7ff7ab86db21 created by runtime.gcenable in goroutine 1 runtime/mgc.go:204 +0x66

goroutine 4 gp=0xc000002e00 m=nil [GC scavenge wait]: runtime.gopark(0xc000098000?, 0x7ff7ad23a760?, 0x1?, 0x0?, 0xc000002e00?) runtime/proc.go:435 +0xce fp=0xc00009ff78 sp=0xc00009ff58 pc=0x7ff7ab86598e runtime.goparkunlock(...) runtime/proc.go:441 runtime.(*scavengerState).park(0x7ff7addf9ba0) runtime/mgcscavenge.go:425 +0x49 fp=0xc00009ffa8 sp=0xc00009ff78 pc=0x7ff7ab81b909 runtime.bgscavenge(0xc000098000) runtime/mgcscavenge.go:653 +0x3c fp=0xc00009ffc8 sp=0xc00009ffa8 pc=0x7ff7ab81be7c runtime.gcenable.gowrap2() runtime/mgc.go:205 +0x25 fp=0xc00009ffe0 sp=0xc00009ffc8 pc=0x7ff7ab812225 runtime.goexit({}) runtime/asm_amd64.s:1700 +0x1 fp=0xc00009ffe8 sp=0xc00009ffe0 pc=0x7ff7ab86db21 created by runtime.gcenable in goroutine 1 runtime/mgc.go:205 +0xa5

goroutine 5 gp=0xc000003340 m=nil [finalizer wait]: runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?) runtime/proc.go:435 +0xce fp=0xc0000a1e30 sp=0xc0000a1e10 pc=0x7ff7ab86598e runtime.runfinq() runtime/mfinal.go:196 +0x107 fp=0xc0000a1fe0 sp=0xc0000a1e30 pc=0x7ff7ab811207 runtime.goexit({}) runtime/asm_amd64.s:1700 +0x1 fp=0xc0000a1fe8 sp=0xc0000a1fe0 pc=0x7ff7ab86db21 created by runtime.createfing in goroutine 1 runtime/mfinal.go:166 +0x3d rax 0x64 rbx 0x7ff89947098c rcx 0x128689f17f350000 rdx 0x2b31ff70000 rdi 0x2b4060e0860 rsi 0x0 rbp 0xfc806ff3a9 rsp 0xfc806fee40 r8 0x7ffffffffffffffc r9 0xfc804fd000 r10 0x80fcf8fefcfefefe r11 0x2b320222fd0 r12 0xffffffffffffffff r13 0x5d r14 0x2b3201702c8 r15 0x0 rip 0x7ff8993acb12 rflags 0x10202 cs 0x33 fs 0x53 gs 0x2b

Code Example

ollama pull qwen3.5:9b
Exception 0xc0000005 0x8 0x7ff8993acb12 0x7ff8993acb12
PC=0x7ff8993acb12
signal arrived during external code execution

runtime.cgocall(0x7ff7ac96c860, 0xc000047da0)
        runtime/cgocall.go:167 +0x3e fp=0xc000047d78 sp=0xc000047d10 pc=0x7ff7ab86243e
github.com/ollama/ollama/x/imagegen/mlx._Cfunc_mlx_random_key(0xc0000902e0, 0x19d45959b23)
        _cgo_gotypes.go:1978 +0x50 fp=0xc000047da0 sp=0xc000047d78 pc=0x7ff7abedea50
github.com/ollama/ollama/x/imagegen/mlx.RandomKey.func1(...)
        github.com/ollama/ollama/x/imagegen/mlx/mlx.go:1870
github.com/ollama/ollama/x/imagegen/mlx.RandomKey(0x19d45959b23)
        github.com/ollama/ollama/x/imagegen/mlx/mlx.go:1870 +0x5d fp=0xc000047dd8 sp=0xc000047da0 pc=0x7ff7abee797d
github.com/ollama/ollama/x/imagegen/mlx.init.0()
        github.com/ollama/ollama/x/imagegen/mlx/mlx.go:1848 +0xa9 fp=0xc000047e28 sp=0xc000047dd8 pc=0x7ff7abee7789
runtime.doInit1(0x7ff7adcdf2c0)
        runtime/proc.go:7350 +0xdd fp=0xc000047f50 sp=0xc000047e28 pc=0x7ff7ab84343d
runtime.doInit(...)
        runtime/proc.go:7317
runtime.main()
        runtime/proc.go:254 +0x325 fp=0xc000047fe0 sp=0xc000047f50 pc=0x7ff7ab834e85
runtime.goexit({})
        runtime/asm_amd64.s:1700 +0x1 fp=0xc000047fe8 sp=0xc000047fe0 pc=0x7ff7ab86db21

goroutine 2 gp=0xc0000028c0 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        runtime/proc.go:435 +0xce fp=0xc000089fa8 sp=0xc000089f88 pc=0x7ff7ab86598e
runtime.goparkunlock(...)
        runtime/proc.go:441
runtime.forcegchelper()
        runtime/proc.go:348 +0xb8 fp=0xc000089fe0 sp=0xc000089fa8 pc=0x7ff7ab8350f8
runtime.goexit({})
        runtime/asm_amd64.s:1700 +0x1 fp=0xc000089fe8 sp=0xc000089fe0 pc=0x7ff7ab86db21
created by runtime.init.7 in goroutine 1
        runtime/proc.go:336 +0x1a

goroutine 3 gp=0xc000002c40 m=nil [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        runtime/proc.go:435 +0xce fp=0xc00008bf80 sp=0xc00008bf60 pc=0x7ff7ab86598e
runtime.goparkunlock(...)
        runtime/proc.go:441
runtime.bgsweep(0xc000098000)
        runtime/mgcsweep.go:276 +0x94 fp=0xc00008bfc8 sp=0xc00008bf80 pc=0x7ff7ab81de74
runtime.gcenable.gowrap1()
        runtime/mgc.go:204 +0x25 fp=0xc00008bfe0 sp=0xc00008bfc8 pc=0x7ff7ab812285
runtime.goexit({})
        runtime/asm_amd64.s:1700 +0x1 fp=0xc00008bfe8 sp=0xc00008bfe0 pc=0x7ff7ab86db21
created by runtime.gcenable in goroutine 1
        runtime/mgc.go:204 +0x66

goroutine 4 gp=0xc000002e00 m=nil [GC scavenge wait]:
runtime.gopark(0xc000098000?, 0x7ff7ad23a760?, 0x1?, 0x0?, 0xc000002e00?)
        runtime/proc.go:435 +0xce fp=0xc00009ff78 sp=0xc00009ff58 pc=0x7ff7ab86598e
runtime.goparkunlock(...)
        runtime/proc.go:441
runtime.(*scavengerState).park(0x7ff7addf9ba0)
        runtime/mgcscavenge.go:425 +0x49 fp=0xc00009ffa8 sp=0xc00009ff78 pc=0x7ff7ab81b909
runtime.bgscavenge(0xc000098000)
        runtime/mgcscavenge.go:653 +0x3c fp=0xc00009ffc8 sp=0xc00009ffa8 pc=0x7ff7ab81be7c
runtime.gcenable.gowrap2()
        runtime/mgc.go:205 +0x25 fp=0xc00009ffe0 sp=0xc00009ffc8 pc=0x7ff7ab812225
runtime.goexit({})
        runtime/asm_amd64.s:1700 +0x1 fp=0xc00009ffe8 sp=0xc00009ffe0 pc=0x7ff7ab86db21
created by runtime.gcenable in goroutine 1
        runtime/mgc.go:205 +0xa5

goroutine 5 gp=0xc000003340 m=nil [finalizer wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        runtime/proc.go:435 +0xce fp=0xc0000a1e30 sp=0xc0000a1e10 pc=0x7ff7ab86598e
runtime.runfinq()
        runtime/mfinal.go:196 +0x107 fp=0xc0000a1fe0 sp=0xc0000a1e30 pc=0x7ff7ab811207
runtime.goexit({})
        runtime/asm_amd64.s:1700 +0x1 fp=0xc0000a1fe8 sp=0xc0000a1fe0 pc=0x7ff7ab86db21
created by runtime.createfing in goroutine 1
        runtime/mfinal.go:166 +0x3d
rax     0x64
rbx     0x7ff89947098c
rcx     0x128689f17f350000
rdx     0x2b31ff70000
rdi     0x2b4060e0860
rsi     0x0
rbp     0xfc806ff3a9
rsp     0xfc806fee40
r8      0x7ffffffffffffffc
r9      0xfc804fd000
r10     0x80fcf8fefcfefefe
r11     0x2b320222fd0
r12     0xffffffffffffffff
r13     0x5d
r14     0x2b3201702c8
r15     0x0
rip     0x7ff8993acb12
rflags  0x10202
cs      0x33
fs      0x53
gs      0x2b
RAW_BUFFERClick to expand / collapse

What is the issue?

Tried both version 18.4 and 19 and both crash instantly.

Relevant log output

ollama pull qwen3.5:9b
Exception 0xc0000005 0x8 0x7ff8993acb12 0x7ff8993acb12
PC=0x7ff8993acb12
signal arrived during external code execution

runtime.cgocall(0x7ff7ac96c860, 0xc000047da0)
        runtime/cgocall.go:167 +0x3e fp=0xc000047d78 sp=0xc000047d10 pc=0x7ff7ab86243e
github.com/ollama/ollama/x/imagegen/mlx._Cfunc_mlx_random_key(0xc0000902e0, 0x19d45959b23)
        _cgo_gotypes.go:1978 +0x50 fp=0xc000047da0 sp=0xc000047d78 pc=0x7ff7abedea50
github.com/ollama/ollama/x/imagegen/mlx.RandomKey.func1(...)
        github.com/ollama/ollama/x/imagegen/mlx/mlx.go:1870
github.com/ollama/ollama/x/imagegen/mlx.RandomKey(0x19d45959b23)
        github.com/ollama/ollama/x/imagegen/mlx/mlx.go:1870 +0x5d fp=0xc000047dd8 sp=0xc000047da0 pc=0x7ff7abee797d
github.com/ollama/ollama/x/imagegen/mlx.init.0()
        github.com/ollama/ollama/x/imagegen/mlx/mlx.go:1848 +0xa9 fp=0xc000047e28 sp=0xc000047dd8 pc=0x7ff7abee7789
runtime.doInit1(0x7ff7adcdf2c0)
        runtime/proc.go:7350 +0xdd fp=0xc000047f50 sp=0xc000047e28 pc=0x7ff7ab84343d
runtime.doInit(...)
        runtime/proc.go:7317
runtime.main()
        runtime/proc.go:254 +0x325 fp=0xc000047fe0 sp=0xc000047f50 pc=0x7ff7ab834e85
runtime.goexit({})
        runtime/asm_amd64.s:1700 +0x1 fp=0xc000047fe8 sp=0xc000047fe0 pc=0x7ff7ab86db21

goroutine 2 gp=0xc0000028c0 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        runtime/proc.go:435 +0xce fp=0xc000089fa8 sp=0xc000089f88 pc=0x7ff7ab86598e
runtime.goparkunlock(...)
        runtime/proc.go:441
runtime.forcegchelper()
        runtime/proc.go:348 +0xb8 fp=0xc000089fe0 sp=0xc000089fa8 pc=0x7ff7ab8350f8
runtime.goexit({})
        runtime/asm_amd64.s:1700 +0x1 fp=0xc000089fe8 sp=0xc000089fe0 pc=0x7ff7ab86db21
created by runtime.init.7 in goroutine 1
        runtime/proc.go:336 +0x1a

goroutine 3 gp=0xc000002c40 m=nil [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        runtime/proc.go:435 +0xce fp=0xc00008bf80 sp=0xc00008bf60 pc=0x7ff7ab86598e
runtime.goparkunlock(...)
        runtime/proc.go:441
runtime.bgsweep(0xc000098000)
        runtime/mgcsweep.go:276 +0x94 fp=0xc00008bfc8 sp=0xc00008bf80 pc=0x7ff7ab81de74
runtime.gcenable.gowrap1()
        runtime/mgc.go:204 +0x25 fp=0xc00008bfe0 sp=0xc00008bfc8 pc=0x7ff7ab812285
runtime.goexit({})
        runtime/asm_amd64.s:1700 +0x1 fp=0xc00008bfe8 sp=0xc00008bfe0 pc=0x7ff7ab86db21
created by runtime.gcenable in goroutine 1
        runtime/mgc.go:204 +0x66

goroutine 4 gp=0xc000002e00 m=nil [GC scavenge wait]:
runtime.gopark(0xc000098000?, 0x7ff7ad23a760?, 0x1?, 0x0?, 0xc000002e00?)
        runtime/proc.go:435 +0xce fp=0xc00009ff78 sp=0xc00009ff58 pc=0x7ff7ab86598e
runtime.goparkunlock(...)
        runtime/proc.go:441
runtime.(*scavengerState).park(0x7ff7addf9ba0)
        runtime/mgcscavenge.go:425 +0x49 fp=0xc00009ffa8 sp=0xc00009ff78 pc=0x7ff7ab81b909
runtime.bgscavenge(0xc000098000)
        runtime/mgcscavenge.go:653 +0x3c fp=0xc00009ffc8 sp=0xc00009ffa8 pc=0x7ff7ab81be7c
runtime.gcenable.gowrap2()
        runtime/mgc.go:205 +0x25 fp=0xc00009ffe0 sp=0xc00009ffc8 pc=0x7ff7ab812225
runtime.goexit({})
        runtime/asm_amd64.s:1700 +0x1 fp=0xc00009ffe8 sp=0xc00009ffe0 pc=0x7ff7ab86db21
created by runtime.gcenable in goroutine 1
        runtime/mgc.go:205 +0xa5

goroutine 5 gp=0xc000003340 m=nil [finalizer wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        runtime/proc.go:435 +0xce fp=0xc0000a1e30 sp=0xc0000a1e10 pc=0x7ff7ab86598e
runtime.runfinq()
        runtime/mfinal.go:196 +0x107 fp=0xc0000a1fe0 sp=0xc0000a1e30 pc=0x7ff7ab811207
runtime.goexit({})
        runtime/asm_amd64.s:1700 +0x1 fp=0xc0000a1fe8 sp=0xc0000a1fe0 pc=0x7ff7ab86db21
created by runtime.createfing in goroutine 1
        runtime/mfinal.go:166 +0x3d
rax     0x64
rbx     0x7ff89947098c
rcx     0x128689f17f350000
rdx     0x2b31ff70000
rdi     0x2b4060e0860
rsi     0x0
rbp     0xfc806ff3a9
rsp     0xfc806fee40
r8      0x7ffffffffffffffc
r9      0xfc804fd000
r10     0x80fcf8fefcfefefe
r11     0x2b320222fd0
r12     0xffffffffffffffff
r13     0x5d
r14     0x2b3201702c8
r15     0x0
rip     0x7ff8993acb12
rflags  0x10202
cs      0x33
fs      0x53
gs      0x2b

OS

<img width="398" height="49" alt="Image" src="https://github.com/user-attachments/assets/c1bed3c3-1b3f-4339-b73b-3790a7f68a1e" />

GPU

GPU: AMD Radeon RX 7900 XT

CPU

CPU: AMD Ryzen 9 5900X 12-Core Processor

Ollama version

18.4 and 19.0

extent analysis

TL;DR

The issue is likely related to a compatibility problem between the Ollama versions (18.4 and 19.0) and the system's GPU or CPU architecture, causing an instant crash.

Guidance

  • The crash occurs in the github.com/ollama/ollama/x/imagegen/mlx package, specifically in the RandomKey function, which may indicate a problem with the MLX library or its interaction with the system's hardware.
  • The presence of runtime.cgocall and runtime.gopark in the stacktrace suggests that the issue might be related to Go's interaction with C code or the scheduling of goroutines.
  • The fact that both version 18.4 and 19.0 of Ollama crash instantly suggests that the problem might be related to a common dependency or a system-specific issue rather than a version-specific bug.
  • To mitigate the issue, try updating the GPU drivers or disabling GPU acceleration to see if the problem persists.

Example

No specific code example can be provided without more information about the Ollama library and its dependencies. However, checking the MLX library documentation and ensuring that the system's GPU drivers are up-to-date might help resolve the issue.

Notes

The provided information is not sufficient to determine the root cause of the issue, and further investigation is needed to identify the problem. The fact that the crash occurs in a CGo call suggests that the issue might be related to the interaction between Go and C code, which can be complex to debug.

Recommendation

Apply workaround: Try disabling GPU acceleration or updating the GPU drivers to see if the problem persists. This might help identify if the issue is related to the system's hardware or the Ollama library itself.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING