-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
gh-143750: Compile OpenSSL with TSan for TSan CI #143752
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -23,8 +23,17 @@ jobs: | |||||||||
| && ' (free-threading)' | ||||||||||
| || '' | ||||||||||
| }} | ||||||||||
| runs-on: ubuntu-24.04 | ||||||||||
| strategy: | ||||||||||
| fail-fast: false | ||||||||||
| matrix: | ||||||||||
| os: [ubuntu-24.04] | ||||||||||
| openssl_ver: [3.5.4] | ||||||||||
| runs-on: ${{ matrix.os }} | ||||||||||
|
Comment on lines
+26
to
+31
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Plz move these to |
||||||||||
| timeout-minutes: 60 | ||||||||||
| env: | ||||||||||
| OPENSSL_VER: ${{ matrix.openssl_ver }} | ||||||||||
| MULTISSL_DIR: ${{ github.workspace }}/multissl | ||||||||||
| OPENSSL_DIR: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }} | ||||||||||
| steps: | ||||||||||
| - uses: actions/checkout@v4 | ||||||||||
| with: | ||||||||||
|
|
@@ -37,21 +46,20 @@ jobs: | |||||||||
| # Install clang | ||||||||||
| wget https://apt.llvm.org/llvm.sh | ||||||||||
| chmod +x llvm.sh | ||||||||||
| sudo ./llvm.sh 20 | ||||||||||
| sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-20 100 | ||||||||||
| sudo update-alternatives --set clang /usr/bin/clang-20 | ||||||||||
| sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-20 100 | ||||||||||
| sudo update-alternatives --set clang++ /usr/bin/clang++-20 | ||||||||||
| sudo update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /usr/bin/llvm-symbolizer-20 100 | ||||||||||
| sudo update-alternatives --set llvm-symbolizer /usr/bin/llvm-symbolizer-20 | ||||||||||
|
|
||||||||||
| - name: Sanitizer option setup | ||||||||||
| run: | | ||||||||||
| if [ "${SANITIZER}" = "TSan" ]; then | ||||||||||
|
Comment on lines
+58
to
59
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can move this conditional to the GHA step so that skipping is more prominent.
Suggested change
Also drop |
||||||||||
| sudo ./llvm.sh 17 # gh-121946: llvm-18 package is temporarily broken | ||||||||||
| sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-17 100 | ||||||||||
| sudo update-alternatives --set clang /usr/bin/clang-17 | ||||||||||
| sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-17 100 | ||||||||||
| sudo update-alternatives --set clang++ /usr/bin/clang++-17 | ||||||||||
| # Reduce ASLR to avoid TSan crashing | ||||||||||
| sudo sysctl -w vm.mmap_rnd_bits=28 | ||||||||||
| else | ||||||||||
| sudo ./llvm.sh 20 | ||||||||||
| fi | ||||||||||
|
|
||||||||||
| - name: Sanitizer option setup | ||||||||||
| run: | | ||||||||||
| if [ "${SANITIZER}" = "TSan" ]; then | ||||||||||
| echo "TSAN_OPTIONS=${SAN_LOG_OPTION} suppressions=${GITHUB_WORKSPACE}/Tools/tsan/suppressions${{ | ||||||||||
| fromJSON(inputs.free-threading) | ||||||||||
|
|
@@ -69,6 +77,16 @@ jobs: | |||||||||
| - name: Add ccache to PATH | ||||||||||
| run: | | ||||||||||
| echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" | ||||||||||
| - name: 'Restore OpenSSL build (TSan)' | ||||||||||
| id: cache-openssl | ||||||||||
| uses: actions/cache@v4 | ||||||||||
| if: inputs.sanitizer == 'TSan' | ||||||||||
| with: | ||||||||||
| path: ./multissl/openssl/${{ env.OPENSSL_VER }} | ||||||||||
| key: ${{ matrix.os }}-multissl-openssl-tsan-${{ env.OPENSSL_VER }} | ||||||||||
| - name: Install OpenSSL (TSan) | ||||||||||
| if: steps.cache-openssl.outputs.cache-hit != 'true' && inputs.sanitizer == 'TSan' | ||||||||||
| run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux --tsan | ||||||||||
| - name: Configure CPython | ||||||||||
| run: >- | ||||||||||
| ./configure | ||||||||||
|
|
@@ -79,6 +97,7 @@ jobs: | |||||||||
| || '--with-undefined-behavior-sanitizer' | ||||||||||
| }} | ||||||||||
| --with-pydebug | ||||||||||
| ${{ inputs.sanitizer == 'TSan' && ' --with-openssl="$OPENSSL_DIR" --with-openssl-rpath=auto' || '' }} | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (nit) no need for the whitespace since
Suggested change
|
||||||||||
| ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }} | ||||||||||
| - name: Build CPython | ||||||||||
| run: make -j4 | ||||||||||
|
|
||||||||||
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.
This will also need to interpolate new matrix factors since the job names will be confusing if there's ever more than one job.