[Zope3-Users] Re: Strange ZODB error - Solved: Zalchemy bug

2007-08-09 Thread Christian Zagrodnick
On 2007-08-09 16:27:23 +0200, Hermann Himmelbauer 
<[EMAIL PROTECTED]> said:



Am Donnerstag, 9. August 2007 15:44 schrieb Hermann Himmelbauer:

Hi,
After updating some z3c packages and changing some of my code, I receive 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 engine 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.


--
Christian Zagrodnick

gocept gmbh & co. kg  ·  forsterstrasse 29 · 06112 halle/saale
www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: Strange ZODB error - Solved: Zalchemy bug

2007-08-12 Thread Christian Zagrodnick
On 2007-08-09 17:21:57 +0200, Christian Zagrodnick 
<[EMAIL PROTECTED]> said:


On 2007-08-09 16:27:23 +0200, Hermann Himmelbauer 
<[EMAIL PROTECTED]> 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. 
Hermann, could you check if it works now?





--
Christian Zagrodnick

gocept gmbh & co. kg  ·  forsterstrasse 29 · 06112 halle/saale
www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: Strange ZODB error - Solved: Zalchemy bug

2007-08-13 Thread Jürgen Kartnaller

I don't think the recent change to the utility is correct.

Because the engine property is now volatile it needs to be recreated any 
time the utility is garbage collected.


Maybe that's the reason for these strange things to happen.

Jürgen


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Strange ZODB error - Solved: Zalchemy bug

2007-08-13 Thread Hermann Himmelbauer
Am Montag, 13. August 2007 08:10 schrieb Christian Zagrodnick:
> On 2007-08-09 17:21:57 +0200, Christian Zagrodnick
>
> <[EMAIL PROTECTED]> said:
> > On 2007-08-09 16:27:23 +0200, Hermann Himmelbauer
> >
> > <[EMAIL PROTECTED]> 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 

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: 

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, **k

Re: [Zope3-Users] Re: Strange ZODB error - Solved: Zalchemy bug

2007-08-13 Thread Benji York

Hermann Himmelbauer wrote:
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.


I don't know the details, but doesn't Zalchemy do some "interesting" 
things relating to transactions?

--
Benji York
Senior Software Engineer
Zope Corporation
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users