erlanglab / erlangpl

Tool for developers working with systems running on the Erlang VM (BEAM). It helps with performance analysis.
http://www.erlang.pl/
Apache License 2.0
546 stars 40 forks source link

Crashing after connection #43

Closed DrPandemic closed 7 years ago

DrPandemic commented 7 years ago

I'm using

I'm currently developing an elixir toy project (https://github.com/DrPandemic/MasDB). When I connect erlanpl to my cluster with ./erlangpl -n foo@127.0.0.1 it generates some errors.

In overview memory usage, processes and throughput are indefinitely loading. Same thing for the sup-tree page. The traffic page seems to be working correctly.

I don't know if the problem is from my project. If it's the case, do you know how I could fix it?

This tools looks amazing!

Those are the errors

ERROR: timed out while collecting data from node

=ERROR REPORT==== 10-Apr-2017::17:47:57 ===
** Generic server epl_st terminating 
** Last message in was {data,
                        {'foo@127.0.0.1',{1491,860872,638202}},
                        [{process_count,110},
                         {memory_total,28066008},
                         {spawn,
                          [{<6880.842.0>,
                            {proc_lib,init_p,
                             ['Elixir.Masdb.Node.DistantSupervisor',
                              [<6880.177.0>,<6880.176.0>],
                              'Elixir.Task.Supervised',reply,
                              [<8002.191.0>,monitor,
                               {'baz@127.0.0.1','Elixir.Masdb.Gossip.Server'},
                               {'Elixir.Masdb.Gossip.Server',received_gossip,
                                [#{'__struct__' => 'Elixir.Masdb.Register',
                                   schemas => [],
                                   stores => [],
                                   synced => true,
                                   tables => []}]}]]},
                            {1491,860868,806979}},
                           {<6880.843.0>,
                            {proc_lib,init_p,
                             ['Elixir.Masdb.Node.DistantSupervisor',
                              [<6880.177.0>,<6880.176.0>],
                              'Elixir.Task.Supervised',reply,
                              [<8003.191.0>,monitor,
                               {'bar@127.0.0.1','Elixir.Masdb.Gossip.Server'},
                               {'Elixir.Masdb.Gossip.Server',received_gossip,
                                [#{'__struct__' => 'Elixir.Masdb.Register',
                                   schemas => [],
                                   stores => [],
                                   synced => true,
                                   tables => []}]}]]},
                            {1491,860868,822536}},
                           {<6880.844.0>,
                            {proc_lib,init_p,
                             ['Elixir.Masdb.Node.DistantSupervisor',
                              [<6880.177.0>,<6880.176.0>],
                              'Elixir.Task.Supervised',reply,
                              [<8002.191.0>,monitor,
                               {'baz@127.0.0.1','Elixir.Masdb.Gossip.Server'},
                               {'Elixir.Masdb.Gossip.Server',received_gossip,
                                [#{'__struct__' => 'Elixir.Masdb.Register',
                                   schemas => [],
                                   stores => [],
                                   synced => true,
                                   tables => []}]}]]},
                            {1491,860871,812235}},
                           {<6880.845.0>,
                            {proc_lib,init_p,
                             ['Elixir.Masdb.Node.DistantSupervisor',
                              [<6880.177.0>,<6880.176.0>],
                              'Elixir.Task.Supervised',reply,
                              [<8003.191.0>,monitor,
                               {'bar@127.0.0.1','Elixir.Masdb.Gossip.Server'},
                               {'Elixir.Masdb.Gossip.Server',received_gossip,
                                [#{'__struct__' => 'Elixir.Masdb.Register',
                                   schemas => [],
                                   stores => [],
                                   synced => true,
                                   tables => []}]}]]},
                            {1491,860871,827102}}]},
                         {exit,
                          [{<6880.842.0>,normal,{1491,860868,810505}},
                           {<6880.843.0>,normal,{1491,860868,822966}},
                           {<6880.844.0>,normal,{1491,860871,813505}},
                           {<6880.845.0>,normal,{1491,860871,828388}}]},
                         {send,
                          [{{'Elixir.Masdb.Register.Server',<6880.842.0>},0,1},
                           {{'Elixir.Masdb.Register.Server',<6880.843.0>},0,1},
                           {{'Elixir.Masdb.Register.Server',<6880.844.0>},0,1},
                           {{'Elixir.Masdb.Register.Server',<6880.845.0>},0,1},
                           {{#Port<6880.6636>,<6880.192.0>},1,0},
                           {{#Port<6880.6656>,<6880.197.0>},1,0},
                           {{#Port<6880.6699>,<6880.836.0>},1,0},
                           {{<6880.178.0>,<6880.188.0>},2,2},
                           {{<6880.185.0>,<8003.191.0>},2,0},
                           {{<6880.185.0>,<8002.191.0>},2,0},
                           {{<6880.186.0>,<6880.188.0>},4,4},
                           {{<6880.188.0>,<8003.815.0>},1,0},
                           {{<6880.188.0>,<8003.817.0>},1,0},
                           {{<6880.188.0>,<8002.2077.0>},1,0},
                           {{<6880.188.0>,<8002.2079.0>},1,0},
                           {{<6880.188.0>,
                             {'Elixir.Masdb.Node.DistantSupervisor',
                              'bar@127.0.0.1'}},
                            2,0},
                           {{<6880.188.0>,
                             {'Elixir.Masdb.Node.DistantSupervisor',
                              'baz@127.0.0.1'}},
                            2,0},
                           {{<8003.191.0>,<6880.843.0>},0,1},
                           {{<8003.191.0>,<6880.845.0>},0,1},
                           {{<8002.191.0>,<6880.842.0>},0,1},
                           {{<8002.191.0>,<6880.844.0>},0,1},
                           {{<6880.192.0>,<6880.841.0>},1,0},
                           {{<6880.197.0>,<6880.841.0>},1,0},
                           {{<6880.836.0>,<6880.841.0>},1,0}]},
                         {send_self,[]},
                         {'receive',
                          [{#Port<6880.6636>,1,12},
                           {#Port<6880.6656>,1,12},
                           {#Port<6880.6699>,1,12},
                           {<6880.178.0>,2,20},
                           {<6880.185.0>,8,232},
                           {<6880.186.0>,8,120},
                           {<6880.188.0>,22,200},
                           {<6880.192.0>,1,3},
                           {<6880.197.0>,1,3},
                           {<6880.836.0>,1,3},
                           {<6880.842.0>,1,12},
                           {<6880.843.0>,1,12},
                           {<6880.844.0>,1,12},
                           {<6880.845.0>,1,12}]},
                         {trace,[]}]}
** When Server state == {state,[<0.199.0>]}
** Reason for termination == 
** {{timeout,{gen_server,call,
                         [epl_tracer,
                          {command,#Fun<supervisor.which_children.1>,
                                   [<6880.163.0>]}]}},
    [{gen_server,call,2,[{file,"gen_server.erl"},{line,204}]},
     {epl_st,command,2,[{file,"src/epl_st.erl"},{line,120}]},
     {epl_st,generate_sup_tree,1,[{file,"src/epl_st.erl"},{line,104}]},
     {epl_st,'-handle_info/2-fun-0-',2,[{file,"src/epl_st.erl"},{line,76}]},
     {lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
     {epl_st,handle_info,2,[{file,"src/epl_st.erl"},{line,75}]},
     {gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,601}]},
     {gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,667}]}]}

=INFO REPORT==== 10-Apr-2017::17:47:57 ===
    application: epl_st
    exited: shutdown
    type: temporary
ERROR: timed out while collecting data from node
ERROR: timed out while collecting data from node
arkgil commented 7 years ago

It's not an issue with you project, but with one of your dependencies: bunt. We have already encountered similar case, it happens because Bunt kind of breaks OTP compliance and returns application master's PID as if it was top supervisor's PID (see this line). I think that bunt is dependency of Credo, so could you please add runtime: false option to Credo in you mix.exs and tell us what happens? 🙂

arkgil commented 7 years ago

I've made a PR to Bunt repository, I hope this will solve the issue :)

michalslaski commented 7 years ago

Good catch @arkgil

DrPandemic commented 7 years ago

Wow, that was a quick diagnostic. So adding the runtime: false fixed the dashboard/overview page, but the sup-tree is still indefinitely loading. Also, I still have an error in the log.

Thank you for your time.

=ERROR REPORT==== 11-Apr-2017::10:03:45 ===
** Generic server epl_st terminating 
** Last message in was {data,
                        {'foo@127.0.0.1',{1491,919425,150512}},
... (my app state, like the previous error)
** When Server state == {state,[]}
** Reason for termination == 
** {function_clause,
       [{lists,map,
            [#Fun<epl_st.1.5273273>,
             {'EXIT',
                 {noproc,
                     {gen_server,call,[undefined,which_children,infinity]}}}],
            [{file,"lists.erl"},{line,1238}]},
        {epl_st,generate_sup_tree,1,[{file,"src/epl_st.erl"},{line,99}]},
        {lists,map,2,[{file,"lists.erl"},{line,1239}]},
        {lists,map,2,[{file,"lists.erl"},{line,1239}]},
        {epl_st,generate_sup_tree,1,[{file,"src/epl_st.erl"},{line,105}]},
        {epl_st,'-handle_info/2-fun-0-',2,[{file,"src/epl_st.erl"},{line,76}]},
        {lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
        {epl_st,handle_info,2,[{file,"src/epl_st.erl"},{line,75}]}]}

=INFO REPORT==== 11-Apr-2017::10:03:45 ===
    application: epl_st
    exited: shutdown
    type: temporary
arkgil commented 7 years ago

@DrPandemic first of all, thank you for reporting the issue 👍 You have found a bug which we obviously haven't spotted before. I'll fix this as soon as possible, and we will release version 0.6.1. Thanks once again! ❤️

arkgil commented 7 years ago

@DrPandemic the issue is solved now in version 0.6.1 :) Please build from 0.6.1 tag or download new version of prebuilt script. Let us know if that fixed your issue (it should, I've tested it on my machine with your application 😉 ). Cheers!

DrPandemic commented 7 years ago

Yes it all works. Thank you for your swift fix. You rock!