Skip to content
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

[SR-15444] Many Thread Sanitizer False Positives In Async Tests #57749

Open
jshier opened this issue Nov 5, 2021 · 5 comments
Open

[SR-15444] Many Thread Sanitizer False Positives In Async Tests #57749

jshier opened this issue Nov 5, 2021 · 5 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. concurrency Feature: umbrella label for concurrency language features TSan For issues in the Thread Sanitizer itself

Comments

@jshier
Copy link
Contributor

jshier commented Nov 5, 2021

Previous ID SR-15444
Radar None
Original Reporter @jshier
Type Bug
Environment

macOS 12.0.1, Xcode 13.2 and earlier

Additional Detail from JIRA
Votes 3
Component/s
Labels Bug
Assignee None
Priority Medium

md5: b9dd798cda38c29ad9fb5e5d9c79d2ba

Issue Description:

On Alamofire's feature/async-handlers branch (Xcode 13.2 required), running more than one of the new async tests at once causes multiple thread sanitizer warnings. Running the entire DataConcurrencyTests suite of ten tests causes 46 issues. I've put them in this gist: https://gist.github.com/jshier/8c9c7190e1166c28df567fe869355e49

To run Alamofire's tests you'll also need to install and run our test server (brew install alamofire/alamofire/firewalk && firewall &).

@finestructure
Copy link

We're also starting to see TSAN warnings are we're moving our Vapor code base to async/await in the [Swift Package Index|https://swiftpackage.index.com/)] - but only when running them on Linux. On macOS everything passes without any warnings.

We have docs up on how to run our test suite in Docker but I can also provide some details on how to run a reproducible case for this specifically if needed.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@0xTim
Copy link

0xTim commented Jun 15, 2022

@tomerd ☝️

@ktoso ktoso added the concurrency Feature: umbrella label for concurrency language features label Jun 15, 2022
@jshier
Copy link
Contributor Author

jshier commented Jun 15, 2022

This seems fixed on macOS in Xcode 14, last I checked.

@0xTim
Copy link

0xTim commented Oct 6, 2022

I believe this is fixed in 5.7 judging by anecdotes I've heard and seen

@jshier
Copy link
Contributor Author

jshier commented Oct 6, 2022

It is fixed, though I noticed it's only really fixed when targeting the latest OS versions. That is, Xcode 14 targeting the iOS 15.5 simulator will still produce false positives.

@weissi weissi added the TSan For issues in the Thread Sanitizer itself label May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. concurrency Feature: umbrella label for concurrency language features TSan For issues in the Thread Sanitizer itself
Projects
None yet
Development

No branches or pull requests

5 participants