[Python-Dev] bsddb test case deadlocks fixed

Gregory P. Smith greg at electricrain.com
Sun Nov 2 04:25:17 EST 2003


I just committed the fixes necessary for test_bsddb.py to complete
without deadlocking (yay!).  It should remove all possibility of a bsddb
deadlock in single threaded applications as well as allow for multiple
iterator/generator objects to operate properly on a database at once
and make the _DBWithCursor __iter__ implementation more efficient by
not asking for the values from the db since it only returns the keys.

I believe there are still race conditions that could lead to a deadlock in
the bsddb interface due to a current lack of locking around its internal
open|closed DBCursor management.  I'm opening a SF bug to track that.
A test case to prove the theory is needed.

Let me know if you see any problems.

I'm sorry about allowing the deadlock to be committed in the first place.
I routinely run the large bsddb test suite when doing bsddb development
but test_bsddb.py contained additional coverage for the recent iterator
interface that is not present in the large test suite; now I run both.

- Greg




More information about the Python-Dev mailing list