-
Notifications
You must be signed in to change notification settings - Fork 616
Closed
Labels
Description
Multi-image builds segfault with the famous: installed libc-bin package post-installation script subprocess returned error exit status 139 , adding ||true in dockerfile does not help , since dpkg does not even extract new packages
Countermeasures tried:
rm /var/cache/ldconfig/aux-cache 2>/dev/null|| true ;/sbin/ldconfig || trueapt-get -y --reinstall install libc-bin- lowering IPv6 Preferences in
/etc/gai.conf - (not possible in docker ,but suggested )
options single-request timeout:2 attempts:2 ndots:2" /etc/resolv.conf || (echo "options single-request timeout:2 attempts:2 ndots:2" >> /etc/resolv.conf )
Nothing helps (!)
Build command line:
time docker buildx build --progress plain --network=host --memory-swap -1 --memory 1024 --platform=linux/amd64 --network=host --memory-swap -1 --memory 1024 -f Dockerfile .
Example Dockerfile (testing , the real ones are a bit more complex ;) )
FROM ubuntu:20.04
RUN uname -m
RUN id -un
RUN hostname
RUN apt-get update
RUN apt-get -y install php-cli || true
RUN apt-get -y install curl || true
RUN echo precedence ::ffff:0:0/96 100|tee -a /etc/gai.conf
RUN dpkg --configure -D 777 libc-bin
RUN dpkg --configure -a
RUN /usr/bin/curl -sS https://getcomposer.org/installer -o /tmp/composer.installer.php
RUN php /tmp/composer.installer.php --install-dir=/usr/local/bin --filename=composer
RUN export LC_ALL=C.UTF-8 && apt-get update && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/apache2 && LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/pkg-gearman && apt-get update && apt-get install -y --no-install-recommends php7.4 php7.4-cli || true && apt-get autoremove -y --force-yes
RUN apt-get update && apt-get dist-upgrade
Example Log:
#11 [ 8/14] RUN echo precedence ::ffff:0:0/96 100|tee -a /etc/gai.conf
#11 CACHED
#12 [ 9/14] RUN dpkg --configure -D 777 libc-bin
#12 0.402 D000001: ensure_diversions: new, (re)loading
#12 0.406 D000001: process queue pkg libc-bin:amd64 queue.len 0 progress 1, try 1
#12 0.407 D000040: checking dependencies of libc-bin:amd64 (- <none>)
#12 0.407 D000400: checking group ...
#12 0.407 D000400: checking possibility -> libc6
#12 0.408 D000400: checking non-provided pkg libc6:amd64
#12 0.409 D000400: is installed, ok and found
#12 0.409 D000400: found 3
#12 0.410 D000400: found 3 matched 0 possfixbytrig -
#12 0.410 D000400: checking group ...
#12 0.410 D000400: checking possibility -> libc6
#12 0.410 D000400: checking non-provided pkg libc6:amd64
#12 0.410 D000400: is installed, ok and found
#12 0.410 D000400: found 3
#12 0.410 D000400: found 3 matched 0 possfixbytrig -
#12 0.410 D000040: ok 2 msgs >><<
#12 0.411 D000040: checking Breaks
#12 0.413 Setting up libc-bin (2.31-0ubuntu9) ...
#12 0.432 D000002: fork/exec /var/lib/dpkg/info/libc-bin.postinst ( configure 2.31-0ubuntu9 )
#12 0.738 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#12 1.082 Segmentation fault (core dumped)
#12 1.229 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#12 1.647 Segmentation fault (core dumped)
#12 1.659 dpkg: error processing package libc-bin (--configure):
#12 1.659 installed libc-bin package post-installation script subprocess returned error exit status 139
#12 1.661 D000001: ensure_diversions: same, skipping
#12 1.714 Errors were encountered while processing:
#12 1.714 libc-bin
#12 ERROR: executor failed running [/bin/sh -c dpkg --configure -D 777 libc-bin]: buildkit-runc did not terminate successfully
What to do ?
wcurry, bdruth, rajsahae, dennisameling, carlonluca and 31 more