On Thu, Mar 06, 2008 at 05:39:19PM -0500, Clint Adams wrote:
> On Thu, Mar 06, 2008 at 09:51:00PM +0000, Steve Langasek wrote:
> > I'm afraid it's still reproducible for me with 4.6.21-6.

> Okay. Do we know what's happening unexpectedly?

The failing test is "HashSimpleThreaded.test02_SimpleLocks"; it starts five
threads that try to write to a database of (python) type "db.DB_HASH" using
no transactions, and occasionally reads back the results.  The reading fails
intermittently, with d.get() returning None instead of the value that was
(supposed to be) written.

All database operations are wrapped with a helper function that does
exponential backoff in the case of DB_LOCK_DEADLOCK.  I've seen some cases
where the threads aborted with a deadlock error instead, which shouldn't be
happening often enough to be worth noting:

Exception in thread reader 2:
Traceback (most recent call last):
  File "/home/devel/canonical/python2.5-2.5.2/Lib/threading.py", line 486, in 
__bootstrap_inner
    self.run()
  File "/home/devel/canonical/python2.5-2.5.2/Lib/threading.py", line 446, in 
run
    self.__target(*self.__args, **self.__kwargs)
  File "Lib/bsddb/test/test_thread.py", line 282, in readerThread
    rec = dbutils.DeadlockWrap(c.next, max_retries=10)
  File "/home/devel/canonical/python2.5-2.5.2/Lib/bsddb/dbutils.py", line 62, 
in DeadlockWrap
    return function(*_args, **_kwargs)
DBLockDeadlockError: (-30995, 'DB_LOCK_DEADLOCK: Locker killed to resolve a 
deadlock')


The same test case using DB_BTREE works reliably, AFAICS.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
[EMAIL PROTECTED]                                     [EMAIL PROTECTED]



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to