ORA-00060
Oracle Database - Enterprise Edition - Version 9.0.1.0 and later Oracle Database Cloud Schema Service - Version N/A and later Oracle Database Exadata Express Cloud Service - Version N/A and later Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later Oracle Cloud Infrastructure - Database Service - Version N/A and later Information in this document applies to any platform. GoalWhen Oracle detects a deadlock, the current SQL in the session detecting the deadlock is cancelled and 'statement-level rollback' is performed so as to free up resources and not block all activity. The session that detected the deadlock is still 'alive' and the rest of the transaction is still active. If you repeat the last (cancelled) operation in the session, then you will get the deadlock again. When such a deadlock is detected a trace file is produced containing a "Deadlock Graph" (along with other useful information). By examination of numerous Service Requests, we have seen that the most common types of deadlock can be identified by a "signature" deadlock graph that can be used to identify the "type" of deadlock being encountered. This article presents examples of each type so that investigation and resolution can continue along the right track. The aim of this document is to show how to use a "Deadlock Graph" produced by and ORA-00060 error to identify the base problem. NOTE: Some deadlock traces DO NOT contain a "Deadlock Graph" section because the deadlock is such that it would be inappropriate or irrelevant. In these cases then the recommended action is to collect some extra diagnostic information and then create a Service Request with Support as outlined in the following document: Document 1552194.1 ORA-00060 Deadlock Graph Not Matching any Examples: Suggested Next Steps
If you are not already using it, you can use the Troubleshooting Assistant to help you diagnose common ORA-00060 Deadlock issues: Document 60.1 Troubleshooting Assistant: Oracle Database ORA-00060 Errors on Single Instance (Non-RAC) Diagnosing Using Deadlock Graphs in ORA-00060 Trace Files
Deadlock Graph InterpretationA typical deadlock graph might look like this:
In order to differentiate different types, we have taken the Lock Type and the mode held/waited for by the holder and waiter and used this to create a signature for each type. For example, the previous graph shows the following characteristics:
By focusing on these particular characteristics in the graph:
will give us the following type (which is typically an application deadlock): TX X X Note that the most relevant parts of the "Key Signature" for deadlock type recognition are the lock Type and the Mode it is requesting. The main types are highlighted in the table below
The most common types are:
Note: this table is not exhaustive and outlines the most common issues. There are some rare conditions where deadlocks can be achieved that are not mentioned. For cases that do not match those above, the recommended action is to collect some extra diagnostic information and then create a Service Request with Support as outlined in the following document: Document 1552194.1 ORA-00060 Deadlock Graph Not Matching any Examples: Suggested Next Steps
For information on how to identify and diagnose the various different types of ORA-00060 Deadlock Types that you may encounter, please refer to the following document: Document 1559695.1 How to Diagnose Different ORA-00060 Deadlock Types Using Deadlock Graphs in Trace
Note: these are the most common types and causes. There are rare cases where similar symptoms can be found with different causes. If there is any doubt about the identification of a particular non-application deadlock type or if different graphs are seen, then file a Service Request with Oracle Support Note: Often you will see a combination of an application deadlock "Signature" plus one of the others as opposed to a "classic" repeating signature. For example you may see something like:
Deadlock graph: ---------Blocker(s)-------- ---------Waiter(s)--------- Resource Name process session holds waits process session holds waits TM-XXXXXXXX-00000000 11 333 SX 22 44 SX SSX TX-XXXXXXXX-XXXXXXXX 22 44 X 11 333 X Which is a combination of the "Application deadlock" and "Missing Index on Foreign Key (FK) Constraint" deadlock. In these cases, it is advisable to resolve the non-"TX X X" symptoms first since it is more likely that the less common FK/ITL/Bitmap signature is the base cause as opposed to an application deadlock.
Please Note that the trace contains various associated pieces of information that may or may not have any relevance to the issue dependent on the type of deadlock. For example, in the "Rows Waited on:" Section, the "dictionary objn" value can be used to identify related objects in certain cases, but in other cases may point at totally unrelated information. If the information is useable, it is noted in the relevant section, otherwise, do not rely upon it.
There is more about lock modes and locking in the following: Oracle® Database Concepts Ask Questions, Get Help, And Share Your Experiences With This ArticleWould you like to explore this topic further with other Oracle Customers, Oracle Employees, and Industry Experts? SolutionFor information on how to identify and diagnose the various different types of ORA-00060 Deadlock Types that you may encounter, please refer to the following document: Document 1559695.1 How to Diagnose Different ORA-00060 Deadlock Types Using Deadlock Graphs in Trace
Discuss ORA-00060 DeadlocksStill have questions? Consider posting a discussion in the Database Tuning Community. |