Skip to content

Commit

Permalink
Work around asan issue with GH runner image >= 20240310.1.0 (#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
TingDaoK authored Mar 15, 2024
1 parent 59569e3 commit 6ab26a4
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 5 deletions.
38 changes: 34 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ jobs:
- gcc-7
- gcc-8
steps:
- name: Fix kernel mmap rnd bits
# High entropy setting in GH runner images >= 20240310.1.0
# causes ASAN blowing up here and there:
# https://github.com/actions/runner-images/issues/9491
run: sudo sysctl vm.mmap_rnd_bits=28
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
- name: Build ${{ env.PACKAGE_NAME }}
run: |
Expand All @@ -68,6 +73,11 @@ jobs:
matrix:
sanitizers: [",thread", ",address,undefined"]
steps:
- name: Fix kernel mmap rnd bits
# High entropy setting in GH runner images >= 20240310.1.0
# causes ASAN blowing up here and there:
# https://github.com/actions/runner-images/issues/9491
run: sudo sysctl vm.mmap_rnd_bits=28
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
- name: Build ${{ env.PACKAGE_NAME }}
run: |
Expand All @@ -77,6 +87,11 @@ jobs:
linux-shared-libs:
runs-on: ubuntu-22.04 # latest
steps:
- name: Fix kernel mmap rnd bits
# High entropy setting in GH runner images >= 20240310.1.0
# causes ASAN blowing up here and there:
# https://github.com/actions/runner-images/issues/9491
run: sudo sysctl vm.mmap_rnd_bits=28
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
- name: Build ${{ env.PACKAGE_NAME }}
run: |
Expand All @@ -86,6 +101,11 @@ jobs:
byo-crypto:
runs-on: ubuntu-22.04 # latest
steps:
- name: Fix kernel mmap rnd bits
# High entropy setting in GH runner images >= 20240310.1.0
# causes ASAN blowing up here and there:
# https://github.com/actions/runner-images/issues/9491
run: sudo sysctl vm.mmap_rnd_bits=28
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
- name: Build ${{ env.PACKAGE_NAME }}
run: |
Expand Down Expand Up @@ -146,6 +166,11 @@ jobs:
downstream:
runs-on: ubuntu-22.04 # latest
steps:
- name: Fix kernel mmap rnd bits
# High entropy setting in GH runner images >= 20240310.1.0
# causes ASAN blowing up here and there:
# https://github.com/actions/runner-images/issues/9491
run: sudo sysctl vm.mmap_rnd_bits=28
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
- name: Build ${{ env.PACKAGE_NAME }}
run: |
Expand All @@ -155,7 +180,12 @@ jobs:
linux-debug:
runs-on: ubuntu-22.04 # latest
steps:
- name: Build ${{ env.PACKAGE_NAME }}
run: |
aws s3 cp s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DASSERT_LOCK_HELD=ON --config Debug
- name: Fix kernel mmap rnd bits
# High entropy setting in GH runner images >= 20240310.1.0
# causes ASAN blowing up here and there:
# https://github.com/actions/runner-images/issues/9491
run: sudo sysctl vm.mmap_rnd_bits=28
- name: Build ${{ env.PACKAGE_NAME }}
run: |
aws s3 cp s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DASSERT_LOCK_HELD=ON --config Debug
7 changes: 6 additions & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout Sources
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Fix kernel mmap rnd bits
# High entropy setting in GH runner images >= 20240310.1.0
# causes ASAN blowing up here and there:
# https://github.com/actions/runner-images/issues/9491
run: sudo sysctl vm.mmap_rnd_bits=28
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
Expand Down

0 comments on commit 6ab26a4

Please sign in to comment.