OTP Version: 24.1.3
Elixir Version: 1.12.1
Machine: Linux GNU x86_64
Hi,
I am looking for help with the following error I am getting when I try to run my elixir project with the debug emulator. Here is the error:
Erlang/OTP 24 [erts-12.1.3] [source] [64-bit] [smp:6:6] [ds:6:6:10] [async-threads:1] [jit] [type-assertions] [debug-compiled] [lock-checking]
Interactive Elixir (1.12.1) - press Ctrl+C to exit (type h() ENTER for help)
beam/erl_nif.c:2444:enif_open_resource_type() Assertion failed: module_str == ((void *)0)
Aborted (core dumped)
When I used the regular emulator, beam.smp, the project runs fine. The issue is possibly coming from the exqlite NIF that is compiled, or maybe the VM itself. I am not sure.
Just some background, I am working on an app that uses an SQLite DB, and it is currently seg faulting (not related to this issue). So I am trying to get a core dump using the debug version of the erlang VM, as per the erlang documentation. But when I try to run the app with the debug emulator, it fails with the above error.
My erlang version of 24.1.3 has been compiled manually, and was configured with the following options:
./configure \
--prefix=$OTP_24_INSTALL \
--without-javac \
--disable-smp-support \
--disable-hipe \
--without-dynamic-trace \
--without-odbc \
--without-observer
I then compile Elixir with this version erlang.
For switching between the debug and regular versions of the erlang VM, I simply rename the beam.debug.smp file to beam.smp in the erlang install dir, as I do not know of another way to run elixir with the debug erlang VM (I would be very grateful if someone could tell me the correct way).
Any help with the above error would be greatly appreciated, as I do not understand why it works with the regular beam.smp file, but not with beam.debug.smp file.
To help show the issue, I have created a demo repo here: GitHub - alanj853/debug_project.
To setup
bash setup.sh
To show problem with debug emulator
bash enable_debug.sh
bash run_app.sh
To show working with regular emulator
bash enable_regular.sh
bash run_app.sh
Thank you.