BTrees
BTrees copied to clipboard
Possible threading bug in pure-Python iteration
This occasionally shows up in the ZODB tests of multiple threads under PyPy:
Error in test check7ZODBThreads (ZODB.tests.testMVCCMappingStorage.MVCCMappingStorageTests)
Traceback (most recent call last):
File "/opt/python/pypy2.7-7.1.1/lib-python/2.7/unittest/case.py", line 329, in run
testMethod()
File "/home/travis/build/zopefoundation/ZODB/src/ZODB/tests/MTStorage.py", line 234, in check7ZODBThreads
self._checkNThreads(7, ZODBClientThread, db, self)
File "/home/travis/build/zopefoundation/ZODB/src/ZODB/tests/MTStorage.py", line 222, in _checkNThreads
t.join(60)
File "/home/travis/build/zopefoundation/ZODB/src/ZODB/tests/MTStorage.py", line 45, in join
self._exc_info[0], self._exc_info[1], self._exc_info[2])
File "/home/travis/build/zopefoundation/ZODB/src/ZODB/tests/MTStorage.py", line 37, in run
self.runtest()
File "/home/travis/build/zopefoundation/ZODB/src/ZODB/tests/MTStorage.py", line 68, in runtest
self.commit(d, i)
File "/home/travis/build/zopefoundation/ZODB/src/ZODB/tests/MTStorage.py", line 75, in commit
transaction.commit()
File "/home/travis/build/zopefoundation/ZODB/eggs/transaction-2.4.0-py2.7.egg/transaction/_manager.py", line 252, in commit
return self.manager.commit()
File "/home/travis/build/zopefoundation/ZODB/eggs/transaction-2.4.0-py2.7.egg/transaction/_manager.py", line 131, in commit
return self.get().commit()
File "/home/travis/build/zopefoundation/ZODB/eggs/transaction-2.4.0-py2.7.egg/transaction/_transaction.py", line 316, in commit
self._synchronizers.map(lambda s: s.afterCompletion(self))
File "/home/travis/build/zopefoundation/ZODB/eggs/transaction-2.4.0-py2.7.egg/transaction/weakset.py", line 61, in map
f(elt)
File "/home/travis/build/zopefoundation/ZODB/eggs/transaction-2.4.0-py2.7.egg/transaction/_transaction.py", line 316, in <lambda>
self._synchronizers.map(lambda s: s.afterCompletion(self))
File "/home/travis/build/zopefoundation/ZODB/src/ZODB/Connection.py", line 757, in afterCompletion
self.newTransaction(transaction, False)
File "/home/travis/build/zopefoundation/ZODB/src/ZODB/Connection.py", line 737, in newTransaction
invalidated = self._storage.poll_invalidations()
File "/home/travis/build/zopefoundation/ZODB/src/ZODB/tests/MVCCMappingStorage.py", line 99, in poll_invalidations
excludemin=True, excludemax=False):
File "/home/travis/build/zopefoundation/ZODB/eggs/BTrees-4.5.1-py2.7-linux-x86_64.egg/BTrees/_base.py", line 1218, in __iter__
for k in getattr(bucket, itertype)(*iterargs):
File "/home/travis/build/zopefoundation/ZODB/eggs/BTrees-4.5.1-py2.7-linux-x86_64.egg/BTrees/_base.py", line 397, in <genexpr>
for i in xrange(*self._range(*args, **kw)))
IndexError: list index out of range