Segfault on 25.x when building via qemu for arm64
razielgn opened this issue · comments
Hello, since 25.0 got released, I am not able to get past this step on arm64
builds via qemu. Previous 24.x were working as expected.
I am not sure what could be the cause, probably unrelated to the effort made in this repo, but I felt it was useful to open an issue here in case somebody else also ran into this.
> [builder 4/12] RUN mix local.hex --force && mix local.rebar --force:
#14 1.761 Segmentation fault (core dumped)
------
Dockerfile:9
--------------------
8 |
9 | >>> RUN mix local.hex --force && \
10 | >>> mix local.rebar --force
11 |
--------------------
error: failed to solve: process "/bin/sh -c mix local.hex --force && mix local.rebar --force" did not complete successfully: exit code: 139
Here is a minimal repo that reproduces the issue: https://github.com/razielgn/test-arm64-elixir-docker-build-on-qemu-crash/runs/7090312681?check_suite_focus=true
EDIT: this image works correctly when building natively on ARM.
Quite possibly there's nothing wrong with code in this repository, supposedly there's a bug in qemu that causes problems when Erlang 25's JIT is used, see discussion on erlangforums
In my experience running different architectures in docker using qemu is really fragile. Other than the performance issues it seems to crash often enough that is not usable imo.