whispercpp icon indicating copy to clipboard operation
whispercpp copied to clipboard

bug: core dump where i try in ubuntu

Open EricKong1985 opened this issue 2 years ago • 3 comments

Describe the bug

Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.

from whispercpp import Whisper w = Whisper.from_pretrained("tiny.en") Illegal instruction (core dumped)

To reproduce

No response

Expected behavior

No response

Environment

Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.

Distributor ID: Ubuntu Description: Ubuntu 22.04.1 LTS Release: 22.04 Codename: jammy

EricKong1985 avatar Jun 10 '23 20:06 EricKong1985

I try to build with my OS ,looks it also cause core dump in my system running install_egg_info Copying src/whispercpp.egg-info to build/bdist.linux-x86_64/wheel/whispercpp-0.0.17.post65+gbc9769c-py3.10.egg-info running install_scripts creating build/bdist.linux-x86_64/wheel/whispercpp-0.0.17.post65+gbc9769c.dist-info/WHEEL creating '/home/eric/whispercpp/dist/.tmp-g_4zvv7l/whispercpp-0.0.17.post65+gbc9769c-cp310-cp310-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it adding 'whispercpp/about.py' adding 'whispercpp/init.py' adding 'whispercpp/init.pyi' adding 'whispercpp/api.pyi' adding 'whispercpp/api_cpp2py_export.so' adding 'whispercpp/audio.pyi' adding 'whispercpp/audio_cpp2py_export.so' adding 'whispercpp/py.typed' adding 'whispercpp/utils.py' adding 'whispercpp-0.0.17.post65+gbc9769c.dist-info/LICENSE' adding 'whispercpp-0.0.17.post65+gbc9769c.dist-info/METADATA' adding 'whispercpp-0.0.17.post65+gbc9769c.dist-info/WHEEL' adding 'whispercpp-0.0.17.post65+gbc9769c.dist-info/top_level.txt' adding 'whispercpp-0.0.17.post65+gbc9769c.dist-info/RECORD' removing build/bdist.linux-x86_64/wheel Successfully built whispercpp-0.0.17.post65+gbc9769c-cp310-cp310-linux_x86_64.whl eric@eric-Thurley:~/whispercpp$ pip install dist/*.whl Defaulting to user installation because normal site-packages is not writeable Processing ./dist/whispercpp-0.0.17.post65+gbc9769c-cp310-cp310-linux_x86_64.whl Installing collected packages: whispercpp Successfully installed whispercpp-0.0.17.post65+gbc9769c eric@eric-Thurley:~/whispercpp$ cd eric@eric-Thurley:~$ python Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.

from whispercpp import Whisper w = Whisper.from_pretrained("tiny.en") Illegal instruction (core dumped) eric@eric-Thurley:~$

EricKong1985 avatar Jun 12 '23 13:06 EricKong1985

I have the same issue.

I use

  • Ubuntu 22.04 Server VM
  • Python 3.10

I install it directly from the repo

  • pip install git+https://github.com/aarnphm/whispercpp.git -vv

I think maybe something got changed on the main whisper.cpp repo which results in such a problem.

UPDATE:

I figured out the problem, I read a lot of logs and somehow the compiled part of the library is not compatible with Intel Xeon processors, it works fine on my other computers with i7 processors. when it starts to load the model it crashes and shows in the journalctl -xe invalid opcode, for some reason my Xeon processor is unable to understand some assembly instructions.

mmhy2003 avatar Oct 31 '23 12:10 mmhy2003

I had the same problem. Whenever I attempted loading a model - I got "Illegal instruction (core dumped)". Here I found the the issue could be in the CPU and it worked for me.

I got this error on a server with Xeon E5-2687W CPU (manufactured back in 2012) When I changed it to AMD Ryzen Threadripper PRO 5955WX (2022) - all worked fine.

If that doesn't help you, I also found that it could be a bug with numpy, try downgrading in to 1.19.4

Nik-Kras avatar Sep 19 '24 12:09 Nik-Kras