RE: determining bind values in deadlock situations

From: Tanel Poder <>
Date: Wed, 4 Mar 2009 02:37:33 +0200
Message-ID: <90159CECC0BC4C289A53B5E5DE36DDA7_at_porgand>

On a related topic,  

It's possible to make Oracle to automatically dump more stuff when ORA-60 or any other error happens, with KSD diagnostic events...  

You can issue something like this at system level for example (after thinking what you want to achieve and what events levels are safe):  

SQL> alter session set events '60 trace name hanganalyze_global level 4, forever; name systemstate level 522, lifetime 1';  

Session altered.

That would give you global hanganalyze every time the error occurs and a local systemstate dump only the first time it happens in a session. System state dumps process stacks thanks to level 512 + 10, that can be useful for diagnosing low-level deadlocks and hangs.  

Btw, knowing the current SQL statement and bind variable values for both sessions might still not give the full picture of the root cause of the deadlock. You know what for the sessions are currently waiting, but you don't necessarily know when, why and by which statement these locks were taken for (and why they are still being held).  

I just published a related blog entry about the diagnostic event setting syntax and some more complex constructs: vents-part-1-syntax-for-ksd-debug-event-handling/    


Tanel Poder

From: [] On Behalf Of Scott
Sent: 03 March 2009 20:43
Subject: Re: determining bind values in deadlock situations

The big question is how do you know you are getting a deadlock?

ORA-60, RAC or not will still get generated. It may take longer in RAC because the detection method does change. However you can still get non-table deadlocks in RAC that are not always dumped in to a tracefile. Then you need to run hanganalyze or a systemstate dump and look for open chains. There serveral bugs in 10g that related to library cache related deadlocks that are not always indicated in a tracefile.


From: "Barun, Vlado" <> To: Jared Still <>
Cc: "" <> Sent: Monday, March 2, 2009 7:21:12 PM
Subject: RE: determining bind values in deadlock situations


Was your test done in a non-RAC environment?

I can find the rowid's the way you mentioned in a non-RAC environment, but not in a RAC environment.  

There is no trace file generated for a deadlock in udump on any of my RAC nodes.  

Are you able to get a deadlock trace file in a RAC environment?  

Thank you for the time you are spending on this.  


Vlado Barun, M.Sc.

Sr. Manager, Database Engineering and Operations

Jewelry Television

Mobile: 865 335 7652


From: Jared Still [] Sent: Monday, March 02, 2009 1:28 PM
To: Barun, Vlado
Subject: Re: determining bind values in deadlock situations      

-- Received on Tue Mar 03 2009 - 18:37:33 CST

Original text of this message