Skip to content

Terminated by signal SIGILL (Illegal instruction) on FreeBSD #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
yonas opened this issue Mar 17, 2023 · 4 comments
Open

Terminated by signal SIGILL (Illegal instruction) on FreeBSD #10

yonas opened this issue Mar 17, 2023 · 4 comments

Comments

@yonas
Copy link

yonas commented Mar 17, 2023

❯ gmake chat
I llama.cpp build info: 
I UNAME_S:  FreeBSD
I UNAME_P:  amd64
I UNAME_M:  amd64
I CFLAGS:   -I.              -O3 -DNDEBUG -std=c11   -fPIC -pthread -mavx -mavx2 -mfma -mf16c
I CXXFLAGS: -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC -pthread
I LDFLAGS:  
I CC:       FreeBSD clang version 13.0.0 ([email protected]:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
I CXX:      FreeBSD clang version 13.0.0 ([email protected]:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)

cc  -I.              -O3 -DNDEBUG -std=c11   -fPIC -pthread -mavx -mavx2 -mfma -mf16c   -c ggml.c -o ggml.o
c++ -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC -pthread -c utils.cpp -o utils.o
c++ -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC -pthread chat.cpp ggml.o utils.o -o chat 

❯ ./chat 
main: seed = 1679015118
llama_model_load: loading model from 'ggml-alpaca-7b-q4.bin' - please wait ...
fish: Job 1, './chat' terminated by signal SIGILL (Illegal instruction)

FreeBSD 13.1-RELEASE

@yonas
Copy link
Author

yonas commented Mar 17, 2023

Compiles and works fine on Ubuntu 22.10.

@txomon
Copy link

txomon commented Mar 17, 2023

#18 might have caused this

@yonas
Copy link
Author

yonas commented Mar 17, 2023

@txomon It still crashes using the latest d0f855a

@rzighel
Copy link

rzighel commented Apr 8, 2023

Hello guys;

I am too trying to run chat under FreeBSD 13.1.
Chat compiles cleanly, but when launching it:

./chat
/antimatter15-alpaca.cpp-9116ae9]$ ./chat
main: seed = 1680984151
llama_model_load: loading model from 'ggml-alpaca-7b-q4.bin' - please wait ...
Illegal instruction (core dumped)
==
I tried "truss ./chat, and got:
===
[...]
ead(3,"\M-)t(I\M^R\M-~;\M-8\M^Ww\M^F{"...,32768) = 32768 (0x8000)
read(3,"\M-'\M^GykI'\M^Qk\M-f\M^VI\M^Xzw"...,32768) = 32768 (0x8000)
read(3,"u\M-8i\M-'\M^H\M^u%I\M-;Y\M^["...,32768) = 32768 (0x8000)
read(3,"\M^R\M-D;\M-Kt[t[\M-,\M^Vy\M-vi"...,32768) = 32768 (0x8000)
mmap(0x0,2621440,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 34378612736 (0x801200000)
mmap(0x0,3145728,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 34381234176 (0x801480000)
SIGNAL 4 (SIGILL) code=ILL_PRVOPC trapno=1 addr=0x2411d5
process killed, signal = 4 (core dumped)
===

and finnaly, dbugging with gdb:

==

]$ gdb ./chat
GNU gdb (GDB) 13.1 [GDB v13.1 for FreeBSD]

(gdb) run
Starting program: /usr/home/whisper/antimatter15-alpaca.cpp-9116ae9/chat
warning: Could not load shared library symbols for [vdso].
Do you need "set solib-search-path" or "set sysroot"?
main: seed = 1680984937
llama_model_load: loading model from 'ggml-alpaca-7b-q4.bin' - please wait ...

Program received signal SIGILL, Illegal instruction.
Privileged opcode.
0x00000000002411d5 in ggml_type_sizef ()

(gdb) bt
#0 0x00000000002411d5 in ggml_type_sizef ()
#1 0x000000000022886d in llama_model_load(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, llama_model&, gpt_vocab&, int) ()
#2 0x000000000022d5e5 in main ()
(gdb)

My loader.conf has the following:
kern.ipc.semmni=256
kern.ipc.semmns=512
kern.ipc.semmnu=256

===

Helo would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants