Description
Hello.
Postgres crashes in my MacBook Pro M3.
I tried Python 3.11, a clean install of postgresql@15 and I got a crash with every pgml command that tries to load a model. I also tried with Postgres.app with postgresql 16.
Then I copied changes from requirements.py312.txt to requirements.macos.txt to get a working version with python@3.12.
So I tried Python 3.11 with pyarrow==11.0.0 and pyarrow-hotfix==0.6. I also tried Python 3.12 with pyarrow==16.1.0. Finally I tried with a requirements file that has no version numbers.
I tried with Rust nightly-aarch64-apple-darwin, stable-aarch64-apple-darwin, and 1.79-aarch64-apple-darwin.
All of them work with non-model commands and with the command SELECT * FROM pgml.load_dataset('fka/awesome-chatgpt-prompts', 'default');
. But with every command that tries to load a model, Postgres crashes.
Python crash should not crash Postgres.
Here is a server log of SELECT pgml.embed('Alibaba-NLP/gte-base-en-v1.5', 'passage: hi mom', '{"trust_remote_code": true}'::JSONB);
:
A new version of the following files was downloaded from https://huggingface.co/Alibaba-NLP/new-impl:
- modeling.py
. Make sure to double-check they do not contain any added malicious code. To avoid downloading new versions of the code file, you can pin a revision.
loading weights file model.safetensors from cache at /Users/test/.cache/huggingface/hub/models--Alibaba-NLP--gte-base-en-v1.5/snapshots/a8e4f3e0ee719c75bc30d12b8eae0f8440502718/model.safetensors
2024-09-01 10:26:21.478 GMT [44810] LOG: server process (PID 45076) was terminated by signal 11: Segmentation fault: 11
2024-09-01 10:26:21.478 GMT [44810] DETAIL: Failed process was running: SELECT pgml.embed('Alibaba-NLP/gte-base-en-v1.5', 'passage: hi mom', '{"trust_remote_code": true}'::JSONB);
2024-09-01 10:26:21.478 GMT [44810] LOG: terminating any other active server processes
2024-09-01 10:26:21.481 GMT [44810] LOG: all server processes terminated; reinitializing
2024-09-01 10:26:21.503 GMT [44810] FATAL: Can't attach, lock is not in an empty state: PgLwLockInner
2024-09-01 10:26:21.504 GMT [44810] LOG: database system is shut down