[erlang-questions] Node not responding to init:stop()

Roger Lipscombe <>
Mon Jul 2 17:54:45 CEST 2018


This sounds similar to
http://erlang.org/pipermail/erlang-questions/2012-December/071223.html,
but it's not quite the same, as far as I can tell.

I've noticed that, at some point since upgrading from OTP-20.3 to
OTP-21.0 (along with the necessary dependency updates), my Erlang
nodes are no longer stopping at the end of our system test run.

The nodes are orchestrated by having 'erlexec' run a bash script which
uses (effectively) 'foo/bin/foo foreground &'. I'm relying on erlexec
killing the bash script and that killing the nodes. This works fine
when the nodes are using OTP-20.3, but not with OTP-21.0.

If I connect to the node, I can issue 'init:stop()', and it returns
ok, but nothing happens. If I use 'application:which_applications()',
I get a timeout.

Unlike the linked discussion, I _can_ repeatedly connect a remote
shell (using erl -remsh), but I have to resort to erlang:halt() to
stop the node. Since my system test environment relies on orderly
process group teardown to stop the nodes, that's not useful.

As I understand it, process group teardown results in SIGTERM, which
results in a call to init:stop, which should stop the node. It isn't.

How do I figure out why init:stop() isn't working?


More information about the erlang-questions mailing list