[issue42698] Deadlock in pysqlite_connection_dealloc()
hydroflask
report at bugs.python.org
Mon Aug 2 16:29:41 EDT 2021
hydroflask <hydroflask at yqxmail.com> added the comment:
>> The major problem is that I don't exactly know how to provoke SQLite to
>> acquire an internal lock.
> IIRC, you can provoke the internal SQLite lock simply by using transaction control: BEGIN (lock) => COMMIT / ROLLBACK (unlock).
Ah okay, so the sequence would have to be this:
thread1: pysqlite.some_operation()
thread1: release gil
thread1: sqlite3_some_procedure()
thread1: acquire sqlite lock
<switch threads>
thread2: acquire gil
thread2: pysqlite.close()
thread2: sqlite3_close()
thread2: acquire sqlite lock
> I'll see if I can come up with a compact repro.
It should be possible, good luck!
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42698>
_______________________________________
More information about the Python-bugs-list
mailing list