epmd monitor consumes one full CPU core on Windows #3162
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
I will convert this issue to a GitHub discussion. Currently GitHub will automatically close and lock the issue even though your question will be transferred and responded to elsewhere. This is to let you know that we do not intend to ignore this but this is how the current GitHub conversion mechanism makes it seem for the users :( |
Beta Was this translation helpful? Give feedback.
-
RabbitMQ 3.7 has beenout of support for more than six months now. Erlang 21 is three major versions behind. Unless you can provide a set of steps to reasonably reliably reproduce this behavior on 3.8.18 and Erlang 23+, I'm afraid it's on you to investigate. The epmd monitor module is small, so narrowing things down should be easier. strace(1) can help understand what OS process maybe doing. I don't remember if 3.7.18 has runtime thread metrics. My best hypothesis is that the module cannot connect to epmd or fails to run a port because of e.g. a security policy, so it retries in what becomes an infinite loop. |
Beta Was this translation helpful? Give feedback.
-
Here are some relevant functions. They start a subprocess VM that would start So here's how ensure_epmd() ->
Exe = rabbit_runtime:get_erl_path(),
ID = rabbit_misc:random(1000000000),
Port = open_port(
{spawn_executable, Exe},
[{args, ["-boot", "no_dot_erlang",
"-sname", rabbit_misc:format("epmd-starter-~b", [ID]),
"-noinput", "-s", "erlang", "halt"]},
exit_status, stderr_to_stdout, use_stdio]),
port_shutdown_loop(Port).
port_shutdown_loop(Port) ->
receive
{Port, {exit_status, _Rc}} -> ok;
{Port, _} -> port_shutdown_loop(Port)
end. Note that second While I cannot immediately tell why the port exit is never received, we can introduce a timeout that would at least avoid the loop. |
Beta Was this translation helpful? Give feedback.
Here are some relevant functions. They start a subprocess VM that would start
epmd
. This is necessary because on some operating systems,epmd
can be terminated in certain cases without RabbitMQ being notified this in any way. IIRCon Windows, a logout of the effective user would lead to this.
So here's how
epmd
is kept running periodically: