<div dir="auto"><div>Hi Chris -<div dir="auto"><div dir="auto"><br></div><div dir="auto">What is "path_to_app_executable"? erl itself or a relx-type shell script sort of thing?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Nov 23, 2017 1:54 PM, "Christopher Meiklejohn" <<a href="mailto:christopher.meiklejohn@gmail.com">christopher.meiklejohn@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I've got an Erlang/Elixir application that's being invoked via child_process in Node.js. Outside of Node.js, it's fine. Inside, the node crashes on startup with a badarg from disksup -- this is because the application requires that os_mon be started.<div><br></div><div>A trivial reproducer is the following:</div><div><br></div><div>var child_process = require('child_process');</div><div>child_process.spawn(path_to_<wbr>app_executable, ['foreground'], </div><div> { stdio: ignore, </div><div> detached: true });</div><div><br></div><div>Included is the crash:</div><div><pre style="word-wrap:break-word;white-space:pre-wrap">2017-11-23 21:26:04 =ERROR REPORT====
** Generic server disksup terminating
** Last message in was timeout
** When Server state == [{data,[{"OS",{unix,linux}},{"<wbr>Timeout",1800000},{"Threshold"<wbr>,80},{"D
iskData",[]}]}]
** Reason for termination ==
** {badarg,[{erlang,port_close,[#<wbr>Port<0.2000>],[]},{disksup,<wbr>terminate,2,[{file,"disksup.<wbr>erl"
},{line,169}]},{gen_server,<wbr>try_terminate,3,[{file,"gen_<wbr>server.erl"},{line,629}]},{<wbr>gen_server
,terminate,7,[{file,"gen_<wbr>server.erl"},{line,795}]},{<wbr>proc_lib,init_p_do_apply,3,[{<wbr>file,"proc_
lib.erl"},{line,247}]}]}
2017-11-23 21:26:04 =CRASH REPORT====
crasher:
initial call: disksup:init/1
pid: <0.913.0>
registered_name: disksup
exception exit: {{badarg,[{erlang,port_close,[<wbr>#Port<0.2000>],[]},{disksup,<wbr>terminate,2,[{
file,"disksup.erl"},{line,169}<wbr>]},{gen_server,try_terminate,<wbr>3,[{file,"gen_server.erl"},{<wbr>line,
629}]},{gen_server,terminate,<wbr>7,[{file,"gen_server.erl"},{<wbr>line,795}]},{proc_lib,init_p_<wbr>do_app
ly,3,[{file,"proc_lib.erl"},{<wbr>line,247}]}]},[{gen_server,<wbr>terminate,7,[{file,"gen_<wbr>server.erl"}
,{line,800}]},{proc_lib,init_<wbr>p_do_apply,3,[{file,"proc_lib.<wbr>erl"},{line,247}]}]}
ancestors: [os_mon_sup,<0.911.0>]
messages: []
links: [<0.912.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 610
stack_size: 27
reductions: 368
neighbours:
2017-11-23 21:26:04 =SUPERVISOR REPORT====
Supervisor: {local,os_mon_sup}
Context: child_terminated
Reason: {badarg,[{erlang,port_close,[#<wbr>Port<0.2000>],[]},{disksup,<wbr>terminate,2,[{file
,"disksup.erl"},{line,169}]},{<wbr>gen_server,try_terminate,3,[{<wbr>file,"gen_server.erl"},{line,<wbr>629}
]},{gen_server,terminate,7,[{<wbr>file,"gen_server.erl"},{line,<wbr>795}]},{proc_lib,init_p_do_<wbr>apply,3
,[{file,"proc_lib.erl"},{line,<wbr>247}]}]}
Offender: [{pid,<0.913.0>},{id,disksup},<wbr>{mfargs,{disksup,start_link,[]<wbr>}},{restart_typ
e,permanent},{shutdown,2000},{<wbr>child_type,worker}]</pre></div></div>
<br>______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div></div></div>