RE: Deadlock inserting into same rowid (different block)

From: Patterson, Joel <jpatterson_at_entint.com>
Date: Wed, 20 Mar 2013 11:27:48 -0400
Message-ID: <C1117B1AA0340645894671E09A7891F714F8833845_at_EIHQEXVM2.ei.local>



Thanks Mohamed, I believe Jonathan only kept the relevant portions of my original where I mentioned that the FK is indexed. "Object rowed 199909 is a FK on child table. The foreign_key is indexed (one column to one column PK in parent)..."

Joel Patterson
Database Administrator
904 928-2790

From: mohamed houri [mailto:mohamed.houri_at_gmail.com] Sent: Wednesday, March 20, 2013 11:21 AM To: jonathan_at_jlcomp.demon.co.uk
Cc: Patterson, Joel; oracle-l_at_freelists.org Subject: Re: Deadlock inserting into same rowid (different block)

In addition to what Jonathan has already clarified, I want to add that for a deadlock to be eventually due to a missing index on FK the deadlock graph should at least show one TM enqueue(DML enqueue). In your case both enqueues are of Transaction(TX) enqueue type. So your deadlock has a big chance to not being related to an unindexed FK

Best regards
Mohamed Houri
www.hourim.wordpress.com<http://www.hourim.wordpress.com>

2013/3/20 Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk<mailto:jonathan_at_jlcomp.demon.co.uk>>

The deadlock pattern is indicative of collisions on a unique constraint. They're both trying to insert primary / unique key values already inserted but not yet committed by the other session.

Given that the slot numbers are both zero, it's likely that they're being reported incorrectly - Oracle doesn't clean out the wait information for every single wait, so these could be the file and block (with zero row) for early buffer busy waits, or read by other session or some such.

Regards

Jonathan Lewis
http://jonathanlewis.wordpress.com/all-postings

Author: Oracle Core (Apress 2011)
http://www.apress.com/9781430239543

--
Joel Patterson
Sr. Database Administrator | Enterprise Integration
Phone: 904-928-2790 | Fax: 904-733-4916
www.entint.com<http://www.entint.com/>

[http://i1202.photobucket.com/albums/bb367/Entint/signaturev61.jpg]<http://www.entint.com/>

[http://i1202.photobucket.com/albums/bb367/Entint/th_FaceBook1.jpg]<http://www.facebook.com/pages/Enterprise-Integration/212351215444231>  [http://i1202.photobucket.com/albums/bb367/Entint/th_Twitter1.jpg] <http://twitter.com/#!/entint>   [http://i1202.photobucket.com/albums/bb367/Entint/th_LinkedIn1.jpg] <http://www.linkedin.com/company/18276?trk=tyah>   [http://i1202.photobucket.com/albums/bb367/Entint/th_YouTube1.jpg] <http://www.youtube.com/user/ValueofIT>

This message (and any associated files) is intended only for the use
of the addressee and may contain information that is confidential,
subject to copyright or constitutes a trade secret. If you are not the
intended recipient, you are hereby notified that any dissemination,
copying or distribution of this message, or files associated with this
message, is strictly prohibited. If you have received this message in
error, please notify us immediately by replying to the message and
deleting it from your computer. Messages sent to and from us may be
monitored. Any views or opinions presented are solely those of the
author and do not necessarily represent those of the company. [v.1.1]

From: "Patterson, Joel" <jpatterson_at_entint.com<mailto:jpatterson_at_entint.com>>


|
| Deadlock graph:
| ---------Blocker(s)-------- ---------Waiter(s)---------
| Resource Name process session holds waits process session holds
waits
| TX-001a0015-00014787 34 90 X 32 3
S
| TX-00190008-0000601b 32 3 X 34 90
S
|
| session 90: DID 0001-0022-00000327 session 3: DID 0001-0020-000009E9
| session 3: DID 0001-0020-000009E9 session 90: DID
0001-0022-00000327
|
| Rows waited on:
| Session 90: obj - rowid = 00030CE5 - AAAwzlAAGAABDiuAAA
| (dictionary objn - 199909, file - 6, block - 276654, slot - 0)
| Session 3: obj - rowid = 00030CE5 - AAAwzlAAGAABp8gAAA
| (dictionary objn - 199909, file - 6, block - 433952, slot - 0)
|
|
|
-- http://www.freelists.org/webpage/oracle-l -- Bien Respectueusement Mohamed Houri -- http://www.freelists.org/webpage/oracle-l
Received on Wed Mar 20 2013 - 16:27:48 CET

Original text of this message