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

Packaging: make package-baseline-images croaks when building arm64v8 images #73

Closed
amotl opened this issue Nov 21, 2021 · 5 comments
Closed

Comments

@amotl
Copy link
Member

amotl commented Nov 21, 2021

Hi there,

while working on #64, by running the packaging machinery on a Linux system, we discovered that the Building baseline image for Debian "bullseye" on arm64v8 step croaks when installing libc-bin, coming from

RUN apt-get install --yes --no-install-recommends inetutils-ping nano git build-essential pkg-config libffi-dev ruby ruby-dev

The error manifests itself as

Processing triggers for libc-bin (2.31-13+deb11u2) ...
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
dpkg: error processing package libc-bin (--configure):
 installed libc-bin package post-installation script subprocess returned error exit status 139
Errors were encountered while processing:
 libc-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)
The command '/bin/sh -c apt-get install --yes --no-install-recommends     inetutils-ping nano git     build-essential pkg-config libffi-dev     ruby ruby-dev' returned a non-zero code: 100
Command failed
make: *** [packaging/tasks.mk:13: package-baseline-images] Error 1

With kind regards,
Andreas.

@amotl
Copy link
Member Author

amotl commented Nov 21, 2021

Currently I have no idea why this happens. Some observations and thoughts:

  • Building the baseline images for arm32v7 works flawlessly.
  • Might there be some woes because this was running on an AMD CPU, specifically an AMD Ryzen 5 3600 6-Core Processor (Zen2) [1]?

[1] cat /proc/cpuinfo | grep "model name" | uniq

@amotl
Copy link
Member Author

amotl commented Nov 21, 2021

Hi again,

in this post we outline a minimal example how to reproduce the problem.

  1. Follow the first few sections of https://getkotori.org/docs/development/releasing/packaging.html, specifically
    1.1. Install Docker
    1.2. Install more packages to support multiarch builds: apt-get install qemu-user-static binfmt-support

  2. Invoke this docker run command, targeting arm64v8:

docker run --pull --rm -it --env DEBIAN_FRONTEND=noninteractive arm64v8/debian:bullseye-slim dpkg-reconfigure libc-bin
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
  1. As mentioned above, targeting arm32v7 has no issues:
docker run --pull --rm -it --env DEBIAN_FRONTEND=noninteractive arm32v7/debian:bullseye-slim dpkg-reconfigure libc-bin

With kind regards,
Andreas.

@amotl
Copy link
Member Author

amotl commented Nov 21, 2021

Hi again,

at moby/moby#43039 (comment), we found a solution to this problem. Apparently, we needed a more recent version of qemu-aarch64-static. While it didn't work with version 4.2.1, version 5.0.0 from [1] works like a charm.

$ docker run --pull --rm -it arm64v8/debian:bullseye-slim /bin/sh -c "ldconfig --version"

ldconfig (Debian GLIBC 2.31-13+deb11u2) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Andreas Jaeger.

With kind regards,
Andreas.

[1] http://security.ubuntu.com/ubuntu/pool/universe/q/qemu/qemu-user-static_5.0-5ubuntu9.9_amd64.deb

@amotl
Copy link
Member Author

amotl commented Nov 21, 2021

With 3b029ca, we just updated the documentation and added this to the troubleshooting section, see [2].

[2] https://getkotori.org/docs/development/releasing/packaging.html#troubleshooting

@amotl amotl closed this as completed Nov 21, 2021
@amotl
Copy link
Member Author

amotl commented Nov 21, 2021

Others are also confirming that this has been resolved with Qemu 5, see [3].

[3] https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1928075/comments/15

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

1 participant