Lock manager reported false deadlocks under high load [CORE2000] #2437
Commented by: @hvlad
Below is typical picture at false deadlock detection time
a) Owners, participating in deadlock (backtrace, head of chain marked by 0) :
b) Two locks on which owners are waiting :
LOCK BLOCK 948936
1 Request 1366912, Owner: 377540, State: 0 (6), Flags: 0x22
LOCK BLOCK 364744
2 Request 1230128, Owner: 396488, State: 0 (6), Flags: 0x22
As you may see request 1375776 (of owner 396488) just granted a lock 948936. This request blocked some other requests, one of them by owner 377540. Note, request 1375776 have flags 0, i.e. it was not marked as blocking and not seen blocking notification. Therefore it have no chance to release the lock to break circle in wait-for graph.
LOCK\post_pending() routine wake up owner of first blocked request. If another process run deadlock scan before blocked owner awakens (and calls post_blockage) it reports false deadlock.