Skip to content
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

cppbuild failes tests when building docker container targeting ubuntu 22.04 #1655

Open
rafalpiotrowski opened this issue Sep 6, 2024 · 2 comments

Comments

@rafalpiotrowski
Copy link

Hi,
I am trying to build docker container from latest version of aeron repo and I am getting few failed tests.

`
585.7 The following tests FAILED:

585.7 91 - rejectImageTestW (Failed)

585.7 102 - udp_channel_test (Failed)

585.7 116 - name_resolver_test (SEGFAULT)

585.7 124 - c_local_addresses_test (Failed)

585.7 Errors while running CTest
`

Here is the Dockerfile I use to do it

`
ARG VERSION="22.04"
FROM ubuntu:${VERSION} as builder

RUN apt-get update && apt-get install -y
gcc
g++
make
tar
zlib1g-dev
libbsd-dev
uuid-dev
curl
gnupg
ca-certificates
git
doxygen
python3

RUN curl -s https://repos.azul.com/azul-repo.key | gpg --dearmor -o /usr/share/keyrings/azul.gpg &&
echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" | tee /etc/apt/sources.list.d/zulu.list &&
apt-get update && apt-get install -y zulu17-jdk

ENV JAVA_HOME=/usr/lib/jvm/zulu17
BUILD_JAVA_HOME=/usr/lib/jvm/zulu17
BUILD_JAVA_VERSION=17
GRADLE_OPTS="-Dorg.gradle.daemon=false -Dorg.gradle.java.installations.auto-detect=false -Dorg.gradle.warning.mode=fail"

RUN git clone https://github.com/real-logic/aeron.git /opt/aeron
WORKDIR /opt/aeron

FROM builder as essentials-build
RUN cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors --package

FROM scratch AS essentials-artifacts
COPY --from=essentials-build /opt/aeron/cppbuild/Release/*.tar.gz /
`

command to run it is
docker build cppbuild/ubuntu --shm-size=256m

note that I have increase the shm size 245MB since witht he default more test were failing indicating low storage issue.

Attached is the output showing the error in details.

docker-build-test-failing.log

@marc-adaptive
Copy link
Contributor

marc-adaptive commented Sep 10, 2024

Hi Rafal,

The failing tests are tests that bind to ipv6 loopback interface (::1). The default behavior for docker is to enable ipv6 loopback except if the kernel does not have ipv6 support or ipv6 is disabled. moby/moby#47062.

If for some reason ipv6 is disabled for new namespaces only, you can use --network host (as argument to docker build or RUN in dockerfile) to use your host's network namespace, if ipv6 is enabled on your host.
Alternatively, you can just skip tests with the flag --no-unit-tests as an argument to the cppbuild script.

We typically run docker build with 1G of shm size.

@rafalpiotrowski
Copy link
Author

thank you! will try this out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants