I recently ran across a problem looking very similar to (Erlang/Elixir Interactive Shell jobs get stuck when printing to output) but regrettably it is not easily reproducible.
What we observed (running on OTP 21.1) is that if remote shells are kept connected (but unused) there is the chance that they go into a rogue mode where they start consuming a lot of CPU but without actually doing any work. We’ve traced the problem to the group.erl
process which seems to be stuck in an endless loop with driver.erl
. The group.erl
process is receiving data (https://github.com/erlang/otp/blob/master/lib/kernel/src/group.erl#L666) and the driver is constantly sending empty messages of the form {#PID<0.73.0>, {:data, []}}
. The result is that the remote shell process is taking up as much of the CPU as it can with all work spent in the more_data
function while it should not be doing anything.
Does any of this sound familiar?