infinity icon indicating copy to clipboard operation
infinity copied to clipboard

[Question]: Segmentation fault.

Open qzd-1 opened this issue 1 year ago • 5 comments

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

qzd-1 avatar Aug 20 '24 08:08 qzd-1

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

JinHai-CN avatar Aug 20 '24 08:08 JinHai-CN

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.

yangzq50 avatar Aug 20 '24 09:08 yangzq50

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

andi20002000 avatar Sep 03 '24 13:09 andi20002000

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

yingfeng avatar Sep 05 '24 10:09 yingfeng

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.

yangzq50 avatar Sep 05 '24 10:09 yangzq50