From: Daniel Stenberg Date: Thu, 14 Mar 2024 11:56:39 +0000 (+0100) Subject: GHA/linux: add sysctl trick to work-around GitHub runner issue X-Git-Tag: curl-8_7_0~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=09f367977af2a9db785db76ef8beaef405ba492e;p=thirdparty%2Fcurl.git GHA/linux: add sysctl trick to work-around GitHub runner issue The GitHub image runner update from 20240304.1.0 to 20240310.1 introduces a problem for clang-14. The issue is caused by incompatibility between llvm 14 provided in ubuntu-22.04 image and the much newer kernel configured with high-entropy ASLR. As a work-around, we issue a sysctl command to lower the entropy and get clang-14 to work again. URL: https://github.com/actions/runner-images/issues/9491 Closes #13124 --- diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 3d447a871b..b033340842 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -139,7 +139,7 @@ jobs: CFLAGS="-fsanitize=memory -Wformat -Werror=format-security -Werror=array-bounds -g" LDFLAGS="-fsanitize=memory" LIBS="-ldl" - --without-ssl --without-zlib --without-brotli --without-zstd --without-libpsl --without-nghttp2 --enable-debug --enable-websocketsx + --without-ssl --without-zlib --without-brotli --without-zstd --without-libpsl --without-nghttp2 --enable-debug --enable-websockets singleuse: --unit - name: event-based @@ -197,6 +197,14 @@ jobs: - uses: actions/checkout@v4 + - name: Fix kernel mmap rnd bits + # Asan in llvm 14 provided in ubuntu 22.04 is incompatible with + # high-entropy ASLR in much newer kernels that GitHub runners are + # using leading to random crashes: https://reviews.llvm.org/D148280 + # See https://github.com/actions/runner-images/issues/9491 + continue-on-error: true + run: sudo sysctl vm.mmap_rnd_bits=28 + - if: contains(matrix.build.install_steps, 'gcc-11') run: | sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa