infiniflow / infinity

The AI-native database built for LLM applications, providing incredibly fast hybrid search of dense vector, sparse vector, tensor (multi-vector), and full-text
https://infiniflow.org
Apache License 2.0
2.72k stars 275 forks source link

[Question]: Segmentation fault. #1687

Open qzd-1 opened 3 months ago

qzd-1 commented 3 months ago

There is a version conflict between SentenceTransformer and infinity-sdk 0.3.0.dev5, resulting in a Segmentation fault.

JinHai-CN commented 3 months ago

Would you please provide more information? OS and distribution, SentenceTransformer version, Python version?

yangzq50 commented 3 months ago

I cannot reproduce this error. I use Python 3.12.4 on Ubuntu 24.04 both

import sentence_transformers
import infinity

and

import infinity
import sentence_transformers

produce no error.

andi20002000 commented 2 months ago

Also got the same error, that is "fixed" when changing the import order. Working:

import infinity
from sentence_transformers import SentenceTransformer

Segmentation Fault:

from sentence_transformers import SentenceTransformer
import infinity

Ubuntu 22.04.3 LTS Python 3.10.14

sentence-transformers 3.0.1 infinity-sdk 0.3.0.dev8

yingfeng commented 2 months ago

It might be caused by the lower version of python. Two solutions:

  1. Upgrade python to python 3.12 or later.
  2. Infinity will separate the embedded version from the standalone server. At that time, there are two python sdks, and if you choose python sdks for standalone server, it will not have such problems because it does not have dependencies on libstdcxx
yangzq50 commented 2 months ago

In my machine (Ubuntu 24.04, Conda Python 3.12.4), Segmentation Fault will happen when the libstdcxx version is 12.4.0

If you use conda, you can try the following command:

conda install -c conda-forge libstdcxx-ng

It will install libstdcxx 14.1.0 in the conda environment, and solve the SIGSEGV error.