Deadlock or timeout errors in SMSVSAM will cause CICS® to issue messages DFHFC0164, DFHFC0165, DFHFC0166, and DFHFC0167. They should provide enough information to determine the cause of the problem.
If additional information is needed, the CICS FC level 2 trace will provide the VPDI (mapped by IFGVPDI). The VPDI is the source of the information provided in messages DFHFC0164, DFHFC0165, DFHFC0166, and DFHFC0167. The SMSVSAM trace OPTIONS=DLKPD can be used to trace the VPDI.