IBM Support

db2pd -lock wait doesn't return lock waiters and holders

Troubleshooting


Problem

An application is in lock wait state, however db2pd -lock wait doesn't return lock waiters and holders of the lock that the application is waiting on.

Symptom

Application is in lock wait state which can be verified with application snapshot or db2pd -db <dbname> -apinfo:

Application :

...

  Application Status :     Lock-wait

  Application Name :       db2reorg

However, db2pd -db <dbname> -lock wait returns empty list:


Locks:
Address            TranHdl    Lockname                   Type           Mode Sts Owner      Dur HoldCount  Att        ReleaseFlg rrIID

Cause


The lock status in "Converting". As an example, please note the "Sts" column is "C" in the output of db2pd -wlocks below:
$ db2pd -wlocks -db sample

Database Member 0 -- Database SAMPLE -- Active -- Up 0 days 00:04:07 -- Date 2016-07-27-14.22.03.965369

Locks being waited on :
AppHandl [nod-index] TranHdl    Lockname                   Type       Mode Conv Sts CoorEDU    AppName  AuthID   AppID
12345    [000-12345] 60         20000200000000000000000054 TableLock  .IN  ..Z  C   1234       db2reorg DB2INST  *LOCAL.venus.071207213730
...

Diagnosing The Problem

Use db2pd -wlocks to show the lock waiters and holders.

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"DB2 Tools - db2pd","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"10.1;10.5;9.7;9.8","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21987900