-
Notifications
You must be signed in to change notification settings - Fork 19
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
Fixes #365 - Replace valgrind with sanitizers in Containerfile #366
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,19 +19,19 @@ | |
|
||
FROM registry.access.redhat.com/ubi8/ubi:latest as builder | ||
|
||
RUN dnf -y --setopt=tsflags=nodocs install \ | ||
RUN dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \ | ||
http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-4.el8.noarch.rpm \ | ||
http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/centos-stream-repos-8-4.el8.noarch.rpm \ | ||
&& dnf -y --setopt=tsflags=nodocs install epel-release \ | ||
&& dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install epel-release \ | ||
&& dnf config-manager --set-enabled powertools \ | ||
&& dnf clean all | ||
|
||
RUN dnf -y --setopt=tsflags=nodocs install \ | ||
RUN dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \ | ||
gcc gcc-c++ make cmake \ | ||
cyrus-sasl-devel openssl-devel libuuid-devel \ | ||
python3-devel swig \ | ||
libwebsockets-devel libnghttp2-devel \ | ||
wget patch findutils git valgrind \ | ||
wget patch findutils git libasan libubsan libtsan \ | ||
&& dnf clean all -y | ||
WORKDIR /build | ||
COPY . . | ||
|
@@ -44,21 +44,21 @@ RUN .github/scripts/compile.sh | |
|
||
FROM registry.access.redhat.com/ubi8/ubi:latest | ||
|
||
RUN dnf -y --setopt=tsflags=nodocs update \ | ||
&& dnf -y --setopt=tsflags=nodocs install \ | ||
RUN dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs update \ | ||
&& dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \ | ||
http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-4.el8.noarch.rpm \ | ||
http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/centos-stream-repos-8-4.el8.noarch.rpm \ | ||
&& dnf -y --setopt=tsflags=nodocs install epel-release \ | ||
&& dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install epel-release \ | ||
&& dnf config-manager --set-enabled powertools \ | ||
&& dnf clean all | ||
|
||
# gdb and valgrind are part of final image as they can be used as debug options for Skupper | ||
RUN dnf -y --setopt=tsflags=nodocs install \ | ||
RUN dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \ | ||
glibc \ | ||
cyrus-sasl-lib cyrus-sasl-plain cyrus-sasl-gssapi libuuid openssl \ | ||
python3 \ | ||
libwebsockets libnghttp2 \ | ||
gdb valgrind \ | ||
gdb libasan libubsan libtsan \ | ||
gettext hostname iputils \ | ||
&& dnf clean all | ||
|
||
|
@@ -74,5 +74,10 @@ ARG version=latest | |
ENV VERSION=${version} | ||
ENV QDROUTERD_HOME=/home/skrouterd | ||
|
||
ENV ASAN_OPTIONS="disable_coredump=0 detect_odr_violation=0 strict_string_checks=1 detect_stack_use_after_return=1 check_initialization_order=1 strict_init_order=1 detect_invalid_pointer_pairs=2" | ||
ENV LSAN_OPTIONS="disable_coredump=0 suppressions=/lsan.supp" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lsan needs to use one solution (to have asan without lsan) would be to define here |
||
ENV TSAN_OPTIONS="disable_coredump=0 history_size=4 second_deadlock_stack=1 suppressions=/tsan.supp" | ||
ENV UBSAN_OPTIONS="disable_coredump=0 print_stacktrace=1 print_summary=1" | ||
|
||
EXPOSE 5672 55672 5671 | ||
CMD ["/home/skrouterd/bin/launch.sh"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
|
@@ -33,7 +33,11 @@ fi | |
if [[ $QDROUTERD_DEBUG = "gdb" ]]; then | ||
exec gdb -batch -ex "run" -ex "bt" --args skrouterd $ARGS | ||
elif [[ $QDROUTERD_DEBUG = "valgrind" ]]; then | ||
exec valgrind skrouterd $ARGS | ||
exec skrouterd_asan $ARGS | ||
Comment on lines
35
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. backward compatibility ftw! |
||
elif [[ $QDROUTERD_DEBUG = "asan" ]]; then | ||
exec skrouterd_asan $ARGS | ||
elif [[ $QDROUTERD_DEBUG = "tsan" ]]; then | ||
exec skrouterd_tsan $ARGS | ||
else | ||
exec skrouterd $ARGS | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The image build used to take 6 mins on GHA, this PR ran 14 minutes. Too bad. Each of these builds is different (different gcc options) so there is no space for any caching or such ways.