Abandoned Lock

Abandoned Lock. Errors occurring when a thread traps some resource (a critical section, mutex) and is withdrawn from execution for some reason. As the result the resource cannot be released. If another thread needs it this will lead to infinite waiting.

Do you make errors in the code?

Check your code
with PVS-Studio

Static code analysis
for C, C++, and C#

goto PVS-Studio;