This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push: new 8858309 Workaround libstdcpp TLS error (#19010) 8858309 is described below commit 88583095c408ef9ea60f793e7072e3fd4b88e329 Author: Jarek Potiuk <ja...@potiuk.com> AuthorDate: Tue Oct 19 00:03:58 2021 -0100 Workaround libstdcpp TLS error (#19010) Workaround https://github.com/apache/airflow/issues/17546 issue with /usr/lib/x86_64-linux-gnu/libstdc++.so.6: cannot allocate memory in static TLS block. We do not yet a more "correct" solution to the problem but in order to avoid raising new issues by users of the prod image, we implement the workaround now. The side effect of this is slightly (in the range of 100s of milliseconds) slower load for any binary started and a little memory used for Heap allocated by initialization of libstdc++. This overhead is not happening for binaries that already link dynamically libstdc++. --- Dockerfile | 9 +++++++++ Dockerfile.ci | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/Dockerfile b/Dockerfile index 4e4bbe8..088d561 100644 --- a/Dockerfile +++ b/Dockerfile @@ -487,5 +487,14 @@ LABEL org.apache.airflow.distro="debian" \ # to learn more about the way how signals are handled by the image ENV DUMB_INIT_SETSID="1" +# This one is to workaround https://github.com/apache/airflow/issues/17546 +# issue with /usr/lib/x86_64-linux-gnu/libstdc++.so.6: cannot allocate memory in static TLS block +# We do not yet a more "correct" solution to the problem but in order to avoid raising new issues +# by users of the prod image, we implement the workaround now. +# The side effect of this is slightly (in the range of 100s of milliseconds) slower load for any +# binary started and a little memory used for Heap allocated by initialization of libstdc++ +# This overhead is not happening for binaries that already link dynamically libstdc++ +ENV LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libstdc++.so.6" + ENTRYPOINT ["/usr/bin/dumb-init", "--", "/entrypoint"] CMD [] diff --git a/Dockerfile.ci b/Dockerfile.ci index 0e665f3..b4eb465 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -400,6 +400,16 @@ LABEL org.apache.airflow.distro="debian" \ org.opencontainers.image.title="Continuous Integration Airflow Image" \ org.opencontainers.image.description="Installed Apache Airflow with Continuous Integration dependencies" +# This one is to workaround https://github.com/apache/airflow/issues/17546 +# issue with /usr/lib/x86_64-linux-gnu/libstdc++.so.6: cannot allocate memory in static TLS block +# We do not yet a more "correct" solution to the problem but in order to avoid raising new issues +# by users of the prod image, we implement the workaround now. +# The side effect of this is slightly (in the range of 100s of milliseconds) slower load for any +# binary started and a little memory used for Heap allocated by initialization of libstdc++ +# This overhead is not happening for binaries that already link dynamically libstdc++ +ENV LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libstdc++.so.6" + + EXPOSE 8080 ENTRYPOINT ["/usr/bin/dumb-init", "--", "/entrypoint"]