Skip to content

[NFC][asan] Try to deflake asan_lsan_deadlock test #137718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

vitalybuka
Copy link
Collaborator

@vitalybuka vitalybuka commented Apr 28, 2025

10s looks not enough. With highly parallel test
execution on VMs it's very possible that Asan
report will have no enough time to produce output.

I can reproduce locally 1s is not always enough,
but likely my workstation is faster then buildbot.

Additionally, don't use puts/CHECK to validate
timeout. We can exit with 0 and it should violate
"not" expectation.

Follow up to #131756.

Created using spr 1.3.4
@llvmbot
Copy link
Member

llvmbot commented Apr 28, 2025

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Vitaly Buka (vitalybuka)

Changes

10s looks not enough. With highly parallel test
execution on VMs it's very possible that Asan
report will have no enough time to produce output.

I can reproduce locally 1s is not always enough,
but likely my workstation is faster then buildbot.

Additionally, don't use puts/CHECK to validate
timeout. We can exit with 0 and it should violate
"not" expectation.


Full diff: https://github.com/llvm/llvm-project/pull/137718.diff

1 Files Affected:

  • (modified) compiler-rt/test/asan/TestCases/asan_lsan_deadlock.cpp (+2-5)
diff --git a/compiler-rt/test/asan/TestCases/asan_lsan_deadlock.cpp b/compiler-rt/test/asan/TestCases/asan_lsan_deadlock.cpp
index 7ca07edbaf18c..7c2dbf27da3d4 100644
--- a/compiler-rt/test/asan/TestCases/asan_lsan_deadlock.cpp
+++ b/compiler-rt/test/asan/TestCases/asan_lsan_deadlock.cpp
@@ -36,11 +36,8 @@
 
 void Watchdog() {
   // Safety mechanism: Turn infinite deadlock into finite test failure
-  usleep(10000000);
-  // CHECK-NOT: Timeout! Deadlock detected.
-  puts("Timeout! Deadlock detected.");
-  fflush(stdout);
-  _exit(1);
+  sleep(60);
+  _exit(0);
 }
 
 int main(int argc, char **argv) {

Created using spr 1.3.4
@vitalybuka vitalybuka added the skip-precommit-approval PR for CI feedback, not intended for review label Apr 28, 2025
@vitalybuka vitalybuka merged commit b111da9 into main Apr 28, 2025
11 checks passed
@vitalybuka vitalybuka deleted the users/vitalybuka/spr/nfcasan-try-to-deflake-asan_lsan_deadlock-test branch April 28, 2025 22:17
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
10s looks not enough. With highly parallel test
execution on VMs it's very possible that Asan
report will have no enough time to produce output.

I can reproduce locally 1s is not always enough,
but likely my workstation is faster then buildbot.

Additionally, don't use puts/CHECK to validate
timeout. We can exit with 0 and it should violate
"not" expectation.

Follow up to llvm#131756.
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
10s looks not enough. With highly parallel test
execution on VMs it's very possible that Asan
report will have no enough time to produce output.

I can reproduce locally 1s is not always enough,
but likely my workstation is faster then buildbot.

Additionally, don't use puts/CHECK to validate
timeout. We can exit with 0 and it should violate
"not" expectation.

Follow up to llvm#131756.
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
10s looks not enough. With highly parallel test
execution on VMs it's very possible that Asan
report will have no enough time to produce output.

I can reproduce locally 1s is not always enough,
but likely my workstation is faster then buildbot.

Additionally, don't use puts/CHECK to validate
timeout. We can exit with 0 and it should violate
"not" expectation.

Follow up to llvm#131756.
GeorgeARM pushed a commit to GeorgeARM/llvm-project that referenced this pull request May 7, 2025
10s looks not enough. With highly parallel test
execution on VMs it's very possible that Asan
report will have no enough time to produce output.

I can reproduce locally 1s is not always enough,
but likely my workstation is faster then buildbot.

Additionally, don't use puts/CHECK to validate
timeout. We can exit with 0 and it should violate
"not" expectation.

Follow up to llvm#131756.
Ankur-0429 pushed a commit to Ankur-0429/llvm-project that referenced this pull request May 9, 2025
10s looks not enough. With highly parallel test
execution on VMs it's very possible that Asan
report will have no enough time to produce output.

I can reproduce locally 1s is not always enough,
but likely my workstation is faster then buildbot.

Additionally, don't use puts/CHECK to validate
timeout. We can exit with 0 and it should violate
"not" expectation.

Follow up to llvm#131756.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler-rt:asan Address sanitizer compiler-rt:sanitizer compiler-rt skip-precommit-approval PR for CI feedback, not intended for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants