* [PATCH] github: Reduce ASLR entropy to be compatible with asan in llvm 14.
@ 2024-03-12 14:53 Aaron Conole
2024-03-13 12:11 ` David Marchand
0 siblings, 1 reply; 3+ messages in thread
From: Aaron Conole @ 2024-03-12 14:53 UTC (permalink / raw)
To: dev; +Cc: Ilya Maximets, David Marchand, Michael Santana
GitHub recently started using newer Ubuntu 22.04 LTS container images,
versioned 20240310.1.0 which use 32-bit entropy for ASLR:
$ sudo sysctl -a | grep vm.mmap.rnd
vm.mmap_rnd_bits = 32
vm.mmap_rnd_compat_bits = 16
This breaks builds (such as the one at
https://github.com/DPDK/dpdk/actions/runs/8234334617/job/22515850325) by
causing a random segfault when ASAN is used, because older ASAN gets
confused by memory mappings and crashes.
The issue is fixed in newer releases of LLVM:
https://github.com/llvm/llvm-project/commit/fb77ca05ffb4f8e666878f2f6718a9fb4d686839
https://reviews.llvm.org/D148280
But these are not available in Ubuntu 22.04 image.
This should be fixed by GitHub, but until new images are available
reducing ASLR entropy manually to 28 bits to make builds work.
Reported-at: https://github.com/actions/runner-images/issues/9491
Signed-off-by: Aaron Conole <aconole@redhat.com>
Suggested-by: Ilya Maximets <i.maximets@ovn.org>
---
.github/workflows/build.yml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 776fbf6f30..228aad8289 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -139,6 +139,13 @@ jobs:
.ci/linux-setup.sh
# Workaround on $HOME permissions as EAL checks them for plugin loading
chmod o-w $HOME
+ - name: Reduce ASLR entropy
+ if: env.ASAN == 'true'
+ # Asan in llvm 14 provided in ubuntu-22.04 is incompatible with
+ # high-entropy ASLR configured in much newer kernels that GitHub
+ # runners are using leading to random crashes:
+ # https://github.com/actions/runner-images/issues/9491
+ run: sudo sysctl -w vm.mmap_rnd_bits=28
- name: Build and test
run: .ci/linux-build.sh
- name: Upload logs on failure
--
2.41.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] github: Reduce ASLR entropy to be compatible with asan in llvm 14.
2024-03-12 14:53 [PATCH] github: Reduce ASLR entropy to be compatible with asan in llvm 14 Aaron Conole
@ 2024-03-13 12:11 ` David Marchand
0 siblings, 0 replies; 3+ messages in thread
From: David Marchand @ 2024-03-13 12:11 UTC (permalink / raw)
To: Aaron Conole, Ferruh Yigit, Akhil Goyal,
Jerin Jacob Kollanukkaran, Maxime Coquelin, Ajit Khaparde,
Raslan Darawsheh
Cc: dev, Ilya Maximets, Michael Santana, Thomas Monjalon,
Kevin Traynor, Luca Boccassi, Xueming(Steven) Li
On Tue, Mar 12, 2024 at 3:53 PM Aaron Conole <aconole@redhat.com> wrote:
>
> GitHub recently started using newer Ubuntu 22.04 LTS container images,
> versioned 20240310.1.0 which use 32-bit entropy for ASLR:
>
> $ sudo sysctl -a | grep vm.mmap.rnd
> vm.mmap_rnd_bits = 32
> vm.mmap_rnd_compat_bits = 16
>
> This breaks builds (such as the one at
> https://github.com/DPDK/dpdk/actions/runs/8234334617/job/22515850325) by
> causing a random segfault when ASAN is used, because older ASAN gets
> confused by memory mappings and crashes.
>
> The issue is fixed in newer releases of LLVM:
> https://github.com/llvm/llvm-project/commit/fb77ca05ffb4f8e666878f2f6718a9fb4d686839
> https://reviews.llvm.org/D148280
>
> But these are not available in Ubuntu 22.04 image.
>
> This should be fixed by GitHub, but until new images are available
> reducing ASLR entropy manually to 28 bits to make builds work.
>
> Reported-at: https://github.com/actions/runner-images/issues/9491
> Signed-off-by: Aaron Conole <aconole@redhat.com>
> Suggested-by: Ilya Maximets <i.maximets@ovn.org>
Thanks Aaron, I applied this workaround for now.
Heads up to subtree maintainers.
We have some false positive test failures in GHA for the past days.
Please rebase to DPDK main repository or pick this fix in your trees.
Thanks.
--
David Marchand
^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <20240312114750.68295-1-i.maximets@ovn.org>]
* Re: [PATCH] github: Reduce ASLR entropy to be compatible with asan in llvm 14.
[not found] <20240312114750.68295-1-i.maximets@ovn.org>
@ 2024-03-12 13:28 ` Aaron Conole
0 siblings, 0 replies; 3+ messages in thread
From: Aaron Conole @ 2024-03-12 13:28 UTC (permalink / raw)
To: Ilya Maximets
Cc: ovs-dev, Eelco Chaudron, Dumitru Ceara, David Marchand, ci, dev
Ilya Maximets <i.maximets@ovn.org> writes:
> Starting with image version 20240310.1.0, GitHub runners are using
> 32-bit entropy for ASLR:
>
> $ sudo sysctl -a | grep vm.mmap.rnd
> vm.mmap_rnd_bits = 32
> vm.mmap_rnd_compat_bits = 16
>
> This breaks all the asan-enabled builds, because older asan gets
> confused by memory mappings and crashes with segmentation fault.
>
> The issue is fixed in newer releases of llvm:
> https://github.com/llvm/llvm-project/commit/fb77ca05ffb4f8e666878f2f6718a9fb4d686839
> https://reviews.llvm.org/D148280
>
> But these are not available in Ubuntu 22.04 image.
>
> This should be fixed by GitHub, but until new images are available
> reducing ASLR entropy manually to 28 bits to make builds work.
>
> Reported-at: https://github.com/actions/runner-images/issues/9491
> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
> ---
Acked-by: Aaron Conole <aconole@redhat.com>
We'll probably need something similar in other projects, too... What a
mess.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-13 12:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-12 14:53 [PATCH] github: Reduce ASLR entropy to be compatible with asan in llvm 14 Aaron Conole
2024-03-13 12:11 ` David Marchand
[not found] <20240312114750.68295-1-i.maximets@ovn.org>
2024-03-12 13:28 ` Aaron Conole
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).