-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-112536: Add TSAN builds on Github Actions #116872
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
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
34cd372
gh-112536: Setting up TSAN test at Github Action
corona10 8f789df
Apply TSAN to the default build too
corona10 432c3a2
Update
corona10 7c04959
Use gcc 11 to resolve compiler issue
corona10 4d271cb
Remove test_logging from the TSAN test for the temporary
corona10 853ea8c
Test --with-pydebug
corona10 43135d4
Use Ubuntu 22.04
corona10 7304fca
Use --disable-ipv6 sigh..
corona10 37d048d
revert --with-pydebug
corona10 b05c9f7
Use clang
corona10 7e373ee
Reduce ASLR to avoid TSAN crashing
corona10 920d8b4
Rebirth test_logging
corona10 73cbf74
Add --with-pydebug
corona10 0ff8212
Update Tools/tsan/supressions.txt
corona10 c6dfb25
Add ccache
corona10 e2e90ee
Address code review
corona10 2d29262
Don't use sem_clockwait with TSAN
corona10 e2265a5
Skip tests from test_threading and test_concurrent_futures
corona10 414c0e9
Revert Tools/tsan/supressions.txt changes
corona10 71dc4aa
Add skip_if_tsan
corona10 f399bd2
nit
corona10 ec743ff
Use reusable workflow
corona10 e99087f
nit
corona10 8bfee01
Rename to .github/workflows/reusable-tsan.yml
corona10 8577792
fix
corona10 f9c6e56
fix
corona10 d9afff0
Fix
corona10 e88086f
nit
corona10 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
config_hash: | ||
required: true | ||
type: string | ||
options: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build_tsan_reusable: | ||
name: 'Thread sanitizer' | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Runner image version | ||
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV | ||
- name: Restore config.cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: config.cache | ||
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }} | ||
- name: Install Dependencies | ||
run: | | ||
sudo ./.github/workflows/posix-deps-apt.sh | ||
sudo apt install -y clang | ||
# Reduce ASLR to avoid TSAN crashing | ||
sudo sysctl -w vm.mmap_rnd_bits=28 | ||
- name: TSAN Option Setup | ||
run: | | ||
echo "TSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/Tools/tsan/supressions.txt" >> $GITHUB_ENV | ||
echo "CC=clang" >> $GITHUB_ENV | ||
echo "CXX=clang++" >> $GITHUB_ENV | ||
- name: Add ccache to PATH | ||
run: | | ||
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV | ||
- name: Configure ccache action | ||
uses: hendrikmuhs/ccache-action@v1.2 | ||
with: | ||
save: ${{ github.event_name == 'push' }} | ||
max-size: "200M" | ||
- name: Configure CPython | ||
run: ${{ inputs.options }} | ||
- name: Build CPython | ||
run: make -j4 | ||
- name: Display build info | ||
run: make pythoninfo | ||
- name: Tests | ||
run: ./python -m test --tsan -j4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.