Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-112536: Set up TSAN CI for free-threading#116555
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
corona10 commented Mar 10, 2024 • edited by bedevere-app bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-app bot
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as resolved.
This comment was marked as resolved.
corona10 commented Mar 10, 2024 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Hmm, I locally passed the thread-sanitizer test with clang, I am taking a look why CI has an issue. |
corona10 commented Mar 10, 2024
Weired.. |
corona10 commented Mar 10, 2024 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
I need to check on my Linux machine later. |
| - name: Set up GCC-10 for ASAN | ||
| uses: egor-tensin/setup-gcc@v1 | ||
| with: | ||
| version: 11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version says "11" but the step name says "GCC-10"
| - name: Display build info | ||
| run: make pythoninfo | ||
| - name: Tests | ||
| run: ./python -m test --pgo -j4 # Reduce test scope |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll want a configuration specifically for tsan. Maybe a --tsan option? We'll only want to run tests that actually use threading.
Brett had a list of tests that fail with PYTHON_GIL=0 -- those are probably a good starting point:
swtaarrs@1fe9165#diff-590c02490d066378045dd48d62e86dc85d3fb4ad934b6a2b2b0b1112e59eaefb
| /***************************/ | ||
| staticint | ||
| _Py_NO_SANITIZE_THREAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've had a better experience using suppression lists rather than marking functions as _Py_NO_SANITIZE_THREAD:
- Add a file
supressions.txtsomwhere (maybeTools/tsan/supressions.txt?) - Set the environment variable
TSAN_OPTIONS="suppressions=<path_to_supressions.txt>"
See https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions
| with: | ||
| version: 11 | ||
| - name: Configure CPython | ||
| run: ./configure --disable-gil --with-thread-sanitizer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want --with-pydebug?
corona10 commented Mar 15, 2024
Actual PR for this issue will be: #116872 |
--with-thread-sanitizer#112536