Message415212
_destructor in connection.c in Python 3.10+ now calls `PyGILState_Ensure()`, this is a problem because if the destructor is being called while the thread is being torn down it will cause an unbalanced/erroneous call to "PyEval_RestoreThread" in PyGILState_Ensure which will eventually trigger a Fatal Python Error. A perfect repro has been attached, should be run on Linux.
My recommended fix is to call sqlite3_close() within Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS, and manually Py_DECREF all connection-related functions afterward. |
|
Date |
User |
Action |
Args |
2022-03-15 00:18:22 | hydroflask | set | recipients:
+ hydroflask, erlendaasland |
2022-03-15 00:18:22 | hydroflask | set | messageid: <1647303502.31.0.146964727203.issue47019@roundup.psfhosted.org> |
2022-03-15 00:18:22 | hydroflask | link | issue47019 messages |
2022-03-15 00:18:22 | hydroflask | create | |
|