I used to use erlang/elixir installed by homebrew and kiex on my mac. But couple of days ago it stoped working. I tried uninstall everything and install it again. It didn’t help. Right now I tried
asdf and same issue. Erlang 19 is working but everything newer not. It start, show something in console but that’s it, it’s only start consuming memory and cpu, it takes about 12-20 GB of memory and 120 % cpu. Any ideax what can be wrong please?
asdf install erlang 18.104.22.168
Downloading OTP-22.214.171.124.tar.gz to /Users/quatermain/.asdf/plugins/erlang/kerl-home/archives
Extracting source code
Building Erlang/OTP 126.96.36.199 (asdf_188.8.131.52), please wait...
DOCUMENTATION INFORMATION (See: /Users/quatermain/.asdf/plugins/erlang/kerl-home/builds/asdf_184.108.40.206/otp_build_220.127.116.11.log)
* documentation :
* fop is missing.
* Using fakefop to generate placeholder PDF files.
Erlang/OTP 18.104.22.168 (asdf_22.214.171.124) has been successfully built
Installing Erlang/OTP 126.96.36.199 (asdf_188.8.131.52) in /Users/quatermain/.asdf/installs/erlang/184.108.40.206...
You can activate this installation running the following command:
Later on, you can leave the installation typing:
Cleaning up compilation products for
Cleaned up compilation products for under /Users/quatermain/.asdf/plugins/erlang/kerl-home/builds
Erlang 220.127.116.11 has been installed. Activate globally with:
asdf global erlang 18.104.22.168
Activate locally in the current folder with:
asdf local erlang 22.214.171.124
➜ ~ asdf global erlang 126.96.36.199
➜ ~ erl -v
Erlang/OTP 20 [erts-188.8.131.52] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false]
 10253 killed erl -v
As a start, make sure to run this in your console, just in case:
And then retry installing Erlang through
Thanks, I already did so:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
and I opened XCode just to be sure everything is ok, because sometimes it finish installation after you open it.
Then I’m not really sure. Have you tried 21? And 22.0.1 in particular?
Yes, only 19.x works and elixir 1.8 need > 20
I created new user and I installed erlang and elixir with asdf and it works. So I have to have something wrong with my user’s “namespace”. Maybe zsh has some wrong setup.
I removed this line from .zshrc file and it works
export ERL_AFLAGS="-kernel shell_history enabled"
Hmm, I wonder why, I still have those in my shell environment…
In the elixir-lang slack I already suggested that the history file might be broken, @quatermain didn’t report back their though.
Hmm, do you have a link to a BEAM bug report about this?
No, I wanted to check first with @quatermain if moving the history file away would help before filing/searching a bug report.
Hi guys, sorry for delay. I’m pretty sure it’s problem with history, but I can not find where is that history file. Can you navigate me please?
When I turn off that flag it works, when I turn on, erlang doesn’t work. Even without recompiling. So it has to be problem with that history “file”
Default place seems to be
If you backup and delete that folder, does it work with that flags enabled?
Keeping the faulty history might be beneficial for a potential bug report.
but problem is that I don’t have that file
I tried this:
sudo find / -type f -name "erlang-history"
and not results.
It is a directory, and I was very explicit with the path…
~/.cache/erlang-history should be available.
ls -ld ~/.cache/erlang-history.
Well, unless erlang does use the
XDG environment vars to alter the location and it is put somewhere else for that reason, but then you should still be able to find it using
-type d for
I moved all files inside, allowed history and it works. So problem is with these files.
So you have not backed them up for introspection?
yes, I have it. is it save to upload here or? not sure what is inside
I’m not sure as well. But they will probably contain major parts of your erlang and elixir shell history and if you are in doubt even might contain passwords you used as function arguments.
@bjorng, @rvirding do you know more, or if there is already something known that malformed/corrupted histories can cause the
erl to allocate a lot of memory while consuming a lot of CPU?
-rw-r--r--@ 1 quatermain staff 6.0K Jun 5 11:27 .DS_Store
-rw-r--r-- 1 quatermain staff 51K May 28 11:25 erlang-shell-log.1
-rw-r--r-- 1 quatermain staff 51K May 28 11:25 erlang-shell-log.10
-rw-r--r-- 1 quatermain staff 51K May 28 11:25 erlang-shell-log.2
-rw-r--r-- 1 quatermain staff 51K May 28 11:25 erlang-shell-log.3
-rw-r--r-- 1 quatermain staff 51K May 28 11:25 erlang-shell-log.4
-rw-r--r-- 1 quatermain staff 51K May 28 11:27 erlang-shell-log.5
-rw-r--r-- 1 quatermain staff 24K Jun 5 11:24 erlang-shell-log.6
-rw-r--r-- 1 quatermain staff 51K May 28 11:25 erlang-shell-log.7
-rw-r--r-- 1 quatermain staff 50K May 28 11:25 erlang-shell-log.8
-rw-r--r-- 1 quatermain staff 51K May 28 11:25 erlang-shell-log.9
-rw-r--r-- 1 quatermain staff 90B Jun 5 11:24 erlang-shell-log.idx
-rw-r--r-- 1 quatermain staff 13B Jun 5 11:24 erlang-shell-log.siz
maybe this help somehow