[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread Amirouche Boubekki
Amirouche Boubekki added the comment: The problem is prolly in lsm-db. ref: https://github.com/coleifer/python-lsm-db/issues/20 Sorry for the noise. -- resolution: -> third party status: open -> closed ___ Python tracker

[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread Amirouche Boubekki
Amirouche Boubekki added the comment: I tried to reduce the program by replacing gunicorn / uvicorn dependency with threading.Thread and multiprocess.Pool without success. -- ___ Python tracker

[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread Amirouche Boubekki
Amirouche Boubekki added the comment: > ModuleNotFoundError: No module named 'foobar' That is not a segfault. The problem I am reporting is a segfault. It can be reproduced with uvicorn as follow: from lsm import LSM db = LSM('db.sqlite') async def app(scope, receive, send): assert s

[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: I get a crash without any code, just by running gunicorn. It looks like a bug in gunicorn. --- $ python3.8 -m venv env $ env/bin/python -m pip install gunicorn (..) Successfully installed gunicorn-20.0.4 $ ./env/bin/python -X dev -c 'from gunicorn.app.wsgiap

[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread Amirouche Boubekki
Amirouche Boubekki added the comment: You need to run the program with the following: python -X dev -c "from gunicorn.app.wsgiapp import run; run()" --workers=1 foobar:app where foobar.py is the code from the previous message. The crash happen when, the function `app` is executed, hence y

[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: I put the code in a "bla.p" script and I ran it with Python 3.8 on Fedora 33: python3.8 -m venv env env/bin/python -m pip install lsm-db env/bin/python bla.py It doesn't crash. Please provide a script reproducing the issue. Note: lsm-db cannot be installed

[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread Amirouche Boubekki
New submission from Amirouche Boubekki : Here is a simple way to reproduce: from lsm import LSM db = LSM('db.sqlite') def app(environ, start_response): """Simplest possible application object""" for (index, (key, value)) in enumerate(db[b'\x00':b'\xFF']): pass start_re