[Zope-DB] Re: bug report (multithreading)

Matthew T. Kromer matt@zope.com
Tue, 29 Jan 2002 11:37:51 -0500


Alexander Craemer wrote:

>Hello Matt,
>
>I tried several times to post a bug report with the issue tracker, but it doesnt work.
>So I mail the bug directly to you.
>
>We discovered some problems while multithreading with some python programs.
>(I will attach an example and a slightly patched version of DCOracle2.py)
>We run the example program under python 1.5.2 (it occurs under Python 2.2 as well)
>If you increase the number of threads in the example to more than 3, 
>you will get some exceptions according to the cursors.
>Either the cursors are empty or they contain exactly the data they should.
>Additionally the cursors are not all closed until the program finishes, which produces 
>at a longer runtime an oracle error (kinda: too many open cursors). 
>This behavior occurs under Linux and WinNT. 
>Our workaround in DCOracle2.py (line 1028-1057) does prevent the exceptions inside
>the fetchall() but then we get the problem with too many open cursors and the problem
>still exists.
>
>Do you have any clue?
>
>Greetings,
>Alex
>
>

Hi,

I've updated and checked into CVS a modified version of dco2.c which 
doesn't use a single error-handle for all cursors (so that errors now 
stick with their cursor) -- this way, you dont get a different threads' 
error message by mistake.

You can get that from http://cvs.zope.org/Products/DCOracle2.  I don't 
have a modified windows binary built (nor do I plan on building one in 
the near future.)