This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author hydroflask
Recipients hydroflask
Date 2020-12-21.00:44:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1608511484.37.0.765804145287.issue42698@roundup.psfhosted.org>
In-reply-to
Content
pysqlite_connection_dealloc() calls sqlite3_close{,_v2}(). This can cause a deadlock if sqlite3_close() tries to acquire a lock that another thread  holds, due to a deadlock between the GIL and an internal sqlite3 lock.

This is especially common with sqlite3's "shared cache mode."

Since the GIL should not be released during a tp_dealloc function and python has no control over the behavior of sqlite3_close(), it is incorrect to call sqlite3_close() in pysqlite_connection_dealloc().
History
Date User Action Args
2020-12-21 00:44:44hydroflasksetrecipients: + hydroflask
2020-12-21 00:44:44hydroflasksetmessageid: <1608511484.37.0.765804145287.issue42698@roundup.psfhosted.org>
2020-12-21 00:44:44hydroflasklinkissue42698 messages
2020-12-21 00:44:43hydroflaskcreate