ericchuawc
Crash dump when installing Phoenix on Mac M2: eheap_alloc: Cannot allocate X bytes of memory (of type "heap_frag")
Hi all,
Before this, I have no issues install Elixir and Erlang using ASDF on my MacBook M2 (64GB RAM).
But today I chose to update it, all seemed fine until I tried to install phoenix framework.
I have uninstalled all and installed back having the same issue. Not sure what’s the issue?
mix archive.install hex phx_new
Resolving Hex dependencies...
eheap_alloc: Cannot allocate 976733209832459912 bytes of memory (of type "heap_frag").
Crash dump is being written to: erl_crash.dump...beam/erl_term.h:1492:tag_val_def() Assertion failed: tag_val_def error
[1] 25425 abort mix archive.install hex phx_new
Any help? Thanks.
Marked As Solved
wojtekmach
A workaround is compiling Hex from scratch on that OTP version. It can be easily done using this command:
mix archive.install github hexpm/hex branch latest
Also Liked
LostKobrakai
The bug is not asdf specific. It affects all aarch64 systems running this specific otp patch release.
I‘d suggest using hexpm/elixir images, which let you control the otp version used. Then you can use the last patch release until the fix for the bug is out.
Hermanverschooten
I opened an issue on the Erlang github page. mix deps.get crashes on 26.2.3 - M2 Mac · Issue #8238 · erlang/otp · GitHub
Hermanverschooten
Thanks @wojtekmach
God (or your preferred diety), I love this community.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









