From 6ab26a431f17bf5c1fabc6f7ef2045575ee75b87 Mon Sep 17 00:00:00 2001 From: Dengke Tang Date: Fri, 15 Mar 2024 14:08:39 -0700 Subject: [PATCH] Work around asan issue with GH runner image >= 20240310.1.0 (#409) --- .github/workflows/ci.yml | 38 +++++++++++++++++++++++++++++++---- .github/workflows/codecov.yml | 7 ++++++- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd3421bf5..97372eccb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: | @@ -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: | @@ -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: | @@ -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: | @@ -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: | @@ -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 diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index edfd58ccb..42feb208c 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -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')"