Segmentation fault: 11 when trying to use erl_call. Why?

Hello all!

After update erlang with homebrew in MacOS having this trouble with erl_call:

$ erl_call -s -a 'erlang time' -n madonna
Segmentation fault: 11

Why is it happening?
After update there were no symlink on erl_call binary in /opt/homebrew/Cellar/bin folder. Made it manually. Erl_call itself is working:

$ erl_call

Usage: erl_call [-[demqrsv]] [-c Cookie] [-h HiddenName]
            [-x ErlScript] [-a [Mod [Fun [Args]]]] [-timeout Secs]
            (-n Node | -sname Node | -name Node | -address [HOSTNAME:]PORT)

  where: -a  apply(Mod,Fun,Args) (e.g -a 'erlang length [[a,b,c]]'
         -c  cookie string; by default read from ~/.erlang.cookie
         -d  direct Erlang output to ~/.erl_call.out.<Nodename>
         -e  evaluate contents of standard input (e.g., echo "X=1,Y=2,{X,Y}."|erl_call -e ...)
         -fetch_stdout
           execute the code, specified with the -a or -e option, in a new
           process that has a group leader that forwards all stdout (standard
           output) data so that it is printed to stdout of the
           erl_call process. See the erl_call man page for additional information.
         -h  specify a name for the erl_call client node
         -m  read and compile Erlang module from stdin
         -n  name of Erlang node, same as -name
         -name  name of Erlang node, expanded to a fully qualified
         -sname name of Erlang node, short form will be used
         -address [HOSTNAME:]PORT of Erlang node
                  (the default hostname is the hostname of the local manchine)
                  (e.g., erl_call -address my_host:36303 ...)
                  (cannot be combinated with -s, -n, -name and -sname)
         -no_result_term  do not print the result term
         -timeout  command timeout, in seconds
         -q  halt the Erlang node (overrides the -s switch)
         -r  use a random name for the erl_call client node
         -s  start a new Erlang node if necessary
         -v  verbose mode, i.e print some information on stderr
         -x  use specified erl start script, default is erl

Why this troubles?

My erlang version:

$ erl
Erlang/OTP 27 [erts-15.2] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit] [dtrace]

FWIW I can not reproduce this, but I believe the proper venue for this is going to be on github. Can you open an issue on otp repo including how you made the symlink?

Optimally, this is reproducible outside the context of homebrew…

Sure. Will do it tomorrow.
Could you send me the link on where exactly need to be opening issue?

erl_call is part of the Erlang/OTP distribution, so you should open an issue here. If you can, please include binary + coredump, or atlast a backtrace of all threads when the crash happened.

Still don’t know what was the cause of this trouble. But total reinstall, within updating MacOS and erasing disks (just update were not working), solved this issue. The troubles started happening when building Qt applications too few days later.

But … erl_call application after installing with $ brew install erlang do not available. It’s happening because brew formula not creating erl_call symlink in /opt/homebrew/Cellar/erlang/27.2.1/bin and after it not creating symlink on first symlink in /opt/homebrew/bin

The solution for this issue:

  1. Create symlink manually in /opt/homebrew/Cellar/erlang/27.2.1/bin just ith using ln command
  2. Create symlink manually in /opt/homebrew/bin on /opt/homebrew/Cellar/erlang/27.2.1/bin/erl_call symlink

My environment:

$ brew -v
Homebrew 4.4.20
$ erl
Erlang/OTP 27 [erts-15.2.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit] [dtrace]
$ sw_vers -productVersion
14.7.3
$ xcodebuild -version
Xcode 16.1
Build version 16B40