Binary package “mutextrace” in ubuntu bionic

Lock debugging tool

 This tool displays mutexes locked and unlocked during execution of a
 program, and can provide hints for debugging multithreaded
 applications. As it is fairly lightweight and easy to use, it is ideal
 at the start of a debugging session or when only limited resources are
 available.
 .
 It cannot detect data races as it only looks at the synchronisation
 primitives themselves; if you need that, use helgrind (in the valgrind
 package) instead.