- Notifications
You must be signed in to change notification settings - Fork328
Open
Description
Tried both with my laptop (Apple silicon) homebrew postgresql-15 (with latest postgresml, master tip) and with the ghcr.io/postgresml/postgresml:2.8.2 image (also arm64).
Giving the docker steps:
docker run \ -it \ -v postgresml_data:/var/lib/postgresql \ -p 5433:5432 \ -p 8000:8000 \ ghcr.io/postgresml/postgresml:2.8.2 \ shapt updateapt install postgresql-plpython3-15sudo -u postgresml psql -d postgresmlcreate extension plpython3u;CREATE FUNCTION basic() RETURNS text AS 'return "hello"' LANGUAGE plpython3u;
And the Postgres server crashes
server closed the connection unexpectedlyThis probably means the server terminated abnormallybefore or while processing the request.The connection to the server was lost. Attempting reset: Failed.The connection to the server was lost. Attempting reset: Failed.!?>
I did not suspect the interaction at first, so I got deep into plpython; the crash happens inPLy_initialize
, at the moment of callingPyImport_ImportModule("plpy")
. Setting up memory debug says there is an allocation without holding the GIL. Importing any module crashes in the same way, and we never get to the plpy initialization function.
My suspicion is that the interpreter created by pyo3 and the one created by plpython use the same structures.