Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道线程清理程序(clang)的死锁在哪里,但问题是程序被阻止并且在使用 -fsanitize=thread 选项的编译期间未检测到死锁。并且在执行结束时没有结果,因为程序被阻塞(由于死锁而无法退出程序)。
如果程序已经被阻塞,你不需要 ThreadSanitizer 来调试它。您可以使用 gdb 附加到死锁进程,并使用thread apply all bt. 您应该会看到尝试从thread apply all bt输出中的不同线程锁定相同的互斥锁。
thread apply all bt