[clang] [compiler-rt] [llvm] [tsan] Revive TSAN's standalone deadlock sanitizer implementation (PR #212748)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 29 06:36:07 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 186980 tests passed
* 4914 tests skipped
* 6 tests failed
## Failed Tests
(click on a test name to see its output)
### DeadlockSanitizer-x86_64
<details>
<summary>DeadlockSanitizer-x86_64.DeadlockSanitizer-x86_64/mutex_bad_unlock.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=thread-deadlock -Wall -pthread -m64 -gline-tables-only -std=c++14 -O1 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_bad_unlock.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_bad_unlock.cpp.tmp && not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_bad_unlock.cpp.tmp 2>&1 | FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_bad_unlock.cpp
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=thread-deadlock -Wall -pthread -m64 -gline-tables-only -std=c++14 -O1 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_bad_unlock.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_bad_unlock.cpp.tmp
# note: command had no output on stdout or stderr
# executed command: not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_bad_unlock.cpp.tmp
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_bad_unlock.cpp
# note: command had no output on stdout or stderr
--
```
</details>
<details>
<summary>DeadlockSanitizer-x86_64.DeadlockSanitizer-x86_64/mutex_cycle2.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=thread-deadlock -Wall -pthread -m64 -gline-tables-only -std=c++14 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_cycle2.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_cycle2.cpp.tmp
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=thread-deadlock -Wall -pthread -m64 -gline-tables-only -std=c++14 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_cycle2.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_cycle2.cpp.tmp
# note: command had no output on stdout or stderr
# RUN: at line 3
not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_cycle2.cpp.tmp 2>&1 | FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_cycle2.cpp
# executed command: not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_cycle2.cpp.tmp
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_cycle2.cpp
# note: command had no output on stdout or stderr
--
```
</details>
<details>
<summary>DeadlockSanitizer-x86_64.DeadlockSanitizer-x86_64/mutex_cycle_long.c</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=thread-deadlock -Wall -pthread -m64 -gline-tables-only -std=c++14 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_cycle_long.c -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_cycle_long.c.tmp
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=thread-deadlock -Wall -pthread -m64 -gline-tables-only -std=c++14 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_cycle_long.c -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_cycle_long.c.tmp
# .---command stderr------------
# | clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_cycle_long.c:18:21: warning: variable length arrays in C++ are a Clang extension [-Wvla-cxx-extension]
# | 18 | pthread_mutex_t m[num_mutexes];
# | | ^~~~~~~~~~~
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_cycle_long.c:18:21: note: read of non-const variable 'num_mutexes' is not allowed in a constant expression
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_cycle_long.c:14:7: note: declared here
# | 14 | int num_mutexes = 5;
# | | ^
# | 1 warning generated.
# `-----------------------------
# RUN: at line 3
not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_cycle_long.c.tmp 5 2>&1 | FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_cycle_long.c
# executed command: not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_cycle_long.c.tmp 5
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_cycle_long.c
# note: command had no output on stdout or stderr
--
```
</details>
<details>
<summary>DeadlockSanitizer-x86_64.DeadlockSanitizer-x86_64/mutex_destroy_locked.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=thread-deadlock -Wall -pthread -m64 -gline-tables-only -std=c++14 -O1 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_destroy_locked.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_destroy_locked.cpp.tmp && not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_destroy_locked.cpp.tmp 2>&1 | FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_destroy_locked.cpp
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=thread-deadlock -Wall -pthread -m64 -gline-tables-only -std=c++14 -O1 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_destroy_locked.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_destroy_locked.cpp.tmp
# note: command had no output on stdout or stderr
# executed command: not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_destroy_locked.cpp.tmp
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_destroy_locked.cpp
# note: command had no output on stdout or stderr
--
```
</details>
<details>
<summary>DeadlockSanitizer-x86_64.DeadlockSanitizer-x86_64/mutex_destroy_locked2.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=thread-deadlock -Wall -pthread -m64 -gline-tables-only -std=c++14 -O1 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_destroy_locked2.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_destroy_locked2.cpp.tmp && not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_destroy_locked2.cpp.tmp 2>&1 | FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_destroy_locked2.cpp
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=thread-deadlock -Wall -pthread -m64 -gline-tables-only -std=c++14 -O1 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_destroy_locked2.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_destroy_locked2.cpp.tmp
# note: command had no output on stdout or stderr
# executed command: not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_destroy_locked2.cpp.tmp
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_destroy_locked2.cpp
# note: command had no output on stdout or stderr
--
```
</details>
<details>
<summary>DeadlockSanitizer-x86_64.DeadlockSanitizer-x86_64/mutex_double_lock.cpp</summary>
```
Exit Code: 1
Timeout: Reached timeout of 1200 seconds
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=thread-deadlock -Wall -pthread -m64 -gline-tables-only -std=c++14 -O1 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_double_lock.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_double_lock.cpp.tmp && not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_double_lock.cpp.tmp 2>&1 | FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_double_lock.cpp
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=thread-deadlock -Wall -pthread -m64 -gline-tables-only -std=c++14 -O1 /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_double_lock.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_double_lock.cpp.tmp
# note: command had no output on stdout or stderr
# executed command: not /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/compiler-rt/test/tsan_deadlock/X86_64Config/Output/mutex_double_lock.cpp.tmp
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# error: command reached timeout: True
# executed command: FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/compiler-rt/test/tsan_deadlock/mutex_double_lock.cpp
# note: command had no output on stdout or stderr
# error: command reached timeout: True
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/212748
More information about the cfe-commits
mailing list