binfmt: Segmentation fault in latest binfmt image
Minimal Reproduce Steps
-
Here is the Dockerfile:
FROM ubuntu:22.04 RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl -
GitHub Action Job:
name: test
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64
#image: tonistiigi/binfmt:qemu-v7.0.0-28
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: login to registry
uses: docker/login-action@v3
with:
registry: docker.io
username: xxxx
password: xxxx
- name: Build and push image
uses: docker/build-push-action@v6
with:
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
test:latest
- The image building will fail with the following logs:
...
#8 76.59 146 added, 0 removed; done.
#8 76.75 Setting up libcurl4:arm64 (7.81.0-1ubuntu1.20) ...
#8 76.76 Setting up curl (7.81.0-1ubuntu1.20) ...
#8 76.77 Processing triggers for libc-bin (2.35-0ubuntu3.8) ...
#8 76.85 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#8 77.41 Segmentation fault (core dumped)
#8 77.49 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#8 77.96 Segmentation fault (core dumped)
#8 77.97 dpkg: error processing package libc-bin (--configure):
#8 77.97 installed libc-bin package post-installation script subprocess returned error exit status 139
#8 77.97 Processing triggers for ca-certificates (20240203~22.04.1) ...
#8 78.24 Updating certificates in /etc/ssl/certs...
#8 96.93 0 added, 0 removed; done.
#8 96.93 Running hooks in /etc/ca-certificates/update.d...
#8 96.96 done.
#8 97.06 Errors were encountered while processing:
#8 97.06 libc-bin
#8 97.14 E: Sub-process /usr/bin/dpkg returned an error code (1)
#8 ERROR: process "/bin/sh -c apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl" did not complete successfully: exit code: 100
------
> [linux/arm64 2/2] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl:
77.97 dpkg: error processing package libc-bin (--configure):
77.97 installed libc-bin package post-installation script subprocess returned error exit status 139
77.97 Processing triggers for ca-certificates (20240203~22.04.1) ...
78.24 Updating certificates in /etc/ssl/certs...
96.93 0 added, 0 removed; done.
96.93 Running hooks in /etc/ca-certificates/update.d...
96.96 done.
97.06 Errors were encountered while processing:
97.06 libc-bin
97.14 E: Sub-process /usr/bin/dpkg returned an error code (1)
------
./Dockerfile:3
--------------------
1 | FROM ubuntu:22.04
2 |
3 | >>> RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl
4 |
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl" did not complete successfully: exit code: 100
Reference
builder-a512d6dc-02fb-482e-ae0e-6148721abea8/builder-a512d6dc-02fb-482e-ae0e-6148721abea80/wx4ps25bomstc0f23cechrmij
Check build summary support
Build summary supported!
Error: buildx failed with: ERROR: failed to solve: process "/bin/sh -c apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl" did not complete successfully: exit code: 100
...
How to work around
Use tonistiigi/binfmt:qemu-v7.0.0-28. The current latest tonistiigi/binfmt is qemu-v9.2.0-51. I guess there may have some unstable changes in the latest version.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 20
- Comments: 24 (2 by maintainers)
Commits related to this issue
- Change multiplatform to false to fix error with lib we rely on temp - we can revert back to true when they fix the issue https://github.com/tonistiigi/binfmt/issues/240 — committed to ministryofjustice/hmpps-visit-allocation-api by adaviesMOJ 2 years ago
- use suggested workaround image Based on information from: https://github.com/tonistiigi/binfmt/issues/240 — committed to ministryofjustice/hmpps-github-actions by james-jdgtl 2 years ago
- Update deps and run ktlint for new formatting (#28) * Update deps and run ktlint for new formatting * Change multiplatform to false to fix error with lib we rely on temp - we can revert back to... — committed to ministryofjustice/hmpps-visit-allocation-api by adaviesMOJ 2 years ago
- Hotfix/pin qemu image (#71) * use suggested workaround image Based on information from: https://github.com/tonistiigi/binfmt/issues/240 * reset to @v2 in preparation for PR — committed to ministryofjustice/hmpps-github-actions by james-jdgtl 2 years ago
- set image: tonistiigi/binfmt:qemu-v7.0.0-28 workaround for https://github.com/tonistiigi/binfmt/issues/240 — committed to ankudinov/avd by ankudinov 2 years ago
- 修正 QEMU 在模拟 arm64 运行 libc-bin 配置脚本时崩溃 https://github.com/tonistiigi/binfmt/issues/240 — committed to IabSDocker/gitlab-ce by IabSDocker 2 years ago
- Switch to specific qemu version, as suggested in https://github.com/tonistiigi/binfmt/issues/240 — committed to OpenConext/OpenConext-BaseContainers by baszoetekouw 2 years ago
- github: Pin a specific image for QEMU for Docker This fixes temporary breakage in building arm64 docker images on x86_64; see https://github.com/docker/setup-qemu-action/issues/198 and https://github... — committed to mstorsjo/llvm-mingw by mstorsjo 2 years ago
- Merge #6586: fix: revert deployment images back to Ubuntu 22.04 LTS (`jammy`), pin QEMU to avoid segfault 20524e48150c1552e60e833b4b42684b734e0040 fix: pin version of QEMU to avoid segfault (Kittywhi... — committed to dashpay/dash by PastaPastaPasta 2 years ago
- Merge #6586: fix: revert deployment images back to Ubuntu 22.04 LTS (`jammy`), pin QEMU to avoid segfault 20524e48150c1552e60e833b4b42684b734e0040 fix: pin version of QEMU to avoid segfault (Kittywhi... — committed to dashpay/dash-dev-branches by PastaPastaPasta 2 years ago
- Fix GHA segfault on ubuntu-jammy for libc-bin * backtrack binfmt to v7 via https://github.com/tonistiigi/binfmt/issues/240 — committed to myoung34/docker-github-actions-runner by myoung34 2 years ago
- ci: Temporary hotfix for the setup-qemu-action Refs: * https://github.com/tonistiigi/binfmt/issues/240 * https://github.com/docker/setup-qemu-action/issues/198 — committed to j3soon/ros2-essentials by j3soon 2 years ago
- Use tonistiigi/binfmt:qemu-v7.0.0-28 in CI See https://github.com/tonistiigi/binfmt/issues/240 Signed-off-by: Evan Lezar <elezar@nvidia.com> — committed to NVIDIA/k8s-samples by elezar 2 years ago
- fix(ci): use tonistiigi/binfmt:qemu-v7.0.0-28 in qemu action Issue: - https://github.com/tonistiigi/binfmt/issues/240 - https://github.com/rockcrafters/.build/actions/runs/13438845745/job/375484250... — committed to rockcrafters/.build by cjdcordeiro 2 years ago
- Use tonistiigi/binfmt:qemu-v7.0.0-28 in CI See https://github.com/tonistiigi/binfmt/issues/240 Signed-off-by: Evan Lezar <elezar@nvidia.com> — committed to NVIDIA/k8s-samples by elezar 2 years ago
- Pin binfmt image for QEMU emulator Workaround for known issue: https://github.com/tonistiigi/binfmt/issues/240 — committed to drasi-project/drasi-platform by amansinghoriginal 2 years ago
- Pin binfmt image for Setup QEMU Action Avoid segment fault issue here - https://github.com/tonistiigi/binfmt/issues/240 Also set CARGO_BUILD_JOBS to 1 to avoid memory issues — committed to drasi-project/drasi-platform by amansinghoriginal 2 years ago
- Pin binfmt image for Setup QEMU Action Avoid segment fault issue here - https://github.com/tonistiigi/binfmt/issues/240 Also set CARGO_BUILD_JOBS to 1 to avoid memory issues — committed to drasi-project/drasi-platform by amansinghoriginal 2 years ago
- Rollback buildkit to fix Debian 11 libc seg fault See https://github.com/tonistiigi/binfmt/issues/240#issuecomment-2668618554 and many issues over years — committed to gocd/gocd by chadlwilson 2 years ago
- Fix: Docker イメージのビルドに失敗する問題を再々々度修正 これで直ってほしい… ref: https://github.com/tonistiigi/binfmt/issues/240 ref: https://github.com/NVIDIA/cuda-quantum/pull/2651 — committed to Aivis-Project/AivisSpeech-Engine by tsukumijima 2 years ago
It looks like every release since
7.0.0-28until 3 days ago were pre-releases. The way the release workflow works, that means none of the prereleases caused thelatesttag to be updated in the image.Unless I’m missing something, that means people using the latest tag just picked up 2 years worth of changes in one hit, which might make it tricky to track down the root cause 😟
Updated readme to
LMK if more hints for version selection would be needed.
My input to the topic:
docker run --installdoes, but side effects in Docker buildx are there even after image is removed. So for me downgrading toqemu-v7.0.0-28worked, but ONLY AFTER I cleared the remainings of the previous installation.So to always make sure that no matter which runner is chosen to run my build, I always run this first:
So for anyone wondering why downgrading doesn’t work - try uninstalling previous platforms first.
@tonistiigi and @crazy-max I think everyone would appreciate some comments on that. The challenge here is that
docker/setup-qemu-actionis reasonably popular in the field. It looks like not everyone has a weekly/daily build, but the number of affected workflows will only grow. This overall reveals the opportunistic nature of open source, when many CI pipelines rely on some actions without checking all the details first and hoping that there is some maintenance. This however is a good wakeup call and I’m currently looking for a way to excludedocker/setup-qemu-actionfrom our builds and replace with redhat-actions or similar. However I certainly hope thattonistiigi/binfmtcan be still saved. Any comments to highlight the future of this repository would be much appreciated. Even if you decide that there is no capacity to maintain this - clarifying that to the community is very important.Using
docker/setup-qemu-action@v3withimage: tonistiigi/binfmt:qemu-v7.0.0-28onubuntu-22.04w/ latest Ubuntu kernel was failing for me when I was trying to build arm64 on amd64 machines. (Ref: https://github.com/NVIDIA/cuda-quantum/actions/runs/13294941766/job/37126651103)Our only workaround available for now is to pin our custom runners to an older Ubuntu kernel, which isn’t a viable long-term solution.
Try running on ARM runners to have a definitive answer - use
ubuntu-24.04-armorubuntu-22.04-arm.But in my experience there were no issues with compile jobs using QEMUv7 running aarch64 jobs on x86_64.
ℹ
tonistiigi/binfmt:latestistonistiigi/binfmt:qemu-v9.2.0since Feb 11, 2025.I’ve tried
tonistiigi/binfmt:qemu-v8.1.5-43and that’s is crashing on my setup, just likev8.1.5-45, whilev7.0.0-28works.We are also facing this issue with image “tonistiigi/binfmt:latest” on Ubuntu 24.04 for linux/ppc64le architecture. If we use the version 1 year before i.e. “tonistiigi/binfmt:qemu-v8.1.5-43” then there is no segmentation fault.