[issue42891] segfault with gunicorn and a library made with cython bindings
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 <https://bugs.python.org/issue42891> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42891] segfault with gunicorn and a library made with cython bindings
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 <https://bugs.python.org/issue42891> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42891] segfault with gunicorn and a library made with cython bindings
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 scope['type'] == 'http' global db for (index, (key, value)) in enumerate(db[b'\x00':b'\xFF']): pass await send({ 'type': 'http.response.start', 'status': 200, 'headers': [ [b'content-type', b'text/plain'], ], }) await send({ 'type': 'http.response.body', 'body': b'Hello, world!', }) db.close() Run the above program with: python -X dev -m uvicorn bobo:app Then in another console: curl http://localhost:8000/ Here is the output: $ python -X dev -m uvicorn bobo:app INFO: Started server process [3580316] INFO: Waiting for application startup. INFO: ASGI 'lifespan' protocol appears unsupported. INFO: Application startup complete. INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) Fatal Python error: Segmentation fault Current thread 0x7fbb6e49b740 (most recent call first): File "./bobo.py", line 10 in app File "/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45 in __call__ File "/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 394 in run_asgi File "/usr/lib/python3.8/asyncio/events.py", line 81 in _run File "/usr/lib/python3.8/asyncio/base_events.py", line 1851 in _run_once File "/usr/lib/python3.8/asyncio/base_events.py", line 570 in run_forever File "/usr/lib/python3.8/asyncio/base_events.py", line 603 in run_until_complete File "/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/uvicorn/server.py", line 48 in run File "/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/uvicorn/main.py", line 386 in run File "/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/uvicorn/main.py", line 362 in main File "/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/click/core.py", line 610 in invoke File "/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/click/core.py", line 1066 in invoke File "/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/click/core.py", line 782 in main File "/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/click/core.py", line 829 in __call__ File "/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/uvicorn/__main__.py", line 4 in File "/usr/lib/python3.8/runpy.py", line 87 in _run_code File "/usr/lib/python3.8/runpy.py", line 194 in _run_module_as_main Segmentation fault (core dumped) -- resolution: third party -> status: closed -> open ___ Python tracker <https://bugs.python.org/issue42891> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42891] segfault with gunicorn and a library made with cython bindings
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 you need to call in another console: curl http://localhost:8000 note: lsm package can be installed with pip install lsm-db note2: lsm db can not be installed with py3.9 -- ___ Python tracker <https://bugs.python.org/issue42891> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42891] segfault with gunicorn and a library made with cython bindings
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_response(b'200', {}) return b'' db.close() In my real program, if I add 'global db' in the function `app`, it does not segfault. program: https://git.sr.ht/~amirouche/segfault trace: https://wyz.fr/0I-MO -- messages: 384836 nosy: amirouche priority: normal severity: normal status: open title: segfault with gunicorn and a library made with cython bindings type: crash versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue42891> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42436] Google use wrong "hightlight" argument
New submission from Amirouche Boubekki : At the moment when I search for the following: https://www.google.com/search?q=ast+transformer+python+3.10 I have as second result this url: https://docs.python.org/dev/library/ast.html?highlight=s I do not understand the purpose in the query string of `highlight=s` -- assignee: docs@python components: Documentation messages: 381613 nosy: amirouche, docs@python priority: normal severity: normal status: open title: Google use wrong "hightlight" argument versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue42436> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34885] asyncio documention has lost its paragraph about cancellation
Change by Amirouche Boubekki : -- title: asycnio documention has lost its paragraph about cancellation -> asyncio documention has lost its paragraph about cancellation ___ Python tracker <https://bugs.python.org/issue34885> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34885] asycnio documention has lost its paragraph about cancellation
New submission from Amirouche Boubekki : The paragraph was still there in 3.6 https://docs.python.org/3.6/library/asyncio-dev.html#cancellation -- assignee: docs@python components: Documentation, asyncio messages: 326966 nosy: abki, asvetlov, docs@python, yselivanov priority: normal severity: normal status: open title: asycnio documention has lost its paragraph about cancellation type: enhancement versions: Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue34885> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12657] Cannot override JSON encoding of basic type subclasses
Changes by Amirouche Boubekki amirouche.boube...@gmail.com: -- nosy: +abki ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12657 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4945] json checks True/False by identity, not boolean value
Changes by Amirouche Boubekki amirouche.boube...@gmail.com: -- nosy: +abki ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4945 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com