[ZODB-Dev] ZODB Deadlock issue python frame traces.

John D. Heintz jheintz@isogen.com
Thu, 10 May 2001 14:36:12 -0500


Hello all,

I have been beating my head against  a lockup problem we're having with our 
CORBA-ZODB application and think I have finally gotten enough information 
together together.

Something that might be useful for everyone working on locking problems is a 
patch against Python 2.1 that I wrote last week to give me access to all the 
Python threads and the Python stack frames that is current on that thread. 
See the python patch tracker for #421709.  This is something that Java has 
had for a long time and I couldn't live without it anymore.


Here is the debugging output that I got detailing the ZODB.DB lock owner, the 
ZODB.FileStorage lock owner and the stack trace for those threads.

>>> dbLockOwner
8201
>>> storLock.id
6151
>>> print_stack(frames[8201])
/home/jheintz/lib/python/ZODB/FileStorage.py:588
/home/jheintz/lib/python/ZODB/Connection.py:520
/home/jheintz/lib/python/ZODB/Connection.py:224
/home/jheintz/lib/python/ZODB/DB.py:501
thorCorbaServer.py:68
>>> print_stack(frames[6151])
/home/jheintz/lib/python/ZODB/bpthread.py:101
/home/jheintz/lib/python/ZODB/DB.py:323
/home/jheintz/lib/python/ZODB/Connection.py:678
/home/jheintz/lib/python/ZODB/BaseStorage.py:228
/home/jheintz/lib/python/ZODB/Connection.py:671
/home/jheintz/lib/python/ZODB/Transaction.py:325
corbaFrameworks/ZODBCorbaFramework.py:262
thorCorbaServer.py:95
corbaFrameworks/ZODBCorbaFramework.py:245
thorCorbaServer.py:68
>>>


Note: The topmost line in each trace is the current line of code being 
executed.

Note2: This code comes from the StandaloneZODB module.

John


-- 
. . . . . . . . . . . . . . . . . . . . . . . .

John D. Heintz | Senior Engineer

1016 La Posada Dr. | Suite 240 | Austin TX 78752
T 512.633.1198 | jheintz@isogen.com

w w w . d a t a c h a n n e l . c o m