On 7/3/24 14:44, Tim Wiederhake wrote: > libvirt currently exhibits undefined behavior due to pthread mutex misuse, > e.g. destroying a locked mutex or attempting to unlock an already unlocked > mutex. > > Add a warning if such a case is detected, so we can start on fixing the > issues. > I expect this to be even harder to fix than to detect. BTW: in the past I used to play with: https://github.com/dbadapt/mutrace which looked like it could detect some locking problems. I think I even had some patches locally for easier debugging of libvirt. But I can't find that repo anymore. Oh, and then there's DRD tool in valgrind, but I can't find the right combination of arguments to make it produce anything usable. Michal