Bug 294215 - misc/llama-cpp: illegal instruction/SIGILL on AMD 4750U
Summary: misc/llama-cpp: illegal instruction/SIGILL on AMD 4750U
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-04-02 20:54 UTC by Martin Cracauer
Modified: 2026-04-03 07:39 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Cracauer 2026-04-02 20:54:06 UTC
Both llama-server and llama-cli show the same illegal instruction when the CPU is initialized.

I tried both today's package and compiled from ports. Identical behavior.

OS is 16-current/AMD64

%%

Thread 1 received signal SIGILL, Illegal instruction.
Privileged opcode.
0x00000008011849f2 in ggml_cpu_init () from /usr/local/lib/libggml-cpu.so.0
(gdb) bt
#0  0x00000008011849f2 in ggml_cpu_init () from /usr/local/lib/libggml-cpu.so.0
#1  0x00000008011875e9 in ggml_backend_cpu_reg ()
   from /usr/local/lib/libggml-cpu.so.0
#2  0x00000008007d0ad7 in ggml_backend_registry::ggml_backend_registry() ()
   from /usr/local/lib/libggml.so.0
#3  0x00000008007ce076 in ggml_backend_reg_by_name ()
   from /usr/local/lib/libggml.so.0
#4  0x0000000800f99ee0 in llama_supports_rpc ()
   from /usr/local/lib/libllama.so.0
#5  0x00000000004260bc in ?? ()
#6  0x000000000043ee93 in ?? ()
#7  0x00000000002e0254 in ?? ()
#8  0x0000000804bcae4f in __libc_start1 (argc=1, argv=0x7fffffffd348, 
    env=0x7fffffffd358, cleanup=<optimized out>, mainX=0x2e0200)
    at /mnt/part2/usr/src/lib/libc/csu/libc_start1.c:180
#9  0x00000000002e01a4 in ?? ()
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2026-04-03 07:39:04 UTC
-march=native was by mistake used by this port.
This caused SIGILL because your CPU is incompatible with the one on which it was built.

This is now fixed.

Thanks for reporting this issue!
Comment 2 commit-hook freebsd_committer freebsd_triage 2026-04-03 07:39:46 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ea4b8e4ba3186917682d1b8b6f3b9e971c8685a1

commit ea4b8e4ba3186917682d1b8b6f3b9e971c8685a1
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-04-03 07:36:37 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-04-03 07:39:09 +0000

    misc/ggml: update 0.9.8 → 0.9.11

    PR:             294215 (fix for SIGILL)

 misc/ggml/Makefile | 9 +++++----
 misc/ggml/distinfo | 6 +++---
 2 files changed, 8 insertions(+), 7 deletions(-)