I have found a deadlock which happened one day ago. I have pasted that trace file. Now I have to know two things.
1) How can I detect whether the following deadlock is due to row-level locking or transaction layer locking (since I am already one day delay i.e I am trying to find out the reason on 1day after the day lock happened)?
2) I am able to find out the row having rowid 'AAAHzHAAnAAAA7hAAP'. But I am not able to find
out any row having rowid 'AAAH/gAAiAAAByOAA0'. Why? Someone has deleted that row ? A rowid
can have '/' ?
DEADLOCK DETECTED
Current SQL statement for this session:
UPDATE SSP_PROGRAMME_SCHEDULE
SET modify_dt=SYSDATE
WHERE SCHD_KEY=:b1
----- PL/SQL Call Stack -----
object line object
handle number name
94f1b1d4 2 STOWNER.TR_SSP_PROGRAMME_SCHEDULE
994a0858 268 package body STOWNER.SSP_PROCESS_SCHEDULE_PKG
994a0858 2549 package body STOWNER.SSP_PROCESS_SCHEDULE_PKG
994a0858 6202 package body STOWNER.SSP_PROCESS_SCHEDULE_PKG
8f90b6d0 1 anonymous block
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-00030007-0001e95b 60 60 X 45 136 X
TX-00060025-0000ff93 45 136 X 60 60 X
session 60: DID 0001-003C-00000002 session 136: DID 0001-002D-00000002
session 136: DID 0001-002D-00000002 session 60: DID 0001-003C-00000002
Rows waited on:
Session 136: obj - rowid = 00007FE0 - AAAH/gAAiAAAByOAA0
(dictionary objn - 32736, file - 34, block - 7310, slot - 52)
Session 60: obj - rowid = 00007CC7 - AAAHzHAAnAAAA7hAAP
(dictionary objn - 31943, file - 39, block - 3809, slot - 15)
Information on the OTHER waiting sessions:
Session 136:
pid=45 serial=1983 audsid=47043 user: 44/
O/S info: user: wsadmin, term: , ospid: 19810, machine: piranha
program: java@piranha (TNS V1-V3)
application name: java@piranha (TNS V1-V3), hash value=0
Current SQL Statement:
DELETE FROM SSP_PROGRAMME_PART
WHERE schd_episode_key = :b1
End of information on OTHER waiting sessions.
Answer to the 1st Question:
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-00030007-0001e95b 60 60 X 45 136 X
TX-00060025-0000ff93 45 136 X 60 60 X
It is very clear that the sessions (60 and 130) held resources that were needed by other sessions. Check your application whether it is using order of locking the tables are same or not. If not, change it.
Answer to 2nd question:
A rowid cannot have /. The original character might have been overwritten by '/' due to accident.
you are saying that "It was due to transaction layer lock.
You can see the TX locks on both sessions.". But I have seen a deadlock trace file which contains TX lock and that deadlock was due to row level locking.
If TX is meant for Transaction layer locking , then what indicates in the trace file that the deadlock is due to row level locking.
Bookmarks