Skip to content

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

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
@yln yln self-assigned this Sep 16, 2022
@yln
Copy link
Contributor Author

yln commented Sep 16, 2022

@swift-ci Please test

@yln
Copy link
Contributor Author

yln commented Sep 19, 2022

@swift-ci Please test macOS

@yln yln merged commit 24a4b12 into main Sep 20, 2022
@yln yln deleted the deflake-test-tsan-libdispatch branch September 20, 2022 00:03
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