I have an Oracle DB package which usually causes what I consider to be an ITL deadlock (Transactional Interested List). The corresponding part of the trace file is below.
Deadlock graph: ---------Blocker(s)-------- ---------Waiter(s)--------- Resource Name process session holds waits process session holds waits TM-0000cb52-00000000 22 131 S 23 143 SS TM-0000ceec-00000000 23 143 SX 32 138 SX SSX TM-0000cb52-00000000 30 138 SX 22 131 S session 131: DID 0001-0016-00000D1C session 143: DID 0001-0017-000055D5 session 143: DID 0001-0017-000055D5 session 138: DID 0001-001E-000067A0 session 138: DID 0001-001E-000067A0 session 131: DID 0001-0016-00000D1C Rows waited on: Session 143: no row Session 138: no row Session 131: no row
There are no bitmap indexes in this table, so this is not the reason. As far as I can tell, the absence of “rows waiting” plus “S” in the “Waiting for Waiting” column probably indicates that this is an ITL lock. In addition, the table is written quite often (about 8 inserts or updates at the same time, as often as 240 times per minute), so the ITL lock seems to be strong.
I increased the INITRANS parameter of the table and it is indexed to 100 and increased PCT_FREE on the table from 10 to 20 (then rebuilt the indexes), but locks still occur. The deadlock seems to occur most often during the update, but it may just be a coincidence, as I only traced it several times.
My questions are doubled:
1) Is this actually an ITL dead end?
2) If this is an ITL impasse, what else can be done to avoid this?
It turns out that this is not an ITL blocking problem at all, but a problem with unindexed foreign keys. I found this thanks to dpbradley's answer, in which I was convinced that this was not an ITL problem, and prompted me to figure out what could be causing other “no-string” deadlocks.
oracle oracle10g database-deadlocks
Allan
source share