Skip to content
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

zsh: illegal hardware instruction #121

Open
ankurt opened this issue Feb 15, 2024 · 1 comment
Open

zsh: illegal hardware instruction #121

ankurt opened this issue Feb 15, 2024 · 1 comment

Comments

@ankurt
Copy link

ankurt commented Feb 15, 2024

I've built a macOS app that bundles sqlite with this extension. I re-built python and enabled it with loadable extensions and it works fine on my mac, running 13.1.0 Ventura. Unfortunately the same vss0.dylib and vector0.dylib seem are returning these errors for the people I've distributed the bundle too:

Terminal:
> illegal hardware instruction

Apple Crash report:
> Execption Type: EXC_BAD_INSTRUCTION (SIGILL)
> Termination Reason: Namespace SIGNAL, Code 4 Illegal instruction: 4

In our code base, we run:

  create_statements = [ """
      CREATE VIRTUAL TABLE webpage_embeddings using vss0(
          body_embedding(384),
      );
      """]
  print("Creating virtual embedding tables")
  with VssSession.engine.connect() as connection:
      # VssSession handles loading the extension in another module, but it works fine on my computer and a few users:
      # import sqlite_vss
      #  dbapi_con.enable_load_extension(True) 
      #  sqlite_vss.load(dbapi_con)
      #  dbapi_con.enable_load_extension(False)

      for statement in create_statements:
          connection.execute(statement) <--------- Seems to be crashing here based on logs

It seems to not be working for users before 13.1 since I built mac bundle on my computer, but randomly it is working for some users on 13.0. We cannot be sure if its actually a mac app version issue or something else.

We tried building the dylibs for sqlite-vss directly as well by including:
set(ENV{MACOSX_DEPLOYMENT_TARGET} “11”) in the CMake file, and swapping them out in the sqlite-vss library within the .venv but this didn't work either .

To get it working on my computer:
brew install sqlite3
Installed python v3.10.13 using pyenv with PYTHON_CONFIGURE_OPTS="--enable-shared --enable-loadable-sqlite-extensions"
poetry install sqlite-vss

Do you have any suggestions?

@romiras
Copy link

romiras commented Apr 25, 2024

There is a note in documentation about support of AVX2 instructions

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

2 participants