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!

single resource deadlock

879517Aug 1 2011 — edited Aug 2 2011
I'm seeing a deadlock and am trying to confirm the cause. The deadlock is on a delete (both transactions are trying to delete from the same table), and I suspect that the cause is an unindexed self-referencing foreign key in that table. I'm trying to confirm this from the trace file, which contains this message:

Single resource deadlock: blocking enqueue which blocks itself, f 0

Can someone explain what this message means and whether it fits with my theory of the deadlock cause?

More trace data is below.

Thanks.

Single resource deadlock: blocking enqueue which blocks itself, f 0
Granted global enqueue 7000000ce399648
----------enqueue 7000000ce399648------------------------
lock version : 199047
Owner inst : 2
grant_level : KJUSERCW
req_level : KJUSERPW
bast_level : KJUSERNL
notify_func : 0
resp : 7000000d38d8738
procp : 7000000d08dddb8
pid : 50593836
proc version : 11703
oprocp : 0
opid : 50593836
group lock owner : 7000000d1bcdc38
possible pid : 50593836
xid : 2004-0046-000020A3
dd_time : 3.0 secs
dd_count : 0
timeout : 0.0 secs
On_timer_q? : N
On_dd_q? : Y
lock_state : CONVERTING
ast_flag : 0x0
Open Options : KJUSERDEADLOCK
Convert options : KJUSERGETVALUE
History : 0x5555555a
Msg_Seq : 0x0
res_seq : 7
valblk : 0x00000000000000000000000110cb5590 .U
user session for deadlock lock 0x7000000ce399648
sid: 592 ser: 21137 audsid: 633076 user: 37/P_ADMIN
flags: (0x41) USR/- flags_idl: (0x1) BSY/-/-/-/-/-
flags2: (0x40008) -/-
current SQL:
delete from PSE_SCANNED_ITEMS where SCAN_INFO_ID_=:1
Requesting global enqueue 7000000d0dab138
----------enqueue 7000000d0dab138------------------------
lock version : 516797
Owner inst : 2
grant_level : KJUSERCW
req_level : KJUSERPW
bast_level : KJUSERNL
notify_func : 0
resp : 7000000d38d8738
procp : 7000000d08dd808
pid : 53543166
proc version : 6156
oprocp : 0
opid : 53543166
group lock owner : 7000000d1bc7cf8
possible pid : 53543166
xid : 2003-0036-00007A54
dd_time : 0.0 secs
dd_count : 0
timeout : 0.0 secs
On_timer_q? : N
On_dd_q? : N
lock_state : CONVERTING
ast_flag : 0x0
Open Options : KJUSERDEADLOCK
Convert options : KJUSERGETVALUE
History : 0x14951495
Msg_Seq : 0x0
res_seq : 7
valblk : 0x0fffffffffff1ff000000001099a2220 ."
user session for deadlock lock 0x7000000d0dab138
current SQL:
delete from PSE_SCANNED_ITEMS where SCAN_INFO_ID_=:1
----------resource 7000000d38d8738----------------------
resname : [0x35b7][0x0],[TM][ext 0x0,0x0]
hash mask : x3
Local inst : 2
dir_inst : 2
master_inst : 2
hv idx : 22
hv last r.inc : 4
current inc : 6
hv status : 0
hv master : 1
open options : dd cached
grant_bits : KJUSERNL KJUSERCR KJUSERCW
grant mode : KJUSERNL KJUSERCR KJUSERCW KJUSERPR KJUSERPW KJUSEREX
count : 1 1 2 0 0 0
val_state : KJUSERVS_NOVALUE
valblk : 0x000000000000000007000000d08dd808 .
access_inst : 2
vbreq_state : 0
state : x0
resp : 7000000d38d8738
On Scan_q? : N
Total accesses: 1657137
Imm. accesses: 1637811
Granted_locks : 3
Cvting_locks : 1
value_block: 00 00 00 00 00 00 00 00 07 00 00 00 d0 8d d8 08
GRANTED_Q :
lp 7000000d0dab138 gl KJUSERCW rp 7000000d38d8738 [0x35b7][0x0],[TM][ext 0x0,0x0]
master 2 gl owner 7000000d1bc7cf8 possible pid 53543166 xid 2003-0036-00007A54 bast 0 rseq 7 mseq 0 history 0x14951495
open opt KJUSERDEADLOCK
lp 7000000bdb62688 gl KJUSERCR rp 7000000d38d8738 [0x35b7][0x0],[TM][ext 0x0,0x0]
master 2 owner 3 bast 1 rseq 15 mseq 0x20003 history 0x97d38d7d
open opt KJUSERNO_XID
CONVERT_Q:
lp 7000000ce399648 gl KJUSERCW rl KJUSERPW rp 7000000d38d8738 [0x35b7][0x0],[TM][ext 0x0,0x0]
master 2 gl owner 7000000d1bcdc38 possible pid 50593836 xid 2004-0046-000020A3 bast 0 rseq 7 mseq 0 history 0x5555555a
convert opt KJUSERGETVALUE
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 30 2011
Added on Aug 1 2011
3 comments
4,222 views