[Zope3-Users] Re: Strange ZODB error - Solved: Zalchemy bug
Hermann Himmelbauer
dusty at qwer.tk
Mon Aug 13 05:02:49 EDT 2007
Am Montag, 13. August 2007 08:10 schrieb Christian Zagrodnick:
> On 2007-08-09 17:21:57 +0200, Christian Zagrodnick
>
> <cz at gocept.com> said:
> > On 2007-08-09 16:27:23 +0200, Hermann Himmelbauer
> >
> > <dusty at qwer.tk> said:
> >> Am Donnerstag, 9. August 2007 15:44 schrieb Hermann Himmelbauer:
> >>> Hi,
> >>> After updating some z3c packages and changing some of my code, I recei
> >
> > ve a
> >
> >>> very strange traceback from Zope3:
> >>
> >> Ah, after fiddling around I found out that the "svn update" of the
> >> zalchemy package resulted in this error. If somewhere in my code
> >> zalchemy is used, the TypeError emerges. It seems that recently there
> >> was a change to the zalchemy package (svn log):
> >>
> >> -----------------------------------------------------------------------
> >
> > -
> >
> >> r78682 | zagy | 2007-08-08 10:53:01 +0200 (Mi, 08 Aug 2007) | 1 line
> >>
> >> using the threadlocal strategy of sqlalchemy instead of creating one en
> >
> > gine per
> >
> >> thread. This allows connection pooling for instance.
> >> -----------------------------------------------------------------------
> >
> > -
> >
> >> I reverted zalchemy to an older version an all is well again.
> >
> > Interesting. I wonder why this happens. I'll try to reproduce.
>
> So it happend when the ZAlchemy engine was used as a local utility.
Yes, that's right.
> Hermann, could you check if it works now?
I updated zalchemy it to the current SVN-Version, but it does still not work.
However, the error message is different and a lot more verbose:
------------------
2007-08-13T11:01:03 INFO sqlalchemy.engine.threadlocal.TLEngine.0x..d0
{'fp_name1': 'A%'}
2007-08-13 11:01:03,777 INFO sqlalchemy.engine.threadlocal.TLEngine.0x..d0
COMMIT
------
2007-08-13T11:01:03 INFO sqlalchemy.engine.threadlocal.TLEngine.0x..d0 COMMIT
------
2007-08-13T11:01:03 CRITICAL txn.1082132800 A storage error occurred during
the second phase of the two-phase commit. Resources may be in an
inconsistent state.
------
2007-08-13T11:01:03 ERROR txn.1082132800 Error in tpc_abort() on manager
<z3c.zalchemy.datamanager.AlchemyDataManager object at 0x42b30d0>
Traceback (most recent call last):
File "/local/home/dusty/Zope-3.4.0b1/lib/python/transaction/_transaction.py",
line 462, in _cleanup
rm.tpc_abort(self)
File "/home/dusty/prog/zope3-inst/lib/python/z3c/zalchemy/datamanager.py",
line 222, in tpc_abort
self._cleanup()
File "/home/dusty/prog/zope3-inst/lib/python/z3c/zalchemy/datamanager.py",
line 236, in _cleanup
util._resetEngine()
File "/home/dusty/prog/zope3-inst/lib/python/z3c/zalchemy/datamanager.py",
line 64, in _resetEngine
self.engine = None
File "/local/home/dusty/Zope-3.4.0b1/lib/python/ZODB/Connection.py", line
927, in register
self._register(obj)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/ZODB/Connection.py", line
937, in _register
self.transaction_manager.get().join(self)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/transaction/_transaction.py",
line 222, in join
raise ValueError("expected txn status %r or %r, but it's %r" % (
ValueError: expected txn status 'Active' or 'Doomed', but it's 'Committing'
------
2007-08-13T11:01:03 ERROR txn.1082132800 Failed to abort resource manager:
<z3c.zalchemy.datamanager.AlchemyDataManager object at 0x42b30d0>
Traceback (most recent call last):
File "/local/home/dusty/Zope-3.4.0b1/lib/python/transaction/_transaction.py",
line 476, in abort
rm.abort(self)
File "/home/dusty/prog/zope3-inst/lib/python/z3c/zalchemy/datamanager.py",
line 205, in abort
self._cleanup()
File "/home/dusty/prog/zope3-inst/lib/python/z3c/zalchemy/datamanager.py",
line 236, in _cleanup
util._resetEngine()
File "/home/dusty/prog/zope3-inst/lib/python/z3c/zalchemy/datamanager.py",
line 64, in _resetEngine
self.engine = None
File "/local/home/dusty/Zope-3.4.0b1/lib/python/ZODB/Connection.py", line
927, in register
self._register(obj)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/ZODB/Connection.py", line
937, in _register
self.transaction_manager.get().join(self)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/transaction/_transaction.py",
line 216, in join
self._prior_operation_failed() # doesn't return
File "/local/home/dusty/Zope-3.4.0b1/lib/python/transaction/_transaction.py",
line 210, in _prior_operation_failed
raise TransactionFailedError("An operation previously failed, "
TransactionFailedError: An operation previously failed, with traceback:
File "/local/home/dusty/python/Python-2.4.4/lib/python2.4/threading.py",
line 442, in __bootstrap
self.run()
File "/local/home/dusty/python/Python-2.4.4/lib/python2.4/threading.py",
line 422, in run
self.__target(*self.__args, **self.__kwargs)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/twisted/python/threadpool.py",
line 148, in _worker
context.call(ctx, function, *args, **kwargs)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/twisted/python/context.py",
line 59, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/twisted/python/context.py",
line 37, in callWithContext
return func(*args,**kw)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/twisted/web2/wsgi.py", line
198, in run
result = self.application(self.environment, self.startWSGIResponse)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/zope/app/wsgi/__init__.py",
line 54, in __call__
request = publish(request, handle_errors=handle_errors)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/zope/publisher/publish.py",
line 138, in publish
publication.afterCall(request, obj)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/zope/app/publication/browser.py",
line 78, in afterCall
super(BrowserPublication, self).afterCall(request, ob)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/zope/app/publication/zopepublication.py",
line 175, in afterCall
txn.commit()
File "/local/home/dusty/Zope-3.4.0b1/lib/python/transaction/_transaction.py",
line 328, in commit
t, v, tb = self._saveAndGetCommitishError()
File "/local/home/dusty/Zope-3.4.0b1/lib/python/transaction/_transaction.py",
line 325, in commit
self._commitResources()
File "/local/home/dusty/Zope-3.4.0b1/lib/python/transaction/_transaction.py",
line 432, in _commitResources
rm.tpc_finish(self)
File "/home/dusty/prog/zope3-inst/lib/python/z3c/zalchemy/datamanager.py",
line 218, in tpc_finish
self._cleanup()
File "/home/dusty/prog/zope3-inst/lib/python/z3c/zalchemy/datamanager.py",
line 236, in _cleanup
util._resetEngine()
File "/home/dusty/prog/zope3-inst/lib/python/z3c/zalchemy/datamanager.py",
line 64, in _resetEngine
self.engine = None
File "/local/home/dusty/Zope-3.4.0b1/lib/python/ZODB/Connection.py", line
927, in register
self._register(obj)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/ZODB/Connection.py", line
937, in _register
self.transaction_manager.get().join(self)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/transaction/_transaction.py",
line 222, in join
raise ValueError("expected txn status %r or %r, but it's %r" % (
ValueError: expected txn status 'Active' or 'Doomed', but it's 'Committing'
Traceback (most recent call last):
File "/local/home/dusty/python/Python-2.4.4/lib/python2.4/threading.py",
line 422, in run
self.__target(*self.__args, **self.__kwargs)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/twisted/python/threadpool.py",
line 148, in _worker
context.call(ctx, function, *args, **kwargs)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/twisted/python/context.py",
line 59, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/twisted/python/context.py",
line 37, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "/local/home/dusty/Zope-3.4.0b1/lib/python/twisted/web2/wsgi.py", line
198, in run
result = self.application(self.environment, self.startWSGIResponse)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/zope/app/wsgi/__init__.py",
line 54, in __call__
request = publish(request, handle_errors=handle_errors)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/zope/publisher/publish.py",
line 141, in publish
publication.handleException(
File "/local/home/dusty/Zope-3.4.0b1/lib/python/zope/app/publication/zopepublication.py",
line 251, in handleException
transaction.abort()
File "/local/home/dusty/Zope-3.4.0b1/lib/python/transaction/_manager.py",
line 96, in abort
return self.get().abort()
File "/local/home/dusty/Zope-3.4.0b1/lib/python/transaction/_transaction.py",
line 476, in abort
rm.abort(self)
File "/home/dusty/prog/zope3-inst/lib/python/z3c/zalchemy/datamanager.py",
line 205, in abort
self._cleanup()
File "/home/dusty/prog/zope3-inst/lib/python/z3c/zalchemy/datamanager.py",
line 236, in _cleanup
util._resetEngine()
File "/home/dusty/prog/zope3-inst/lib/python/z3c/zalchemy/datamanager.py",
line 64, in _resetEngine
self.engine = None
File "/local/home/dusty/Zope-3.4.0b1/lib/python/ZODB/Connection.py", line
927, in register
self._register(obj)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/ZODB/Connection.py", line
937, in _register
self.transaction_manager.get().join(self)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/transaction/_transaction.py",
line 216, in join
self._prior_operation_failed() # doesn't return
File "/local/home/dusty/Zope-3.4.0b1/lib/python/transaction/_transaction.py",
line 210, in _prior_operation_failed
raise TransactionFailedError("An operation previously failed, "
ZODB.POSException.TransactionFailedError: An operation previously failed, with
traceback:
File "/local/home/dusty/python/Python-2.4.4/lib/python2.4/threading.py",
line 442, in __bootstrap
self.run()
File "/local/home/dusty/python/Python-2.4.4/lib/python2.4/threading.py",
line 422, in run
self.__target(*self.__args, **self.__kwargs)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/twisted/python/threadpool.py",
line 148, in _worker
context.call(ctx, function, *args, **kwargs)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/twisted/python/context.py",
line 59, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/twisted/python/context.py",
line 37, in callWithContext
return func(*args,**kw)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/twisted/web2/wsgi.py", line
198, in run
result = self.application(self.environment, self.startWSGIResponse)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/zope/app/wsgi/__init__.py",
line 54, in __call__
request = publish(request, handle_errors=handle_errors)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/zope/publisher/publish.py",
line 138, in publish
publication.afterCall(request, obj)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/zope/app/publication/browser.py",
line 78, in afterCall
super(BrowserPublication, self).afterCall(request, ob)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/zope/app/publication/zopepublication.py",
line 175, in afterCall
txn.commit()
File "/local/home/dusty/Zope-3.4.0b1/lib/python/transaction/_transaction.py",
line 328, in commit
t, v, tb = self._saveAndGetCommitishError()
File "/local/home/dusty/Zope-3.4.0b1/lib/python/transaction/_transaction.py",
line 325, in commit
self._commitResources()
File "/local/home/dusty/Zope-3.4.0b1/lib/python/transaction/_transaction.py",
line 432, in _commitResources
rm.tpc_finish(self)
File "/home/dusty/prog/zope3-inst/lib/python/z3c/zalchemy/datamanager.py",
line 218, in tpc_finish
self._cleanup()
File "/home/dusty/prog/zope3-inst/lib/python/z3c/zalchemy/datamanager.py",
line 236, in _cleanup
util._resetEngine()
File "/home/dusty/prog/zope3-inst/lib/python/z3c/zalchemy/datamanager.py",
line 64, in _resetEngine
self.engine = None
File "/local/home/dusty/Zope-3.4.0b1/lib/python/ZODB/Connection.py", line
927, in register
self._register(obj)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/ZODB/Connection.py", line
937, in _register
self.transaction_manager.get().join(self)
File "/local/home/dusty/Zope-3.4.0b1/lib/python/transaction/_transaction.py",
line 222, in join
raise ValueError("expected txn status %r or %r, but it's %r" % (
ValueError: expected txn status 'Active' or 'Doomed', but it's 'Committing'
-------------------
Best Regards,
Hermann
--
x1 at aon.at
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7
More information about the Zope3-users
mailing list