ex_dtls NIF crash when starting server

root@908001db526468:/app/bin# ./passion_fruit start
=ERROR REPORT==== 12-Apr-2024::09:51:36.565861 ===
Error in process <0.6069.0> with exit value:
{undef,
[{'Elixir.Mix',target,[],[]},
{'Elixir.Bundlex.Platform','get_target!',0,
[{file,"lib/bundlex/platform.ex"},{line,45}]},
{'Elixir.Bundlex',family,0,[{file,"lib/bundlex.ex"},{line,51}]},
{'Elixir.Bundlex.Helper.PathHelper',fix_slashes,1,
[{file,"lib/bundlex/helper/path_helper.ex"},{line,25}]},
{'Elixir.ExDTLS.Native.Nif',load_nif,0,
[{file,"lib/ex_dtls/native.ex"},{line,1}]},
{init,'-run_on_load_handler/2-fun-0-',1,[]}]}

=CRASH REPORT==== 12-Apr-2024::09:51:36.568905 ===
crasher:
initial call: kernel:init/1
exception exit: {on_load_function_failed,'Elixir.ExDTLS.Native.Nif',
{undef,
[{'Elixir.Mix',target,[],[]},
{'Elixir.Bundlex.Platform','get_target!',0,
[{file,"lib/bundlex/platform.ex"},{line,45}]},
{'Elixir.Bundlex',family,0,
[{file,"lib/bundlex.ex"},{line,51}]},
{'Elixir.Bundlex.Helper.PathHelper',fix_slashes,
1,
[{file,"lib/bundlex/helper/path_helper.ex"},
{line,25}]},
{'Elixir.ExDTLS.Native.Nif',load_nif,0,
[{file,"lib/ex_dtls/native.ex"},{line,1}]},
{init,'-run_on_load_handler/2-fun-0-',1,[]}]}}
in function init:run_on_load_handlers/0
in call from kernel:init/1 (kernel.erl, line 227)
ancestors: [kernel_sup,<0.6056.0>]
message_queue_len: 0
links: [<0.6058.0>]
trap_exit: false
status: running
heap_size: 610
stack_size: 28
reductions: 164
neighbours:
root@908001db526468:/app/bin# ./passion_fruit start
=ERROR REPORT==== 12-Apr-2024::09:51:36.565861 ===
Error in process <0.6069.0> with exit value:
{undef,
[{'Elixir.Mix',target,[],[]},
{'Elixir.Bundlex.Platform','get_target!',0,
[{file,"lib/bundlex/platform.ex"},{line,45}]},
{'Elixir.Bundlex',family,0,[{file,"lib/bundlex.ex"},{line,51}]},
{'Elixir.Bundlex.Helper.PathHelper',fix_slashes,1,
[{file,"lib/bundlex/helper/path_helper.ex"},{line,25}]},
{'Elixir.ExDTLS.Native.Nif',load_nif,0,
[{file,"lib/ex_dtls/native.ex"},{line,1}]},
{init,'-run_on_load_handler/2-fun-0-',1,[]}]}

=CRASH REPORT==== 12-Apr-2024::09:51:36.568905 ===
crasher:
initial call: kernel:init/1
exception exit: {on_load_function_failed,'Elixir.ExDTLS.Native.Nif',
{undef,
[{'Elixir.Mix',target,[],[]},
{'Elixir.Bundlex.Platform','get_target!',0,
[{file,"lib/bundlex/platform.ex"},{line,45}]},
{'Elixir.Bundlex',family,0,
[{file,"lib/bundlex.ex"},{line,51}]},
{'Elixir.Bundlex.Helper.PathHelper',fix_slashes,
1,
[{file,"lib/bundlex/helper/path_helper.ex"},
{line,25}]},
{'Elixir.ExDTLS.Native.Nif',load_nif,0,
[{file,"lib/ex_dtls/native.ex"},{line,1}]},
{init,'-run_on_load_handler/2-fun-0-',1,[]}]}}
in function init:run_on_load_handlers/0
in call from kernel:init/1 (kernel.erl, line 227)
ancestors: [kernel_sup,<0.6056.0>]
message_queue_len: 0
links: [<0.6058.0>]
trap_exit: false
status: running
heap_size: 610
stack_size: 28
reductions: 164
neighbours:
4 Replies
noozo
noozoOP9mo ago
debian/bookworm have erl_crash.dump but basically says the same. Happy to share it here, if needed. Any help appreciated!
root@XXX:/app/bin# whereis pkgconfig
pkgconfig: /usr/lib/x86_64-linux-gnu/pkgconfig /usr/share/pkgconfig
root@XXX:/app/bin# whereis pkgconfig
pkgconfig: /usr/lib/x86_64-linux-gnu/pkgconfig /usr/share/pkgconfig
root@XXX:/app/bin# ls /usr/lib/x86_64-linux-gnu/pkgconfig
libcrypto.pc libssl.pc openssl.pc
root@XXX:/app/bin# ls /usr/lib/x86_64-linux-gnu/pkgconfig
libcrypto.pc libssl.pc openssl.pc
root@XXX:/app/bin# env | grep PKG
PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig
root@XXX:/app/bin# env | grep PKG
PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig
copied code from video_room example in web_rtc_engine project and adapted into a phoenix project. It works properly when running locally on OSX, but when we attempt deployment into a debian/bookworm fly machine it fails to start the application. Removing the start_link code for ExDTLS still makes the VM crash on startup, which is super weird. Turns out version 1.4.1 of Bundlex had Mix in a runtime function.
varsill
varsill9mo ago
Hello! Sorry for a late response - indeed, I believe that the appropriate bugfix was introduced here: https://github.com/membraneframework/bundlex/releases/tag/v1.4.3 so starting from Bundlex v1.4.3 it shouldn't be a problem anymore
GitHub
Release v1.4.3 · membraneframework/bundlex
What's Changed Ensure not to call Mix.target in runtime by @mat-hek in #119 Full Changelog: v1.4.2...v1.4.3
noozo
noozoOP9mo ago
unrelated but still, have you ever deployed anything to fly.io? I'm getting only the audio track coming through i fixed the port range as 50000-50000 to have a single port by default and added that on the services port in the fly.toml config do different tracks use different ports, now that i think of it? had to bind to fly-global-services in my integrated_turn_options, for future reference
{:ok, fly_global_services_ip} = :inet.getaddr(~c"fly-global-services", :inet)

integrated_turn_options = [
ip: fly_global_services_ip,
mock_ip: {xxx, xxx, xxx, xxx},
ports_range: {50_000, 59_999}
]
{:ok, fly_global_services_ip} = :inet.getaddr(~c"fly-global-services", :inet)

integrated_turn_options = [
ip: fly_global_services_ip,
mock_ip: {xxx, xxx, xxx, xxx},
ports_range: {50_000, 59_999}
]
damn, had it going until i needed to cluster the machine now it doesn't work again audio still goes through, though
shuntrho
shuntrho9mo ago
Hi, we have attempted deploying our Jellyfish Media Server, with some troubles and in the end it wasn't working all of the time. You can read about attempt in the docs: https://jellyfish-dev.github.io/jellyfish-docs/next/deploying/fly_io
Fly.io (experimental) | Jellyfish
This deployment guide is experimental and may not reliably work each time or for every user.
Want results from more Discord servers?
Add your server