[issue42698] Deadlock in pysqlite_connection_dealloc()

hydroflask report at bugs.python.org
Fri Jul 30 14:03:10 EDT 2021


hydroflask <hydroflask at yqxmail.com> added the comment:

Unfortunately I am currently unable to write a repro for this bug but I am 100% certain it exists from analyzing the code. In our application (which is a large multithreaded application) after I made the changes consistent with this report the deadlock vanished completely. When the deadlock occurred, the thread stacks were consistent with the information in this report.

To get the deadlock to trigger, SQLite itself must take a lock on sqlite3_close() but I don't know very much about SQLite's internals to consistently provoke that behavior. I've attached my attempt at a repro which is similar enough to the pattern of our application but it was not working.

----------
Added file: https://bugs.python.org/file50192/test.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42698>
_______________________________________


More information about the Python-bugs-list mailing list