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!

deadlock on a unique index?

user11984945Dec 20 2011 — edited Dec 21 2011
I am trying to figure out what is exactly going on during this deadlock situation and i need some help. From the info
from the graph i figured that session 75 is waiting on row in a unique index. From what i am trying to figure out is
are the two sessions trying to insert the same key value and the second session has to wait to see if an ORA-0001 should be raised or not and a deadlock occurs?


Session 75: obj - rowid = 0001B54E - AAAbVOAASAABQ0SAAA
(dictionary objn - 111950, file - 18, block - 331026, slot - 0)

OWNER OBJECT_NAME OBJECT_TYPE
MULTI PK_SEGMENTMEMBER_1 INDEX

CREATE UNIQUE INDEX PK_SEGMENTMEMBER_1 ON SEGMENTMEMBER
(SEGMENTID, ENDUSERID)



--------Dumping Sorted Master Trigger List --------
Trigger Owner : MULTI
Trigger Name : RULE_CACHE
--------Dumping Trigger Sublists --------
trigger sublist 0 :
trigger sublist 1 :
Trigger Owner : MULTI
Trigger Name : RULE_CACHE
trigger sublist 2 :
trigger sublist 3 :
trigger sublist 4 :

Deadlock graph:
---------Blocker(s)-------- ---------Waiter(s)---------
Resource Name process session holds waits process session holds waits
TX-000e0013-0015c871 20 11 X 33 75 S
TX-000b0000-0017d542 33 75 X 20 11 S

session 11: DID 0001-0014-0094ADA4 session 75: DID 0001-0021-003A6568
session 75: DID 0001-0021-003A6568 session 11: DID 0001-0014-0094ADA4

Rows waited on:
Session 11: no row
Session 75: obj - rowid = 0001B54E - AAAbVOAASAABQ0SAAA
(dictionary objn - 111950, file - 18, block - 331026, slot - 0)

----- Information for the OTHER waiting sessions -----
Session 75:
sid: 75 ser: 15873 audsid: 26563927 user: 95/MULTI flags: 0x41
pid: 33 O/S info: user: oracle, term: UNKNOWN, ospid: 13909
image: oracle@db3.8020solutions.net
client details:
O/S info: user: jboss, term: unknown, ospid: 1234
machine: MULTI2.8020solutions.net program: JDBC Thin Client
application name: JDBC Thin Client, hash value=2546894660
current SQL:
MERGE INTO SEGMENTMEMBER A USING (SELECT id enduserid,
decode(MIN(nvl(ruleid, 0)), 0, NULL, min(ruleid)) ruleid,
segmentid
FROM temp_ids
GROUP BY id, segmentid) B
ON (A.ENDUSERID = B.ENDUSERID AND A.SEGMENTID = B.SEGMENTID)
WHEN NOT MATCHED THEN
INSERT ( A.ENDUSERID,A.RULEID, A.SEGMENTID)
VALUES ( B.ENDUSERID,B.RULEID, B.SEGMENTID)

----- End of information for the OTHER waiting sessions -----

Information for THIS session:

----- Current SQL Statement for this session (sql_id=9utn9atfhzsdz) -----
DELETE FROM RULE WHERE ID IN (SELECT ID FROM UTL_DELETE WHERE TABLENAME = 'RULE')
----- PL/SQL Stack -----
----- PL/SQL Call Stack -----
object line object
handle number name
0xeaaabbd0 20675 package body MULTI.MULTI_DELETE
0xeaaabbd0 20910 package body MULTI.MULTI_DELETE
0xccfa7ed0 1 anonymous block
===================================================
PROCESS STATE
-------------
Process global information:
process: 0x11b4d9e20, call: 0x11b892c78, xact: 0x117c891b8, curses: 0x11b610458, usrses: 0x11b610458
----------------------------------------
SO: 0x11b4d9e20, type: 2, owner: (nil), flag: INIT/-/-/0x00 if: 0x3 c: 0x3
proc=0x11b4d9e20, name=process, file=ksu.h LINE:11459, pg=0
(process) Oracle pid:20, ser:25, calls cur/top: 0x11b892c78/0x11b895a58
flags : (0x0) -
flags2: (0x0), flags3: (0x0)
intr error: 0, call error: 0, sess error: 0, txn error 0
intr queue: empty
ksudlp FALSE at location: 0
(post info) last post received: 0 0 150
last post received-location: kcb2.h LINE:3844 ID:kcbzww
last process to post me: 11b4e7160 41 0
last post sent: 0 0 26
last post sent-location: ksa2.h LINE:282 ID:ksasnd
last process posted by me: 11b4d1c20 1 6
(latch info) wait_event=0 bits=0
Process Group: DEFAULT, pseudo proc: 0x11b56ada0
O/S info: user: oracle, term: UNKNOWN, ospid: 15407
OSD pid info: Unix process pid: 15407, image: oracle@db3.8020solutions.net
Dump of memory from 0x000000011B4B5110 to 0x000000011B4B5318
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 18 2012
Added on Dec 20 2011
2 comments
771 views