You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since ejabberd 17.03, a container image is published in Docker Hub for amd64 architecture.
Since ejabberd 22.05, there is an alternative container image available in GitHub Container Registry. It includes variants for amd64... and arm64 thanks to QEMU. It is built directly from the source code using this Dockerfile. In fact, the image is built automatically for every ejabberd release and every commit using this GitHub Workflow, which uses QEMU to allow building for the arm64 architecture.
Unfortunately, using QEMU + arm64 + Erlang/OTP 25 crashes with segmentation fault. For example, when building the ejabberd container for arm64 using Alpine 3.17, which includes Erlang 25, the action crashes:
#18 [linux/arm64 build 3/10] RUN mix local.hex --force && mix local.rebar --force
#18 1.302 Segmentation fault (core dumped)
#18 ERROR: process "/bin/sh -c mix local.hex --force && mix local.rebar --force" did not complete successfully: exit code: 139
An obvious workaround would be to keep using Alpine 3.16, which includes the safe Erlang/OTP 24 for building those container images, to be able to use QEMU to build the arm64 architecture. This is acceptable now, and upgrade can be delayed hoping that a definitive solution is found in QEMU or Erlang...
But Sando38 has prepared an alternative way to build the container in Github Actions: using the binary installers. In that case, there would be multiple stages in .github/container/Dockerfile, and the METHOD argument would control whether:
the container is built using the binary installers for amd64 and arm64 (used by github actions)
the container is built compiling ejabberd like now (useful to allow anybody build the container quickly when QEMU is not required)
The text was updated successfully, but these errors were encountered:
badlop
changed the title
Building the Container crashes with QEMU + arm64 + Erlang/OTP 25
Building the container crashes with QEMU + arm64 + Erlang/OTP 25
Jan 26, 2023
Alpine 3.17 includes Erlang/OTP 25, and it segfaults when
used in QEMU for arm64.
Revert "Update Alpine to 3.17 to get Elixir 1.14 required by recent libraries"
This reverts commit 43cae92.
make-*: include musl build in make-binaries
Ctr actions: use github runners to provide bootstrap erlang
- adjust make-binaries script to use github runners' installed erlang
for bootstrapping
- this reduces the need to build an unnecessary toolchain for glibc
based binaries
Since ejabberd 17.03, a container image is published in Docker Hub for amd64 architecture.
Since ejabberd 22.05, there is an alternative container image available in GitHub Container Registry. It includes variants for amd64... and arm64 thanks to QEMU. It is built directly from the source code using this Dockerfile. In fact, the image is built automatically for every ejabberd release and every commit using this GitHub Workflow, which uses QEMU to allow building for the arm64 architecture.
Unfortunately, using QEMU + arm64 + Erlang/OTP 25 crashes with segmentation fault. For example, when building the ejabberd container for arm64 using Alpine 3.17, which includes Erlang 25, the action crashes:
The issue is tracked in QEMU's bug tracker: Erlang/OTP 25 JIT on AArch64 fails in user mode emulation
An obvious workaround would be to keep using Alpine 3.16, which includes the safe Erlang/OTP 24 for building those container images, to be able to use QEMU to build the arm64 architecture. This is acceptable now, and upgrade can be delayed hoping that a definitive solution is found in QEMU or Erlang...
But Sando38 has prepared an alternative way to build the container in Github Actions: using the binary installers. In that case, there would be multiple stages in
.github/container/Dockerfile
, and the METHOD argument would control whether:The text was updated successfully, but these errors were encountered: