zhongwencool/observer_cli

OTP 21 compatability?

beardedeagle opened this issue · 9 comments

When using OTP 21 and Elixir 1.6.6 I get the following:

:observer_cli.start()
[error] Error in process #PID<0.526.0> on node :"vanguard@vanguard01.cloud.phx3.gdg" with exit value:
{:badarg, [{:erlang, :process_info, [:undefined, :message_queue_len], []}, {:observer_cli, :node_stats, 1, [file: '/Users/rlthompson/GitHub/vanguard/deps/observer_cli/src/observer_cli.erl', line: 579]}, {:observer_cli, :redraw_running, 7, [file: '/Users/rlthompson/GitHub/vanguard/deps/observer_cli/src/observer_cli.erl', line: 122]}]}

And when trying to connect to a remote node:

Node('vanguard@vanguard01.cloud.phx3.gdg') refuse to be connected, make sure cookie is valid
ferd commented

I'll need to patch up recon to not check on error_logger if it's not there. That's the call that fails due to OTP-21 changing the logging interfaces: https://github.com/ferd/recon/blob/e0c3614334589e375f8b1492f404e4b764fe35e7/src/recon.erl#L402

ferd commented

I've pushed a patched up recon version 2.3.6 which should now handle this stuff fine.

@beardedeagle try observer_cli 1.3.2

I'll give it a spin @zhongwencool

elixir --version
Erlang/OTP 21 [erts-10.0.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

Elixir 1.6.6 (compiled with OTP 21)

mix deps
* observer_cli 1.3.2 (Hex package) (rebar3)
  locked at 1.3.2 (observer_cli) c2123a9e
  ok
:observer_cli.start()
[error] Error in process #PID<0.514.0> on node :"vanguard@vanguard01.cloud.phx3.gdg" with exit value:
{:badarg, [{:io, :format, [#PID<0.69.0>, ["\e[H", [124, [[[['\e[48;2;184;0;0m', 'Home(H)', '\e[49m'], '|', ['\e[48;2;80;80;80m', 'Network(N)', '\e[49m'], '|', ['\e[48;2;80;80;80m', 'System(S)', '\e[49m'], '|', ['\e[48;2;80;80;80m', 'Ets(E)', '\e[49m'], '|', ['\e[48;2;80;80;80m', 'Mnesia(M)', '\e[49m'], '|', ['\e[48;2;80;80;80m', 'App(A)', '\e[49m'], '|', ['\e[48;2;80;80;80m', 'Doc(D)', '\e[49m'], '|'], 114, 101, 99, 111, 110, 58, 112, 114, 111, 99, 95, 99, 111, 117, 110, 116, 40, 'memory', 44, 32, '36', 41, 32, 73, 110, 116, 101, 114, 118, 97, 108, 58, '1500', 109, 115], 32, ['   ', 32, 32, 32], '   ', 32, 32, 32], 32, 124, 32, 27, 91, 51, 50, 59, 49, 109, [['0', 'Days ', '0', ':', '0', ':', '37'], '  ', 32, 32], 32, 27, 91, 48, 109, 124, 10], [[124, ['Erlang/OTP 21 [erts-10.0.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]', [[32, [32, '  ', 32, 32], 32, '  ', 32, 32], 32, [32, '  ', 32, 32], 32, '  ', 32, 32], [32, [32, '  ', 32, 32], 32, '  ', 32, 32], 32, [32, '  ', 32, 32], 32, '  ', 32, 32], 32, 124, 32, 27, 91, 48, 109, 10, 124, 27, 91, 55, 109, ['System', '  ', 32, 32], 32, 124, 32, ['Count/Limit', [32, '  ', 32, 32], 32, '  ', 32, 32], 32, 124, 32, ['System Switch', ['   ', 32, 32, 32], '   ', 32, 32, 32], 32, 124, 32, ['Status', 32, [32, '   ', 32, 32, 32], 32, '   ', 32, 32, 32], 32, 124, 32, ['Memory Info', 32, ['  ', 32, 32], '  ', 32, 32], 32, 124, 32, ['Size', [...], ...], 32, 27, ...], [124, 'Proc Count', 32, 124, 32, ['314/262144', ['   ', 32, 32, 32], '   ', 32, 32, 32], 27, 91, 48, 109, 124, [' Smp Support', [32, '   ', 32, 32, 32], 32, '   ', 32, 32, 32], 32, 124, 32, ['true', 32, [['  ', 32, 32], '  ', 32, 32], ['  ', 32, 32], '  ', 32, 32], 32, 124, 32, ['Allocted Mem', ['  ', 32, 32], '  ', 32, 32], 32, 124, 32, [['60.1641', 32, 77, 66], 32, '  ', 32, 32], 32, 124, 32, '100.0%', 32, 124, 32, 27, 91, 48, 109, 10, 124, ...], [124, 27, 91, 52, 109, 'Atom Count', 32, 124, 32, ['22691/1048576', 32, ['  ', 32, 32], '  ', 32, 32], 27, 91, 48, 109, 124, [' Logical Processors', 32, '   ', 32, 32, 32], 32, 124, 32, ['8', [[32, '  ', 32, 32], 32, '  ', 32, 32], [32, '  ', 32, 32], 32, '  ', 32, 32], 32, 124, 32, ['Unuse Mem', 32, [32, '  ', 32, 32], 32, '  ', 32, 32], 32, 124, 32, [['18.6713', 32, 77, 66], 32, '  ', 32, 32], 32, 124, 32, ['31.03', 37], 32, 27, 91, 48, ...]], [[124, 27, 91, 55, 109, ['Mem Type', 32, 32], 32, 124, 32, ['Size', 32, [['  ', 32, 32], '  ', 32, 32], ['  ', 32, 32], '  ', 32, 32], 32, 124, 32, ['Mem Type', 32, [['  ', 32, 32], '  ', 32, 32], ['  ', 32, 32], '  ', 32, 32], 32, 124, 32, ['Size', 32, [['  ', 32, 32], '  ', 32, 32], ['  ', 32, 32], '  ', 32, 32], 32, 124, 32, ['IO/GC', 32, [32, '   ', 32, 32, 32], 32, '   ', 32, 32, 32], 32, 124, 32, [['Interval: ', '1500', 'ms'], ['  ', 32, 32], '  ', 32, 32], 32, 27, 91, 48, 109, 124, 10], [124, ['Total', 32, '  ', 32, 32], 32, 124, 32, [['43.4386', 32, 77, 66], 32, 32], 32, 124, 32, '100.0%', 32, 124, 32, ['Binary', 32, [32, ['  ', 32, 32], '  ', 32, 32], 32, ['  ', 32, 32], '  ', 32, 32], 32, 124, 32, [['170.9531', 32, 75, 66], 32], 32, 124, 32, [48, '0.38', 37], 32, 124, 32, ['IO Output', 32, [32, '  ', 32, 32], 32, '  ', 32, 32], 32, 124, 32, [['12', 32, 66], [[32, '  ', 32, ...], 32, '  ', 32, ...], [32, '  ', 32, ...], 32, '  ', 32, ...], 32, 124, 32, 27, 91, 48, ...]], [[124, 27, 91, 51, 49, 109, 124, ['1', 32], 32, [['|', '|', '|', '|', '|', '|', '|', '|', '|', '|', '|', '|', '|', '|', '|', '|', '|', '|', '|', '|'], 32, 32], 32, ['94.26', 37], 27, 91, 51, 50, 59, 49, 109, 32, 124, ['5', 32], 32, [['|', '|', '|', '|', '|', '|', '|'], 32, [32, '   ', 32, 32, 32], 32, '   ', 32, 32, 32], 32, ['32.06', 37], 27, 91, 51, 50, 59, 49, 109, 32, 124, [...], ...], [124, 27, 91, 51, 50, 59, 49, 109, 124, ['2', 32], 32, [['|', '|', '|', '|', '|', '|', '|'], 32, [32, '   ', 32, 32, 32], 32, '   ', 32, 32, 32], 32, ['33.54', 37], 27, 91, 51, 50, 59, 49, 109, 32, 124, ['6', 32], 32, [['|', '|', '|', '|', '|', '|'], [['  ', 32, 32], '  ', 32, 32], ['  ', 32, 32], '  ', 32, 32], 32, ['31.70', 37], 27, 91, 51, 50, 59, 49, 109, ...], [124, 27, 91, 51, 50, 59, 49, 109, 124, ['3', 32], 32, [['|', '|', '|', '|', '|', '|', '|'], 32, [32, '   ', 32, 32, 32], 32, '   ', 32, 32, 32], 32, ['33.54', 37], 27, 91, 51, 50, 59, 49, 109, 32, 124, ['7', 32], 32, [['|', '|', '|', '|', '|', '|', '|'], 32, [32, '   ', 32, 32, 32], 32, '   ', 32, 32, 32], 32, ['32.20', 37], 27, 91, 51, 50, 59, 49, ...], [27, 91, 52, 109, 124, 27, 91, 51, 50, 59, 49, 109, 124, ['4', 32], 32, [['|', '|', '|', '|', '|', '|', '|'], 32, [32, '   ', 32, 32, 32], 32, '   ', 32, 32, 32], 32, ['32.43', 37], 27, 91, 51, 50, 59, 49, 109, 32, 124, ['8', 32], 32, [['|', '|', ...], [[...], ...], [...], ...], 32, ['31.47', ...], 27, ...]], [[124, 27, 91, 55, 109, ['No | Pid', ['  ', 32, 32], '  ', 32, 32], 27, 91, 48, 109, 124, 27, 91, 52, 56, 59, 50, 59, 49, 56, 52, 59, 48, 59, 48, 109, ['     Memory', 32, 32, 32], 27, 91, 48, 109, 124, 27, 91, 55, ...], [124, 27, 91, 52, 50, 109, ['1', 32, 32], 124, ['<0.69.0>', '  ', 32, 32], 124, [['  ', 32, 32], '3.9290', 32, 77, 66], 32, 124, [['group', ':', 'server', '/', '3'], [['   ', 32, 32, 32], '   ', 32, 32, 32], ['   ', 32, 32, 32], '   ', 32, 32, 32], 124, [[[['  ', 32, 32], '  ', 32, 32], ['  ', 32, 32], '  ', 32, 32], 55, 56, 50, 48, 55], 124, 32, ['0', ['  ', 32, 32], '  ', 32, 32], 124, [['group', ':', 'more_data', '/', '6'], [['  ', 32, 32], '  ', 32, 32], ['  ', 32, 32], '  ', 32, 32], 27, 91, 52, 57, 109, 124, 10], [124, ['2', 32, 32], 124, ['<0.48.0>', '  ', 32, 32], 124, [['  ', 32, 32], '3.3557', 32, 77, 66], 32, 124, ['code_server', 32, [32, ['   ', 32, 32, 32], '   ', 32, 32, 32], 32, ['   ', 32, 32, 32], '   ', 32, 32, 32], 124, [[32, [32, '   ', 32, 32, 32], 32, '   ', 32, 32, 32], 52, 48, 53, 56, 57, 55], 124, 32, ['0', ['  ', 32, 32], '  ', 32, 32], 124, [['code_server', ':', 'loop', '/', '1'], 32, [32, '   ', 32, 32, 32], 32, '   ', 32, 32, 32], 124, 10], [124, ['3', 32, 32], 124, ['<0.42.0>', '  ', 32, 32], 124, [['  ', 32, 32], '1.2834', 32, 77, 66], 32, 124, ['application_controller', [['  ', 32, 32], '  ', 32, 32], ['  ', 32, 32], '  ', 32, 32], 124, [[32, [32, '   ', 32, 32, 32], 32, '   ', 32, 32, 32], 52, 48, 54, 51, 48, 48], 124, 32, ['0', ['  ', 32, 32], '  ', 32, 32], 124, [['gen_server', ':', 'loop', '/', '7'], [['  ', 32, 32], '  ', 32, 32], ['  ', 32, 32], '  ', 32, 32], 124, 10], [124, ['4', 32, 32], 124, ['<0.8.0>', 32, '  ', 32, 32], 124, ['  ', '673.3633', 32, 75, 66], 32, 124, ['erl_prim_loader', 32, [32, [32, '  ', 32, 32], 32, '  ', 32, 32], 32, [32, '  ', 32, 32], 32, '  ', 32, 32], 124, [[[32, '   ', 32, 32, 32], 32, '   ', 32, 32, 32], 49, 56, 51, 57, 49, 54, 53], 124, 32, ['0', ['  ', 32, 32], '  ', 32, 32], 124, [['erl_prim_loader', ':', 'loop', '/', '3'], 32, [32, '  ', 32, 32], 32, '  ', 32, 32], 124, 10], [124, ['5', 32, 32], 124, ['<0.380.0>', 32, 32, 32], 124, ['  ', '196.7031', 32, 75, 66], 32, 124, [['supervisor', ':', 'ranch_acceptors_sup', '/', '1'], '   ', 32, 32, 32], 124, [[[['  ', 32, 32], '  ', 32, 32], ['  ', 32, 32], '  ', 32, 32], 49, 54, 52, 50, 57], 124, 32, ['0', ['  ', 32, 32], '  ', 32, 32], 124, [['gen_server', ':', 'loop', '/', '7'], [['  ', 32, 32], '  ', 32, 32], ['  ', 32, 32], '  ', 32, 32], 124, 10], [124, ['6', 32, 32], 124, ['<0.62.0>', '  ', 32, 32], 124, ['  ', '139.5352', 32, 75, 66], 32, 124, ['file_server_2', 32, [['   ', 32, 32, 32], '   ', 32, 32, 32], ['   ', 32, 32, 32], '   ', 32, 32, 32], 124, [[[['  ', 32, 32], '  ', 32, 32], ['  ', 32, 32], '  ', 32, 32], 51, 48, 55, 55, 49], 124, 32, ['0', ['  ', 32, 32], '  ', 32, 32], 124, [['gen_server', ':', 'loop', '/', '7'], [['  ', 32, 32], '  ', 32, 32], ['  ', 32, 32], '  ', 32, 32], 124, 10], [124, ['7', 32, 32], 124, ['<0.118.0>', 32, 32, 32], 124, ['  ', '139.4570', 32, 75, 66], 32, 124, ['Elixir.Mix.ProjectStack', 32, [32, '   ', 32, 32, 32], 32, '   ', 32, 32, 32], 124, [[32, [['  ', 32, 32], '  ', 32, 32], ['  ', 32, 32], '   (truncated)

And if you press enter it changes to this error:

[error] Error in process #PID<0.515.0> on node :"vanguard@vanguard01.cloud.phx3.gdg" with exit value:
{:badarg, [{:erlang, :process_info, [:undefined, [:registered_name, :dictionary, :group_leader, :status]], []}, {:recon, :proc_info, 2, [file: '/Users/rlthompson/GitHub/vanguard/deps/recon/src/recon.erl', line: 235]}, {:recon, :info_type, 3, [file: '/Users/rlthompson/GitHub/vanguard/deps/recon/src/recon.erl', line: 223]}, {:recon, :"-info/1-lc$^0/1-0-", 2, [file: '/Users/rlthompson/GitHub/vanguard/deps/recon/src/recon.erl', line: 181]}, {:observer_cli_process, :render_worker, 6, [file: '/Users/rlthompson/GitHub/vanguard/deps/observer_cli/src/observer_cli_process.erl', line: 34]}]}

@beardedeagle sorry for this, I fixed on 1.3.3, and verify~
plz update 1.3.3.

I'll give it another go and report back

Yes, that appears to have fixed it @zhongwencool

Thank you both