Error deploying app on M1 Pro - qemu: uncaught target signal 11 (Segmentation fault) - core dumped

I am trying to build a new project and keep hitting this error:

 => ERROR [builder  6/17] RUN mix deps.get --only prod                                                                                                                                0.7s
------
 > [builder  6/17] RUN mix deps.get --only prod:
#16 0.724 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#16 0.734 Segmentation fault
------
Error failed to fetch an image or build from source: error building: executor failed running [/bin/sh -c mix deps.get --only $MIX_ENV]: exit code: 139

Is this an M1 problem? I’ve had to change my image to hexpm/elixir:1.12.2-erlang-24.0.3-debian-bullseye-20210902-slim after checking that various alpine build could have problems building on M1, not sure how true that is.

Anyone with a working Dockerfile I can test with?

The M1 still has issues for some images. The simplest fix is deploying with the --remote-only flag which will use a remote builder (docker daemon) running on Fly instead of the local daemon.

Thanks. This worked.

Are there images that have proved to work well with M1? I’d like the option to build locally and compare the performance.

Glad that worked. The issue usually comes up when compiling native extensions in qemu and something in the compiler toolchain isn’t compatible. Unfortunately the error doesn’t give enough info to narrow it down.

1 Like