[Question]: Segmentation fault.
There is a version conflict between SentenceTransformer and infinity-sdk 0.3.0.dev5, resulting in a Segmentation fault.
Would you please provide more information? OS and distribution, SentenceTransformer version, Python version?
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.
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
It might be caused by the lower version of python. Two solutions:
- Upgrade python to python 3.12 or later.
- 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
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.