ChatGPT icon indicating copy to clipboard operation
ChatGPT copied to clipboard

MacOS: got 139 (interrupted by signal 11: SIGSEGV)

Open TccccD opened this issue 2 years ago • 25 comments

When I use from revChatGPT.revChatGPT import Chatbot there is an error: 139 (interrupted by signal 11: SIGSEGV)

@acheong08

TccccD avatar Dec 05 '22 13:12 TccccD

@TccccD It's an issue with your Python interpreter. Update to Python 3.10.6 for the most reliability

acheong08 avatar Dec 05 '22 13:12 acheong08

Also update the package pip3 install revChatGPT --upgrade

acheong08 avatar Dec 05 '22 13:12 acheong08

I have python 3.10.8, having the same issue : Segmentation fault: 11 OS : Macos catalina

lafroujianas avatar Dec 05 '22 14:12 lafroujianas

Data streaming might not work with MacOS.

I just updated the code again. pip3 install revChatGPT --upgrade

It is probably an issue with data streams. Streaming is now optional with --stream

Running normally should work now

acheong08 avatar Dec 05 '22 14:12 acheong08

@TccccD @lafroujianas Could you test this?

acheong08 avatar Dec 05 '22 14:12 acheong08

Still getting "Segmentation fault: 11" on macos catalina

lafroujianas avatar Dec 05 '22 16:12 lafroujianas

What python version?

acheong08 avatar Dec 05 '22 16:12 acheong08

I don't use MacOS so I can't really replicate. You can try using gbd to debug

acheong08 avatar Dec 05 '22 16:12 acheong08

Python 3.10.8

lafroujianas avatar Dec 05 '22 16:12 lafroujianas

I have no idea why this is happening. Might need feedback from more MacOS users. I have not used any advanced Python, only basic requests, json, and bs4. Can you show the full output? Does it crash immediately or is there a certain point at which it crashes?

acheong08 avatar Dec 05 '22 16:12 acheong08

Screenshot 2022-12-05 at 17 37 47

lafroujianas avatar Dec 05 '22 16:12 lafroujianas

I think the issue is from : in revChatGPT.py import tls_client

If I remove the line, the code is executed (with error), with with node Segmentation fault

lafroujianas avatar Dec 05 '22 17:12 lafroujianas

I'm on MacOS, and I have Python 3.6 to 3.11, Code works ok. This is not an issue with tls_client, but a misconfiguration in your system which makes tls_client fail.

rawandahmad698 avatar Dec 05 '22 18:12 rawandahmad698

https://stackoverflow.com/questions/49414841/process-finished-with-exit-code-139-interrupted-by-signal-11-sigsegv

acheong08 avatar Dec 06 '22 00:12 acheong08

I think I'm having a similar problem. I'm using revChatGPT inside a docker container in a Raspberry Pi (arm64) and I get the following from the docker logs Traceback (most recent call last): File "/app/app.py", line 6, in <module> from revChatGPT.revChatGPT import Chatbot File "/usr/local/lib/python3.9/site-packages/revChatGPT/revChatGPT.py", line 8, in <module> import tls_client File "/usr/local/lib/python3.9/site-packages/tls_client/__init__.py", line 15, in <module> from .sessions import Session File "/usr/local/lib/python3.9/site-packages/tls_client/sessions.py", line 1, in <module> from .cffi import request File "/usr/local/lib/python3.9/site-packages/tls_client/cffi.py", line 15, in <module> library = ctypes.cdll.LoadLibrary(f'{root_dir}/dependencies/tls-client{file_ext}') File "/usr/local/lib/python3.9/ctypes/__init__.py", line 452, in LoadLibrary return self._dlltype(name) File "/usr/local/lib/python3.9/ctypes/__init__.py", line 374, in __init__ self._handle = _dlopen(self._name, mode) OSError: /usr/local/lib/python3.9/site-packages/tls_client/dependencies/tls-client-amd64.so: cannot open shared object file: No such file or directory

Somehow I think it's trying to get amd64 instead of arm64. Do you know how to correct this?

pedrorito avatar Dec 06 '22 15:12 pedrorito

Arm and 32bit are not supported yet. https://github.com/FlorianREGAZ/Python-Tls-Client/issues

You must use session tokens if you're on one of these platforms

acheong08 avatar Dec 06 '22 15:12 acheong08

@rawandahmad698 Any ideas on alternatives to TLS-Client?

acheong08 avatar Dec 06 '22 15:12 acheong08

I have python 3.10.8, having the same issue : Segmentation fault: 11 OS : Macos catalina

I was experiencing the same issue; updating from Catalina to Big Sur resolved it for me.

Adrianczuk avatar Dec 07 '22 03:12 Adrianczuk

Upgrading from Mac OS Catalina solved it for me.

emileindik avatar Dec 07 '22 03:12 emileindik

Upgrading from Mac OS Catalina solved it for me. +1

pen-ho avatar Dec 09 '22 07:12 pen-ho

same error on my ubuntu 20; ...

xs-fj avatar Dec 09 '22 09:12 xs-fj

@xs-fj You might be using 32bit Python

acheong08 avatar Dec 09 '22 11:12 acheong08

/site-packages/tls_client/dependencies/tls-client-amd64.so: cannot open shared object file: No such file or directory

Same errors; run in 64bit ubuntu 20 ...

longnight avatar Dec 11 '22 19:12 longnight

tls-client uses closed soured libs from anywhere (tls-client-x86.dylib). As we don't know, where this lib comes from and what is does, this is a real security issue. Remember: you provide this source with username and password or even with access tokens. (Maybe the source sends it to somewhere ... ;-)

papachef08 avatar Dec 12 '22 07:12 papachef08

tls-client uses closed soured libs from anywhere (tls-client-x86.dylib). As we don't know, where this lib comes from and what is does, this is a real security issue. Remember: you provide this source with username and password or even with access tokens. (Maybe the source sends it to somewhere ... ;-)

We do know where it comes from. It is ripped directly from https://github.com/bogdanfinn/tls-client/tree/master/cffi_dist/dist

acheong08 avatar Dec 12 '22 08:12 acheong08