-
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
mix deps.get crashes on 26.2.3 - M2 Mac #8238
Comments
If you want I can supply the erl_crash.dump |
Does the fault happen in 26.2.2? |
No. I also just run into this - 26.2.2 is fine, 26.2.3 is not |
No 26.2.2 works without any issues Verstuurd vanaf mijn iPhoneOp 8 mrt 2024 om 14:19 heeft Michal Kuratczyk ***@***.***> het volgende geschreven:
No. I also just run into this - 26.2.2 is fine, 26.2.3 is not
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I will try to reproduce it locally and, if so, provide a minimal example. |
Here is how far I could isolate it so this far:
Note Hex is installed from an archive. I cannot reproduce this if I compile Hex from scratch. So my theory is either:
|
Here you go. Compile this Erlang file with Erlang/OTP 24.3:
And now run it with Erlang/OTP 26.2.3:
I believe 24.3 should still work on 26.2.3. So that's indeed a bug! |
Same problem on a raspberry pi 5 |
Btw, a temporary fix is to run |
I am seeing the same issue on my M1 Mac and Linux on Running
Weirdly, But running pretty much anything else fails with a segfault:
Additionally, @josevalim's suggested fix of recompiling hex also results in a segfault:
(The above commands were all executed inside a clean Ubuntu container with a fresh install of ASDF, Erlang 26.2.3 and Elixir 1.16.2). |
@jimsynz After running @josevalim temporary fix, I'm unable to reproduce any of the issues that you're experiencing with my M1 MacBook Pro. For example, ➜ asdf version
v0.14.0-ccdd47d
➜ cat .tool-versions
elixir 1.16.2-otp-26
erlang 26.2.3
➜ mix archive.install github hexpm/hex branch latest
* Getting new package (https://github.com/hexpm/hex.git - origin/latest)
remote: Enumerating objects: 13790, done.
remote: Counting objects: 100% (1245/1245), done.
remote: Compressing objects: 100% (605/605), done.
remote: Total 13790 (delta 755), reused 1003 (delta 583), pack-reused 12545
All dependencies are up to date
warning: in order to compile .xrl files, you must add "compilers: [:leex] ++ Mix.compilers()" to the "def project" section of hex's mix.exs
(mix 1.16.2) lib/mix/tasks/compile.leex.ex:69: Mix.Tasks.Compile.Leex.preload/1
(mix 1.16.2) lib/mix/compilers/erlang.ex:66: Mix.Compilers.Erlang.compile/6
(mix 1.16.2) lib/mix/task.ex:478: anonymous fn/3 in Mix.Task.run_task/5
(mix 1.16.2) lib/mix/tasks/compile.all.ex:124: Mix.Tasks.Compile.All.run_compiler/2
(mix 1.16.2) lib/mix/tasks/compile.all.ex:104: Mix.Tasks.Compile.All.compile/4
(mix 1.16.2) lib/mix/tasks/compile.all.ex:93: Mix.Tasks.Compile.All.with_logger_app/2
Compiling 1 file (.xrl)
Compiling 14 files (.erl)
Compiling 81 files (.ex)
Generated hex app
Generated archive "hex-2.0.6.ez" with MIX_ENV=prod
Found existing entry: /Users/conradwt/.mix/archives/hex-2.0.6
Are you sure you want to replace it with "hex-2.0.6.ez"? [Yn] y
* creating /Users/<username>/.mix/archives/hex-2.0.6
➜ elixir --version
Erlang/OTP 26 [erts-14.2.3] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]
Elixir 1.16.2 (compiled with Erlang/OTP 26)
➜ mix deps.get
Resolving Hex dependencies...
Resolution completed in 0.037s
Unchanged:
bandit 1.0.0
bunt 1.0.0
castore 1.0.5
credo 1.7.5
expo 0.4.1
file_system 1.0.0
gettext 0.22.3
hpax 0.1.2
jason 1.4.1
mime 2.0.5
phoenix 1.7.11
phoenix_html 4.1.1
phoenix_live_dashboard 0.8.3
phoenix_live_view 0.20.12
phoenix_pubsub 2.1.3
phoenix_template 1.0.4
plug 1.15.3
plug_crypto 2.0.0
telemetry 1.2.1
telemetry_metrics 0.6.2
telemetry_poller 1.0.0
thousand_island 1.3.5
websock 0.5.3
websock_adapter 0.5.5
All dependencies are up to date The only difference that I can see from your examples is that you're using an Ubuntu container versus macOS here. However, I was able to rebuild an app's Docker container image with the temporary Hex fix and execute without any issues. For example, ➜ docker compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
hasher-elixir-hasher-1 hasher-elixir-hasher "/app/bin/server" hasher 26 minutes ago Up 26 minutes 0.0.0.0:8002->80/tcp
➜ curl http://localhost:8002
HASHER running on fec5cc18a710
➜ curl -X POST http://localhost:8002
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 |
@conradwt so weird. Here's the output on my M1 Max MacBook Pro (macOS Sonoma 14.3.1 build 23D60).
Supplementary: I noticed that you're using
So it looks like @josevalim is correct (as expected TBH) that it's an issue with compatibility with artefacts from older versions of OTP. |
@jimsynz Yes, I typically use an Elixir release that's compatible with the underlying OTP version. |
I have also noticed this issue while running Alpine's |
The linked pull request fixes the bug. |
* bjorn/erts/bs-construction/GH-8238/OTP-19021: AArch64: Fix crash for running bit syntax code compiled by OTP 24 AArch64: Fix incorrect result for running code compiled by OTP 24
Fixes erlang/otp#8238 More discussion about this bug at https://elixirforum.com/t/62154
I am also seeing the same thing on an M2 with elixir 1.16.1-otp-26 What's the workaround? downgrade to 26.2.2? |
This may not work on CI; I had to use [this workaround](erlang/otp#8238 (comment)) to avoid a bug with `mix deps.get` on the latest Erlang version. If this fails in CI, I'll likely drop back a version to 26.2.2 until the fix is released.
* ⬆️ Upgrade to latest Erlang/Elixir This may not work on CI; I had to use [this workaround](erlang/otp#8238 (comment)) to avoid a bug with `mix deps.get` on the latest Erlang version. If this fails in CI, I'll likely drop back a version to 26.2.2 until the fix is released. * ⬆️ Upgrade mix_test_interactive * ⬆️ Upgrade credo * ⬆️ Upgrade Faker * ⬆️ Upgrade PhoenixTest along with its dependents * ⬆️ Upgrade phoenix_live_reload Use the new `web_console_logger` feature to get server logs in the browser console. * ⬆️ Upgrade phoenix_ecto * ⬆️ Upgrade postgrex * ⬆️ Upgrade telemetry_metrics
…t-26 * bjorn/erts/bs-construction/GH-8238/OTP-19021: AArch64: Fix crash for running bit syntax code compiled by OTP 24 AArch64: Fix incorrect result for running code compiled by OTP 24
Upgrading the Erlang/OTP to fix Erlang erlang/otp#8238 bug. Signed-off-by: Thanabodee Charoenpiriyakij <wingyminus@gmail.com>
Upgrading the Erlang/OTP to fix Erlang erlang/otp#8238 bug. Signed-off-by: Thanabodee Charoenpiriyakij <wingyminus@gmail.com>
Upgrading the Erlang/OTP to fix Erlang erlang/otp#8238 bug. Signed-off-by: Thanabodee Charoenpiriyakij <wingyminus@gmail.com>
I just had to do this too |
Describe the bug
Trying to do a
mix deps.get
on a Mac M2 with 26.2.3 causes a crash dump.To Reproduce
Expected behavior
No error and deps downloaded
Affected versions
26.2.3
The text was updated successfully, but these errors were encountered: