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

Installing/Building Erlang causes segmentation fault on Raspberry Pi OS Bullseye #8696

Closed
MehmetCagriK opened this issue Aug 3, 2024 · 3 comments
Assignees
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM
Milestone

Comments

@MehmetCagriK
Copy link

Describe the bug
I am trying to use asdf to install Erlang OTP 27.0.1 . At first, it was giving me Year 2038 error. I disabled it via configuration. Installation process ends with segmentation fault when trying to compile prim_eval.abstr . I am having the same error when I try to build from the scratch.

To Reproduce

  1. asdf install erlang 27.0.1

Expected behavior
Erlang 27.0.1 successfully installed

Affected versions
27.0.1
Earlier versions such as 26.0.2 is completely fine.

Additional context
My operating system is Raspberry Pi OS Bullseye. Here is my OS and Kernel version

Hardware: Raspberry Pi 4
Operating System: Raspbian GNU/Linux 11 (bullseye)
Kernel: Linux 6.1.21-v8+
Architecture: arm64

Resulting Log:

asdf install erlang 27.0.1
Downloading kerl...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 82830  100 82830    0     0   631k      0 --:--:-- --:--:-- --:--:--  627k
ERROR: 'asdf_27.0.1' is not a kerl-managed Erlang/OTP installation.
Build 'asdf_27.0.1' has been deleted.
Extracting source code for normal build...
Building (normal) Erlang/OTP 27.0.1 (asdf_27.0.1); please wait...
Initializing (build) log file at /home/pi/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_build_27.0.1.log.
automake: error: 'configure.ac' is required
autoconf: error: no input file
APPLICATIONS DISABLED (See: /home/pi/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_build_27.0.1.log)
 * jinterface     : No Java compiler found

APPLICATIONS INFORMATION (See: /home/pi/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_build_27.0.1.log)
 * wx             : wxWidgets was not compiled with --enable-webview or wxWebView developer package is not installed, wxWebView will NOT be available
 * erts           : 
 *                  WARNING:
 *                    Note that this runtime system will *not* be year

historERROR: build failed.
=== Leaving application snmp
gmake[2]: Leaving directory '/home/pi/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/lib/snmp'
gmake[1]: Leaving directory '/home/pi/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/lib'
 MAKE   erts
gmake[1]: Entering directory '/home/pi/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/erts/preloaded/src'
 ERLC   prim_eval.abstr
Segmentation fault
gmake[1]: *** [Makefile:128: prim_eval.abstr] Error 139
gmake[1]: Leaving directory '/home/pi/.asdf/plugins/erlang/kerl-home/builds/asdf_27.0.1/otp_src_27.0.1/erts/preloaded/src'
gmake: *** [Makefile:492: erts] Error 2
@MehmetCagriK MehmetCagriK added the bug Issue is reported as a bug label Aug 3, 2024
@AnAccountForReportingBugs
Copy link

AnAccountForReportingBugs commented Aug 3, 2024

This might be the same underlying problem as in #8652. I can check where I segfault when building 27.0.1, but IIRC, it was the first time make tried to use erlc to compile something during build. If they are the same, this a duplicate of that bug and my fixes will work for both.

Edit 1: Perhaps you could try building 27.0 and see if it has a segfault in the same place as that bug.

Edit 2: Yep. That’s the same spot I segfault on now. So it is the invalid page size of Erlc for the platform causing the problem.

@lexprfuncall
Copy link
Contributor

I checked out OTP-27.0.1 and did a build and test on an Aarch64 (something with Neoverse V2 cores) running CentOS Stream release 9. For better or worse, I did not see a SIGSEGV when running erlc.

@MehmetCagriK are you able to get a stack trace showing where the segmentation fault occurs? How much DRAM does your Raspberry Pi 4 have?

@garazdawi
Copy link
Contributor

Solved in 27.1 through #8702.

@garazdawi garazdawi added this to the OTP-27.1 milestone Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM
Projects
None yet
Development

No branches or pull requests

6 participants