home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IT07065 Status: Closed

REORG TABLE RECLAIM EXTENTS ON MDC TABLE MIGHT DEADLOCK WITH UPDATE/DELETE
DUE TO IX-LOCK ON EMPTY MDC BLOCK

product:
DB2 FOR LUW / DB2FORLUW / A50 - DB2
Problem description:
Operations performing table scans using write locks might 
deadlock with REORG TABLE RECLAIM EXTENTS ALLOW WRITE ACCESS. 
Examples of operations that might perform a table scan while 
using write locks include: 
- SELECT with the FOR UPDATE CLAUSE 
- DELETE statements 
- UPDATE statements 
 
Deadlock might happen if REORG is started (e.g due to AUTO_REORG 
= ON) when TBSCAN is already in progress. REORG TABLE with the 
RECLAIM EXTENTS option on an MDC table will scans the table, 
acquires S-lock on all MDC blocks which are empty and applicable 
for truncation. In the last phase of REORG Z-lock on the table 
is required to truncate those blocks. In this scenario in 
deadlock event monitor we will see REORG waiting for Z-lock to 
be acquired (converted to super exclusive): 
 
Participant No 1 requesting lock 
---------------------------------- 
Lock Name            : 0x00911727000000000000000054 
Lock wait start time : 2014-12-09-13.31.29.319061 
Lock wait end time   : 2014-12-09-13.31.40.754218 
Lock Type            : TABLE 
Lock Specifics       : 
Lock Attributes      : 10202101 
Lock mode requested  : Super Exclusive 
Lock mode held       : Intent Exclusive 
Lock Count           : 1 
Lock Hold Count      : 0 
Lock rrIID           : 0 
Lock Status          : Converting 
Lock release flags   : 40000000 
Tablespace TID       : 2 
Tablespace Name      : USERSPACE1 
Table FID            : 9 
Table Schema         : DB2INST1 
Table Name           : EMPMDC 
 
 
and a query requesting IX-lock on one of the blocks which REORG 
already holds in shared mode: 
 
Participant No 2 requesting lock 
---------------------------------- 
Lock Name            : 0x00911727000000004AD0000062 
Lock wait start time : 2014-12-09-13.31.31.345977 
Lock wait end time   : 2014-12-09-13.31.40.754218 
Lock Type            : MDC_BLOCK 
Lock Specifics       : DATA_PARTITION_ID=0,PAGEID=19152 
Lock Attributes      : 00400000 
Lock mode requested  : Intent Exclusive 
Lock mode held       : Share 
Lock Count           : 0 
Lock Hold Count      : 0 
Lock rrIID           : 0 
Lock Status          : Waiting 
Lock release flags   : 00000000 
Tablespace TID       : 2 
Tablespace Name      : USERSPACE1 
Table FID            : 9 
Table Schema         : DB2INST1 
Table Name           : EMPMDC 
 
For scenario like this it is not necessary for TBSCAN to acquire 
IX-lock on an empty block. 
This is specific to REORG TABLE and REORG INDEXES is not 
affected.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 version 10.5 Fix Pack 7 or higher.            * 
****************************************************************
Local Fix:
Retry the statement that was rolled back due to the deadlock.
Solution
Problem first fixed in DB2 version 10.5 Fix Pack 7.
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
10.02.2015
28.01.2016
28.01.2016
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)
10.5.0.7 FixList