Docker Image Build Failing with Segmentation Fault (Previously Worked)

A Docker image build that was working fine a few days ago is now consistently failing with the following error:

#10 109.2 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#10 109.3 Segmentation fault (core dumped)
#10 109.4 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#10 109.5 Segmentation fault (core dumped)
#10 109.5 dpkg: error processing package libc-bin (--configure):
#10 109.5  installed libc-bin package post-installation script subprocess returned error exit status 139

The issue occurs with the following agent and image version:

machine-agent version 1.0.90075-2d9411a (image: "ubuntu-2004:2024.11.1")

However, the same Docker image build worked successfully with:

machine-agent version 1.0.90032-6c3de00 (image: "ubuntu-2004:2024.11.1")

Since the base image remains the same, what could be causing this sudden failure? Any insights would be appreciated!

It seems to be because of recent update to tonistiigi/binfmt

Did you find a workaround? I’m seeing the same issue. Started to fail a couple of weeks ago…

To fix the errors we executed the following command before running buildx
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes -c yes.
This was mentioned as a workaround for related issue in qemu - https://github.com/docker/buildx/issues/1170#issuecomment-1159350550