Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle Deadlock when updating different rows

d22cd1ad-83ad-4430-ac02-faed5b0a676cJun 23 2015 — edited Jun 24 2015

I'm running into a deadlock on Oracle that doesn't make sense to me. The two affected sessions are running the same code, updating the same table, but different rows (the where clause for the update contains the unique ID of the row). Here's the relevant portion of the trace file. Based on the rowids, it looks to me like these two sessions are stuck trying to update different rows in the same table. How could there be a deadlock?? The application is structured such that no two transactions modify the same row in this table at the same time (each trnsction hs a distinct unit of work that involves a unique set of rows not shared by other units of work).

*** 2015-06-22 11:25:46.421

DEADLOCK DETECTED ( ORA-00060 )

See Note 60.1 at My Oracle Support for Troubleshooting ORA-60 Errors

[Transaction Deadlock]

The following deadlock is not an ORACLE error. It is a

deadlock due to user error in the design of an application

or from issuing incorrect ad-hoc SQL. The following

information may aid in determining the deadlock:

Deadlock graph:

                                          ---------Blocker(s)--------  ---------Waiter(s)---------

Resource Name                             process session holds waits  process session holds waits

TX-000A0000-0000F86D-00000000-00000000         81     958     X             82    1902           S

TX-000C0007-0001159F-00000000-00000000         82    1902     X             81     958           S

session 958: DID 0001-0051-00000058 session 1902: DID 0001-0052-0000002D

session 1902: DID 0001-0052-0000002D session 958: DID 0001-0051-00000058

Rows waited on:

  Session 958: obj - rowid = 0001FB9B - AAAfubAAXAAI1bAAAA

  (dictionary objn - 129947, file - 23, block - 2315968, slot - 0)

  Session 1902: obj - rowid = 0001FB9B - AAAfubAAXAAI1aAAAA

  (dictionary objn - 129947, file - 23, block - 2315904, slot - 0)

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 22 2015
Added on Jun 23 2015
4 comments
2,273 views