Hey José,
I was able to get elixir to work with cerl, such as elixir -e "IO.puts :ok". But I could not get it to work in the release environment running in docker. I get this error:
root:~# releases/0.1.0/elixir -e "IO.puts :ok"
{"init terminating in do_boot",{undef,[{elixir,start_cli,[],[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
init terminating in do_boot ({undef,[{elixir,start_cli,[],[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})
Crash dump is being written to: erl_crash.dump...done
In my dockerfile I replace the elixir bin with my elixir debug like so:
....
COPY --from=build /app/_build/prod/rel/app ./
# Copy erlang source, along with erlang debug binary
COPY --from=build /OTP/subdir /OTP/subdir
# Symlink erlang debug binary to erts bin dir
RUN ln -s /OTP/subdir/bin/cerl /app/releases/0.1.0/../../erts-11.2.2.15/bin/cerl
# Replace elixir script with our scrip that runs the erlang debug binary
COPY elixir-debug releases/0.1.0/elixir
RUN chmod +x releases/0.1.0/elixir
...
The source image for my app docker file is hexpm/elixir:1.10.4-erlang-23.3.4.16-ubuntu-bionic-20210930 but modified to keep the erlang source code and build cerl debug vm.
I don't think I can reasonably share a minimal app that reproduces the issue (without sharing my app code which I cannot). The seg fault happens randomly after x hours and I do not know what is causing it.
Attached is my modified elixir bin.