Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qemu error #583

Closed
kwonglau opened this issue Oct 2, 2022 · 8 comments
Closed

qemu error #583

kwonglau opened this issue Oct 2, 2022 · 8 comments

Comments

@kwonglau
Copy link

kwonglau commented Oct 2, 2022

Getting a Segmentation fault error when building a mutli-arch image

 > [linux/arm64 5/5] RUN rabbitmq-plugins enable rabbitmq_consistent_hash_exchange:
#0 1.284 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#0 1.298 Segmentation fault
------
Dockerfile:11
--------------------
   9 |     #RUN apt-get -y install qemu-system
  10 |     
  11 | >>> RUN rabbitmq-plugins enable rabbitmq_consistent_hash_exchange
  12 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c rabbitmq-plugins enable rabbitmq_consistent_hash_exchange" did not complete successfully: exit code: 139

I'm using a intel base mac to build the image

Dockerfile:

FROM rabbitmq:3.11.0

RUN apt-get update

RUN apt-get -y autoremove

RUN apt-get -y upgrade

RUN rabbitmq-plugins enable rabbitmq_consistent_hash_exchange

command:

docker buildx build --platform linux/amd64,linux/arm64/v8 \
  -t -rabbitmq:3.11.0 . \
  --push
@kwonglau
Copy link
Author

kwonglau commented Oct 2, 2022

there is no issue with rabbitmq:3.10.6

@tianon
Copy link
Member

tianon commented Oct 3, 2022

This sounds like it's probably a bug in QEMU's emulation -- if you're using Docker Desktop (and are on the latest up-to-date version), I would suggest filing an issue with details on https://github.com/moby/qemu.

@siwa-pparzer
Copy link

got the same issue when building rabbitmq on an arm64 drone-runner, building an amd64 image:

FROM --platform=linux/amd64 rabbitmq:latest
ARG VHOST

RUN rabbitmq-plugins enable --offline rabbitmq_management
RUN rabbitmq-plugins enable --offline rabbitmq_stomp
RUN rabbitmq-plugins enable --offline rabbitmq_web_stomp
RUN echo "stomp.default_vhost = $VHOST" >> /etc/rabbitmq/rabbitmq.conf

errors with

#5 [2/5] RUN rabbitmq-plugins enable --offline rabbitmq_management
#5 1.617 Segmentation fault (core dumped)
#5 ERROR: executor failed running [/bin/sh -c rabbitmq-plugins enable --offline rabbitmq_management]: exit code: 139

 > [2/5] RUN rabbitmq-plugins enable --offline rabbitmq_management:

#5 1.617 Segmentation fault (core dumped)

ERROR: failed to solve: executor failed running [/bin/sh -c rabbitmq-plugins enable --offline rabbitmq_management]: exit code: 139

already tried different tags:

latest, 3.10, 3.10.6, management - with the same result

@michaelklishin
Copy link
Collaborator

@siwa-pparzer you are looking at erlang/otp#6340, which affects multi-arch builds. That PR will likely only ship in Erlang 25.1.

@sagimann
Copy link

sagimann commented Dec 5, 2022

I'm getting the exact same error, but when building arm6 only (not multi-arch). If this is resolved in Erlang 25.1 as @michaelklishin mentioned, is it somehow possible to upgrade erlang inside the Rabbit 3.11 docker? I tried to upgrade it through apt-get inside the docker:

FROM rabbitmq-3.11:management
apt-get install -y erlang

It installed erlang 25.1 however the same error occured during build afterwards. Maybe rabbitmq didn't use the new version? Is there some post-install step I am missing?

@lukebakken
Copy link
Collaborator

It appears that erlang/otp#6340 only lives in master at the moment:

https://github.com/erlang/otp/pull/6340/commits

C:\Users\bakkenl\development\erlang\otp [master ≡]
> git branch --contains 8da7a9353783981fde60176b922a8db347533fbb
* master

is it somehow possible to upgrade erlang inside the Rabbit 3.11 docker?

Sort of, you'd have to fork this repo and change the Dockerfile to compile Erlang from master. The RabbitMQ docker image uses Erlang compiled from source.

@lukebakken
Copy link
Collaborator

@sagimann this branch will build the Ubuntu images using Erlang master:

https://github.com/lukebakken/rabbitmq-1/tree/lukebakken/erlang-master

@siwa-pparzer
Copy link

rabbitmq updated the OTP Version to 25.2
eb98ea3
but the error still occurs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants