Using the ISPF Online Monitor in deadlock resolution

A deadlock is an error condition where processing cannot continue because of an unresolved contention for a particular resource.

A deadlock is signaled when the deadlock detection cycle time has been reached. Ensure that the resource timeout limit is at least twice that of the deadlock detection cycle so that deadlocks are detected before a timeout occurs.

Deadlock detection

Start the data collector to collect deadlock events.

Start exception event processing from the Exception Processor panel to be notified when an exception event occurs. See How to start exception processing.

Deadlock resolution

On detection of a deadlock, use LOOK to display the participants in the deadlock.
Figure 1. Deadlock Data window
 DGOMLED0                      Deadlock Data
                                                                More:   - +
 IFCID  . . . . . . . . . . . . . . . . . : 172

 Number of resources involved in deadlock : 2
 Deadlock interval counter  . . . . . . . : 2
 Time deadlock detected . . . . . . . . . : 21:38:34.15

 Locked resource
 Type . . . . . . . . : Datapage
 Database . . . . . . : 271       Object  : 6
 Page # . . . . . . . : X'3001F1'

 Blocker
 Member/DBMS identifier . . . . . . . . . : MEMBER01
 Plan name  . . . . . . . . . . . . . . . : DDLD3P18
 Correlation identifier . . . . . . . . . : RUNPRG18

 Connection identifier  . . . . . . . . . : BATCH
 LUW identifier . . . . . . . . . . . . . : USIBMSY.SY10BDB2.A74AB9FEF91C
 State  . . . . . . . . . . . . . . . . . : EXCLUSIVE
 Duration . . . . . . . . . . . . . . . . : COMMIT
 Status . . . . . . . . . . . . . . . . . : WAIT

 Waiter
 Member/DBMS identifier . . . . . . . . . : MEMBER02
 Plan name  . . . . . . . . . . . . . . . : DDLD3P15
 Correlation identifier . . . . . . . . . : RUNPRG15
 Connection identifier  . . . . . . . . . : BATCH
 LUW identifier . . . . . . . . . . . . . : USIBMSY.SY30BDB2.A74AB9EE117F
 Requested function . . . . . . . . . . . : LOCK
 State  . . . . . . . . . . . . . . . . . : UPDATE
 Duration . . . . . . . . . . . . . . . . : MANUAL
 DB2 assigned worth value . . . . . . . . : 18

 Command ===> ______________________________________________________________
  F1=Help      F2=Split     F3=Exit      F7=Up        F8=Down
  F9=Swap     F12=Cancel

If the 1 field is Datapage, ensure that all applications (Holder and Waiter) access the resource in the same order.

If the deadlock concerns an index with high insert activity (the Locked resource Type field is Index Page), set the SUBPAGES parameter for the index to 1 or consider converting the index to type 2. If the problem is not related to SUBPAGES, it could be that the commit frequency for an update application is too low. The ratio of updates per commit can be viewed in the Thread Detail panel.