[Zope3-dev] MinimalMemoryStorage test failure in Zope 3

Marius Gedminas mgedmin@codeworks.lt
Tue, 24 Jun 2003 13:00:55 +0300


--rwEMma7ioTxnRzrJ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

I can reliably reproduce a TransactionError in zodb.storage.tests.testmemory
in testPackWhileWriting in MinimalMemoryTests.  It does not occur every
time, but when I run the tests in a loop, I get that error in less than
30 seconds.

$ python2.2 test.py -Lvv test_memory testPackWhileWriting
[...]
testPackWhileWriting (<class 'zodb.storage.tests.test_memory.FullMemoryTest=
s'>) ... ok
testPackWhileWriting (<class 'zodb.storage.tests.test_memory.MinimalMemoryT=
ests'>) ... CRITICAL:txn:Transaction failed during second phase of two-phas=
e commit
Traceback (most recent call last):
  File "/home/users/mg/Zope3/src/transaction/manager.py", line 55, in _fini=
shCommit
    r.commit(txn)
  File "/home/users/mg/Zope3/src/zodb/connection.py", line 350, in commit
    self._storage.tpcFinish(txn, self._invalidate_modified)
  File "/home/users/mg/Zope3/src/zodb/storage/base.py", line 256, in tpcFin=
ish
    self._finish(self._serial)
  File "/home/users/mg/Zope3/src/zodb/storage/bdbminimal.py", line 318, in =
_finish
    self._withtxn(self._docommit, self._serial)
  File "/home/users/mg/Zope3/src/zodb/storage/base.py", line 761, in _witht=
xn
    ret =3D meth(txn, *args, **kws)
  File "/home/users/mg/Zope3/src/zodb/storage/bdbminimal.py", line 188, in =
_docommit
    srec =3D cs.set(oid)
  File "/home/users/mg/Zope3/src/zodb/storage/memory.py", line 233, in set
    raise db.DBNotFoundError
DBNotFoundError
Exception in thread Thread-337:
Traceback (most recent call last):
  File "/usr/lib/python2.2/threading.py", line 414, in __bootstrap
    self.run()
  File "/home/users/mg/Zope3/src/zodb/storage/tests/packable.py", line 295,=
 in run
    get_transaction().commit()
  File "/home/users/mg/Zope3/src/transaction/txn.py", line 75, in commit
    self._manager.commit(self)
  File "/home/users/mg/Zope3/src/transaction/manager.py", line 49, in commit
    self._finishCommit(txn)
  File "/home/users/mg/Zope3/src/transaction/manager.py", line 183, in _fin=
ishCommit
    super(ThreadedTransactionManager, self)._finishCommit(txn)
  File "/home/users/mg/Zope3/src/transaction/manager.py", line 68, in _fini=
shCommit
    raise TransactionError(msg)
TransactionError: Transaction failed during second phase of two-phase commit

CRITICAL:txn:Transaction failed during second phase of two-phase commit
Traceback (most recent call last):
  File "/home/users/mg/Zope3/src/transaction/manager.py", line 55, in _fini=
shCommit
    r.commit(txn)
  File "/home/users/mg/Zope3/src/zodb/connection.py", line 350, in commit
    self._storage.tpcFinish(txn, self._invalidate_modified)
  File "/home/users/mg/Zope3/src/zodb/storage/base.py", line 256, in tpcFin=
ish
    self._finish(self._serial)
  File "/home/users/mg/Zope3/src/zodb/storage/bdbminimal.py", line 318, in =
_finish
    self._withtxn(self._docommit, self._serial)
  File "/home/users/mg/Zope3/src/zodb/storage/base.py", line 761, in _witht=
xn
    ret =3D meth(txn, *args, **kws)
  File "/home/users/mg/Zope3/src/zodb/storage/bdbminimal.py", line 188, in =
_docommit
    srec =3D cs.set(oid)
  File "/home/users/mg/Zope3/src/zodb/storage/memory.py", line 236, in set
    raise db.DBNotFoundError
DBNotFoundError
Exception in thread Thread-339:
Traceback (most recent call last):
  File "/usr/lib/python2.2/threading.py", line 414, in __bootstrap
    self.run()
  File "/home/users/mg/Zope3/src/zodb/storage/tests/packable.py", line 295,=
 in run
    get_transaction().commit()
  File "/home/users/mg/Zope3/src/transaction/txn.py", line 75, in commit
    self._manager.commit(self)
  File "/home/users/mg/Zope3/src/transaction/manager.py", line 49, in commit
    self._finishCommit(txn)
  File "/home/users/mg/Zope3/src/transaction/manager.py", line 183, in _fin=
ishCommit
    super(ThreadedTransactionManager, self)._finishCommit(txn)
  File "/home/users/mg/Zope3/src/transaction/manager.py", line 68, in _fini=
shCommit
    raise TransactionError(msg)
TransactionError: Transaction failed during second phase of two-phase commit

Exception in thread Thread-338:
Traceback (most recent call last):
  File "/usr/lib/python2.2/threading.py", line 414, in __bootstrap
    self.run()
  File "/home/users/mg/Zope3/src/zodb/storage/tests/packable.py", line 297,=
 in run
    get_transaction().abort()
  File "/home/users/mg/Zope3/src/transaction/txn.py", line 84, in abort
    self._manager.abort(self)
  File "/home/users/mg/Zope3/src/transaction/manager.py", line 189, in abort
    super(ThreadedTransactionManager, self).abort(txn)
  File "/home/users/mg/Zope3/src/transaction/manager.py", line 76, in abort
    r.abort(txn)
  File "/home/users/mg/Zope3/src/zodb/connection.py", line 326, in abort
    self._storage.tpcAbort(txn)
  File "/home/users/mg/Zope3/src/zodb/storage/base.py", line 182, in tpcAbo=
rt
    self._abort()
  File "/home/users/mg/Zope3/src/zodb/storage/bdbminimal.py", line 170, in =
_abort
    self._withtxn(self._doabort, self._serial)
  File "/home/users/mg/Zope3/src/zodb/storage/base.py", line 761, in _witht=
xn
    ret =3D meth(txn, *args, **kws)
  File "/home/users/mg/Zope3/src/zodb/storage/bdbminimal.py", line 157, in =
_doabort
    self._pickles.delete(revid, txn=3Dtxn)
  File "/home/users/mg/Zope3/src/zodb/storage/memory.py", line 264, in dele=
te
    raise db.DBNotFoundError
DBNotFoundError

CRITICAL:txn:Transaction failed during second phase of two-phase commit
Traceback (most recent call last):
  File "/home/users/mg/Zope3/src/transaction/manager.py", line 55, in _fini=
shCommit
    r.commit(txn)
  File "/home/users/mg/Zope3/src/zodb/connection.py", line 350, in commit
    self._storage.tpcFinish(txn, self._invalidate_modified)
  File "/home/users/mg/Zope3/src/zodb/storage/base.py", line 256, in tpcFin=
ish
    self._finish(self._serial)
  File "/home/users/mg/Zope3/src/zodb/storage/bdbminimal.py", line 318, in =
_finish
    self._withtxn(self._docommit, self._serial)
  File "/home/users/mg/Zope3/src/zodb/storage/base.py", line 761, in _witht=
xn
    ret =3D meth(txn, *args, **kws)
  File "/home/users/mg/Zope3/src/zodb/storage/bdbminimal.py", line 188, in =
_docommit
    srec =3D cs.set(oid)
  File "/home/users/mg/Zope3/src/zodb/storage/memory.py", line 236, in set
    raise db.DBNotFoundError
DBNotFoundError
Exception in thread Thread-340:
Traceback (most recent call last):
  File "/usr/lib/python2.2/threading.py", line 414, in __bootstrap
    self.run()
  File "/home/users/mg/Zope3/src/zodb/storage/tests/packable.py", line 295,=
 in run
    get_transaction().commit()
  File "/home/users/mg/Zope3/src/transaction/txn.py", line 75, in commit
    self._manager.commit(self)
  File "/home/users/mg/Zope3/src/transaction/manager.py", line 49, in commit
    self._finishCommit(txn)
  File "/home/users/mg/Zope3/src/transaction/manager.py", line 183, in _fin=
ishCommit
    super(ThreadedTransactionManager, self)._finishCommit(txn)
  File "/home/users/mg/Zope3/src/transaction/manager.py", line 68, in _fini=
shCommit
    raise TransactionError(msg)
TransactionError: Transaction failed during second phase of two-phase commit

ok

----------------------------------------------------------------------
Ran 2 tests in 1.732s

Marius Gedminas
--=20
Codeworks is available for Zope consulting -- http://www.codeworks.lt/

--rwEMma7ioTxnRzrJ
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE++CFXkVdEXeem148RAoGQAJ0TOuTRL9b476Mhf93DaDkBNOsOPwCgkUXw
pOWKsZd8eFlhHFpyAt9O4p4=
=Z+4l
-----END PGP SIGNATURE-----

--rwEMma7ioTxnRzrJ--