Switch to disk_log updates may cause issue with IEx
Closed this issue · 7 comments
It seems one of the updates since OTP-19.3 support
commit causes an error in the IEx shell. I'm using Elixir 1.4.0 and Erlang 19.3. When I start an IEx session with iex
, it just shows the initial info
Erlang/OTP 19 [erts-8.3] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
and then never shows the prompt. I tried running the erl
shell and it runs as expected (i.e. no issue).
Then I ran make install
from the OTP-19.3 support
commit and the IEx shell functioned as expected.
I can just use the earlier version, but wanted to let you know I ran into the issue.
I don't have Elixir installed and this is not really obvious for me how to go about debugging that since I'm not familiar with what it does there that may be different.
A quick investigation shows everything stops here with a call to io:setopts(standard_io, [binary])
- it just hangs.
It gets there from the call to application:ensure_all_started(iex)
in IEx.start/0
Okay, I'll look into it. That's weird since the old and new implementation both do what is pretty much the same exact dance around the IO protocol. See https://github.com/ferd/erlang-history/blob/master/src/2.15.3/group_history.erl#L54-L81 and https://github.com/ferd/erlang-history/blob/master/src/5.2/group_history.erl#L94-L129
The code was copy/pasted across versions and only the pattern of the captured log changed.
I added here an after clause and another catch-all receive logging the message to a file.
The process got a message:
{io_request, <0.32.0>, #Ref<0.0.3.118>, {put_chars,unicode,
<<"\n=INFO REPORT==== 28-Apr-2017::16:08:02 ===\ndisk_log: repairing \"/Users/michalmuskala/.erlang-history/log.1\" ...\n">>}}
It looks like a sasl report (?) I'm not exactly sure.
Ah alright, I think I get it. It likely has to do with the amount of logging in place; without SASL or any other app booting in the background, it lets the info go through without a problem, otherwise it gets intercepted.
That gives me enough to go on. I think I should be able to work around the issue in the upcoming days.
@michalmuskala @axelclark see if #31 fixes it
I tried it from master and it works for me in iex
...thanks for the updates!