Skip to content

[Sanitizer] Deflake test tsan libdispatch #61165

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

Merged
merged 1 commit into from
Oct 3, 2022

Conversation

yln
Copy link
Contributor

@yln yln commented Sep 16, 2022

This test does:

race()
print("Done!")

// CHECK: ThreadSanitizer: data race
// CHECK: Done!

We see some recent cases where the output of the test binary on iOS devices was:

Done!
==================
WARNING: ThreadSanitizer: data race
…

So apparently the TSan report output is not guaranteed to be printed before "Done!". Maybe this is because we print "Done!" on stdout and the sanitizer report on stderr?

The remaining question is: what changed that we are seeing this issue now, but not previously?

rdar://99713724
(cherry picked from commit 35c7c41)

This test does:
```
race()
print("Done!")

// CHECK: ThreadSanitizer: data race
// CHECK: Done!
```

We see some recent cases where the output of the test binary on iOS
devices was:
```
Done!
==================
WARNING: ThreadSanitizer: data race
…
```

So apparently the TSan report output is not guaranteed to be printed
before "Done!".  Maybe this is because we print "Done!" on stdout and
the sanitizer report on stderr?

The remaining question is: what changed that we are seeing this issue
now, but not previously?

rdar://99713724
(cherry picked from commit 35c7c41)
@yln yln requested a review from a team as a code owner September 16, 2022 21:20
@yln
Copy link
Contributor Author

yln commented Sep 16, 2022

@swift-ci Please test

@yln yln requested review from rintaro and DougGregor September 16, 2022 21:24
@yln yln self-assigned this Sep 16, 2022
@yln
Copy link
Contributor Author

yln commented Oct 3, 2022

cc: @aschwaighofer

@yln yln requested review from hborla and devincoughlin October 3, 2022 23:00
@yln yln merged commit 2e814ca into release/5.7 Oct 3, 2022
@yln yln deleted the deflake-test-tsan-libdispatch_release-5.7 branch October 3, 2022 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants