Followup information. Re: [omniORB] Help with lock up. Please help.

John D. Heintz jheintz@isogen.com
Thu, 3 May 2001 12:01:50 -0500


I was just digging into the Python interpreter lock data structures and think 
that I found something that shouldn't happen.

It looks like the Python global lock is locked without an owner to me, but I 
don't really know.  Can someone double check what I've looked at?

GDB output:
(gdb) print ((pthread_lock*)interpreter_lock)->locked
$3 = 1 '\001'
(gdb) print ((pthread_lock*)interpreter_lock)->mut
$4 = {__m_reserved = 0, __m_count = 0, __m_owner = 0x0, __m_kind = 0,
  __m_lock = {__status = 0, __spinlock = 0}}
(gdb) print ((pthread_lock*)interpreter_lock)->lock_released
$5 = {__c_lock = {__status = 0, __spinlock = 0}, __c_waiting = 0xbefffc00}


Since locked == '1' and __m_count == 0 and __m_owner = null I think that 
we're pretty much deadlocked.  Please correct me if I'm wrong.

John

On Wednesday 02 May 2001 17:07, John D. Heintz wrote:
> Hi all,
>
> I am getting a lock up problem on Linux with omniORB 3.0.3 and omniORBpy
> 1.3 and Python 2.1 all compiled with debugging on.
>
> I am a far cry from a Linux c hacker, but it seems to me that it might be a
> deadlock on the Python global interpreter lock for most of the threads.
> This is further reinforced by the fact that when I run the server in
> interactive python mode my prompt hangs up on me as well.
>
> I've attached a gdb output script that does info threads and bt for each of
> them, plus a python file that describes how we are using omniORBpy on the
> server side.
>
> Just a quick description of our server architecture:
> One "Server" that provides getSession() and returns a new "Session".
> Each "Session" has a POA, ServantLocator, ZODB database connection, and
> local cache of persistent objects.
>
> The test that caused this locked state was basically just a few threads
> getting "Sessions" and doing some lookups on them before logging out of the
> "Session".
>
> Any help would be appreciated, and I can recreate the lock up pretty easily
> so if anyone has magic gdb commands for me to type I'll be happy to make it
> happen.
>
> Thanks for any help,
> John

----------------------------------------
Content-Type: text/plain; charset="iso-8859-1"; name="trace.out"
Content-Transfer-Encoding: base64
Content-Description: GDB info threads and bt
----------------------------------------

----------------------------------------
Content-Type: text/x-java; charset="iso-8859-1"; name="ZODBCorbaFramework.py"
Content-Transfer-Encoding: base64
Content-Description: Python CORBA Server framework
----------------------------------------