-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Segfault while compiling 24.2 release for linux/amd64 #5625
Comments
When https://github.com/esl/packages was being built, I have a vague recollection of being asked about a similar problem which in the end turned out to be something about docker and qemu. It is a bit odd that it managed to build all Maybe you can have a look at esl/packages and see if there are any hints about what to do about it there. |
@rnewson hi 👋, I'm sorry for poking you out of random but I checked your Dockerfiles and they don't give any tricks to work around segfaults, maybe you can shine some light on this issue? |
Hi, Sorry I don't recall having to work around segfaults (or encountering any). The esl/packages scripts for erlang use docker buildx and cross compilation (that is, they always build on the host architecture, for performance reasons). So perhaps avoiding emulation helps avoid some causes of segfaults during compilation? |
glancing at your dockerfile and it seems you might be attempted cross compilation too. A mistake there could explain things. In yours you set
I found that the cross compilation toolkit did the right thing if I told it only the target system (with |
Thank you @rnewson, I'll give it a try ❤️. |
Unfortunately, using
later final segfault is still during the compilation of boot scripts:
Should we close this issue though? I looks like an issue with docker |
Yes, I think so. There is not much that we can do to help this. If you do find a solution though, please make a note here so that anyone else that comes across this will now what to do. |
https://erlangforums.com/t/otp-25-0-rc3-release-candidate-3-is-released/1317/24 turns out that the problem is a bug/feature of qemu. Not much that we can do about it without compromising the security of all JIT nodes, so if you want this to work, the fix should be in qemu. |
Describe the bug
While trying to update our container to Erlang 24.2 we got into a situation where it will never build due to a segfault:
The host used to compile the Erlang is running M1 chip. The compilation would only crash for
linux/amd64
target and it was not happening for Erlang 23.3.4.10 (everything else was the same).To Reproduce
Dockerfile can be found here: https://github.com/Nebo15/alpine-erlang/blob/master/Dockerfile
Any hints if this is an Erlang thing or maybe we should dig into
qemu
issues in Alpine 3.15 and M1 Mac? (For the official Docker container Alpine 3.15 works just fine.)The text was updated successfully, but these errors were encountered: