[compiler-rt] [asan][test] Fix flake in asan_lsan_deadlock test (PR #141145)
Kunqiu Chen via llvm-commits
llvm-commits at lists.llvm.org
Thu May 22 15:31:45 PDT 2025
Camsyn wrote:
> Before landing I do want to get confirmation that the SUMMARY bit wasn't intended to be proof that the deadlock can't happen.
@ilovepi Thanks for your patch. I added this test case to verify a deadlock patch in PR #131756. Unfortunately, the "Summary:" prefix is indeed used to prove that the deadlock has been fixed.
When a deadlock occurs, the error report will be stuck in stack trace symbolizing, after "Error:..." is printed, at which point we will see the following error report:
```
=================================================================
==2437073==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f94afd00034 at pc 0x561adf3d716c bp 0x7f94aecfdd50 sp 0x7f94aecfdd48
WRITE of size 4 at 0x7f94afd00034 thread T2
```
If the deadlock is fixed, the "Summary:" will be printed after the stack trace, as follows:
```
=================================================================
==526272==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fe21c600034 at pc 0x55ad40f8d16c bp 0x7fe21b5fdd50 sp 0x7fe21b5fdd48
WRITE of size 4 at 0x7fe21c600034 thread T2
<STACK TRACE>
...
SUMMARY: AddressSanitizer: stack-buffer-overflow /home/cseadmin/test.cc:59:15 in main::$_0::operator()() const
```
Therefore, your current fix cannot tell whether the deadlock does occur.
I'm also confused as to why such a simple test case would cause flakiness. However, I managed to fail to reproduce it locally :(, and due to a lack of information, I don't know what the cause of this flakiness is (does the limited resources of the build bot cause ASan bug reporting to time out?).
https://github.com/llvm/llvm-project/pull/141145
More information about the llvm-commits
mailing list