Spot dead locks:

Record the PID of the lock owner, and check if the PID still exists when we fail to obtain the lock.
please comment what pgrep does (for linux dummies)