ipex-llm icon indicating copy to clipboard operation
ipex-llm copied to clipboard

ollama-ipex fails running any models - A380 - llama runner process terminated

Open jpmiller25 opened this issue 6 months ago • 14 comments

When running ./ollama run , it will fail after a few seconds. The GPU just barely starts to load up before it fails (watching intel_gpu_top). Error: Error: llama runner process has terminated: exit status 2 Logs below of me trying to run 4 different models. This is the only thing in the log sticking out to me:

SIGBUS: bus error
PC=0x7676b317af3d m=4 sigcode=2 addr=0x767514922ff0
signal arrived during cgo execution

Setup: Dell T410 server, 2 x xeon processors, 128g ram proxmox, VM running fresh ubuntu 22.04 w pcie passthrough Asrock A380 low profile, updated firmware Followed https://github.com/intel/ipex-llm/blob/main/docs/mddocs/Quickstart/ollama_portable_zip_quickstart.md

I did find someone else who had similar issues, ended up solving by enabling resizeable bar. That's not an option for me with this motherboard, hopefully that's not a dealbreaker.

Environment information

(base) josh@ollama:~$ ./env-check.sh
-----------------------------------------------------------------
PYTHON_VERSION=3.13.2
-----------------------------------------------------------------
Transformers is not installed.
-----------------------------------------------------------------
PyTorch is not installed.
-----------------------------------------------------------------
ipex-llm WARNING: Package(s) not found: ipex-llm
-----------------------------------------------------------------
IPEX is not installed.
-----------------------------------------------------------------
CPU Information:
Architecture:                         x86_64
CPU op-mode(s):                       32-bit, 64-bit
Address sizes:                        40 bits physical, 48 bits virtual
Byte Order:                           Little Endian
CPU(s):                               8
On-line CPU(s) list:                  0-7
Vendor ID:                            GenuineIntel
Model name:                           QEMU Virtual CPU version 2.5+
CPU family:                           15
Model:                                107
Thread(s) per core:                   1
Core(s) per socket:                   4
Socket(s):                            2
Stepping:                             1
BogoMIPS:                             6117.99
Flags:                                fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc nopl xtopology cpuid tsc_known_freq pni ssse3 cx16 sse4_1 sse4_2 x2apic popcnt aes hypervisor lahf_lm cpuid_fault pti
Hypervisor vendor:                    KVM
-----------------------------------------------------------------
Total CPU Memory: 15.1406 GB
Memory Type: -----------------------------------------------------------------
Operating System:
Ubuntu 22.04.5 LTS \n \l

-----------------------------------------------------------------
Linux ollama 6.8.0-60-generic #63~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 22 19:00:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
-----------------------------------------------------------------
CLI:
    Version: 1.2.41.20250422
    Build ID: 00000000

Service:
    Version: 1.2.41.20250422
    Build ID: 00000000
    Level Zero Version: 1.21.1
-----------------------------------------------------------------
  Driver UUID                                     32352e31-332e-3333-3237-360000000000
  Driver Version                                  25.13.33276
-----------------------------------------------------------------
Driver related package version:
-----------------------------------------------------------------
./env-check.sh: line 167: sycl-ls: command not found
igpu not detected
-----------------------------------------------------------------
xpu-smi is properly installed.
-----------------------------------------------------------------
+-----------+--------------------------------------------------------------------------------------+
| Device ID | Device Information                                                                   |
+-----------+--------------------------------------------------------------------------------------+
| 0         | Device Name: Intel(R) Arc(TM) A380 Graphics                                          |
|           | Vendor Name: Intel(R) Corporation                                                    |
|           | SOC UUID: 00000000-0000-1006-0000-000556a58086                                       |
|           | PCI BDF Address: 0000:06:10.0                                                        |
|           | DRM Device: /dev/dri/card1                                                           |
|           | Function Type: physical                                                              |
+-----------+--------------------------------------------------------------------------------------+
GPU0 Memory [size=4K
GPU1 Memory size=16M
-----------------------------------------------------------------
00:01.0 VGA compatible controller: Device 1234:1111 (rev 02) (prog-if 00 [VGA controller])
        Subsystem: Red Hat, Inc. Device 1100
        Flags: bus master, fast devsel, latency 0
        Memory at f0000000 (32-bit, prefetchable) [disabled] [size=16M]
        Memory at fe814000 (32-bit, non-prefetchable) [disabled] [size=4K]
        Expansion ROM at 000c0000 [disabled] [size=128K]
        Kernel driver in use: bochs-drm
        Kernel modules: bochs

--
06:10.0 VGA compatible controller: Intel Corporation Device 56a5 (rev 05) (prog-if 00 [VGA controller])
        Subsystem: ASRock Incorporation Device 6006
        Physical Slot: 16-2
        Flags: bus master, fast devsel, latency 0, IRQ 43
        Memory at fb000000 (64-bit, non-prefetchable) [size=16M]
        Memory at c0000000 (64-bit, prefetchable) [size=256M]
        Capabilities: <access denied>
        Kernel driver in use: i915
        Kernel modules: i915, xe

ollama logs.txt

jpmiller25 avatar Jun 06 '25 18:06 jpmiller25

Hey just wanted to flag that I am having a similar issue: https://github.com/intel/ipex-llm/issues/13213 I'm also running on a system without resizeable bar - Hope this isn't a terminal issue for LLM usage on Arc.

sbonner0 avatar Jun 07 '25 17:06 sbonner0

@sbonner0 does your processor support AVX2? It's looking to me like my issue is my xeon CPU's without AVX support. There's been discussion and effort on ollama to be able to use non-avx cpu's. I'm trying to find out now if changes have made it upstream and integrated to the ipex version.

jpmiller25 avatar Jun 07 '25 19:06 jpmiller25

I'm using the ipex ollama portable version now, which I think is version 0.5.4. Some people are saying they were able to successfully run with GPU and no AVX support on ollama 0.5.9.

jpmiller25 avatar Jun 07 '25 19:06 jpmiller25

https://github.com/ollama/ollama/issues/7622#issuecomment-2524637378 https://github.com/ollama/ollama/issues/2187

jpmiller25 avatar Jun 07 '25 19:06 jpmiller25

Well now I'm kind of doubting it's an AVX issue for me. I'm getting the same sigbus error using ollama-ipex portable and ollama on ipex-llama-cpp. I've also tried both binaries while running through intel-sde64 to emulate AVX support, and same issue.

jpmiller25 avatar Jun 07 '25 22:06 jpmiller25

Hey thanks for the responses. I'm using a system with an 6950x which does support AVX2. The same system ran Ollama fine with an nvidia card installed.

sbonner0 avatar Jun 08 '25 10:06 sbonner0

It seems like our issues could be related, the sigbus errors look very similar and they happen at exactly the same moment in the model loading process. I'm not sure where to look next, nothing comes up in my dmesg logs.

jpmiller25 avatar Jun 08 '25 15:06 jpmiller25

I am starting to fear it is indeed the lack of ReBAR that is causing this.

sbonner0 avatar Jun 08 '25 15:06 sbonner0

Looking like you are right. This issue solved the sigbus errors by enabling rebar.

https://github.com/intel/ipex-llm/issues/10955#issuecomment-2100967354

jpmiller25 avatar Jun 08 '25 17:06 jpmiller25

Thanks for the link, really seems like the ReBAR is the issue annoyingly.

Interestingly I had been reading this blog post from someone who got Ollama running on a non-ReBAR system using the vulkan version - https://kovasky.me/blogs/intel_arc_no_rebar/ I might try this in the week if I get time.

sbonner0 avatar Jun 08 '25 18:06 sbonner0

As I know, this intel team doesn't release ollama-xeon version, so your model cannot load on xeon cpu. Btw it's a good idea to raise an issue to ask them to support xeon.

Ellie-Williams-007 avatar Jun 09 '25 01:06 Ellie-Williams-007

llama.cpp works when built with vulkan! I didn't try the kovasky blog method, I just cloned and built llama.cpp with vulkan support, and it's working at least in llama-cli

jpmiller25 avatar Jun 11 '25 04:06 jpmiller25

@sbonner0 After some experimentation I'm using https://github.com/kth8/llama-server-vulkan/ with great success, and integrating with open-webui. Theres not nearly as much configuration ability through the UI in case that's important to you, but it's working great for my case.

For intel, I'll leave this up for the moment. If you can adjust your repos to be able to use Vulkan functionality, even as an option or fallback, it would go far to allowing your hardware to run on a lot more machines, including ones without AVX or ReBAR support. Thanks!

jpmiller25 avatar Jun 11 '25 17:06 jpmiller25

@sbonner0 After some experimentation I'm using https://github.com/kth8/llama-server-vulkan/ with great success, and integrating with open-webui. Theres not nearly as much configuration ability through the UI in case that's important to you, but it's working great for my case.

For intel, I'll leave this up for the moment. If you can adjust your repos to be able to use Vulkan functionality, even as an option or fallback, it would go far to allowing your hardware to run on a lot more machines, including ones without AVX or ReBAR support. Thanks!

May I know what is the token generation speed with this setup of yours please?

kmleow avatar Sep 29 '25 13:09 kmleow