(no subject)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

(no subject)

Russell Brown-3
Hi,

I have a something I don't understand with redbug, if anyone can shed
light, I'd be grateful.

Start two nodes

    erl -name [hidden email] -setcookie trc -pa PATH_TO_EPER_BIN
    erl -name [hidden email] -setcookie trc

in the second node ([hidden email]) I run the following:

   ([hidden email])3> net_kernel:hidden_connect('[hidden email]').
   true
   ([hidden email])4> rpc:call('[hidden email]', redbug, start, ["erlang:term_to_binary", [{arity, true}, {print_file, "/home/russell/t2btrc"}]]).
   {40,2}
   ([hidden email])5> rpc:call('[hidden email]', erlang, term_to_binary, [{my_tuple, is, boss}]).
   <<131,104,3,100,0,8,109,121,95,116,117,112,108,101,100,0,
     2,105,115,100,0,4,98,111,115,115>>
=ERROR REPORT==== 13-Nov-2018::16:48:17 ===
Error in process <0.46.0> on node '[hidden email]' with exit value: {terminated,[{io,format,[<0.44.0>,"~s~n",["\n16:48:17 <0.52.0>(dead) {erlang,term_to_binary,1}"]],[]},{redbug,'-mk_outer/1-fun-2-',5,[{file,"src/redbug.erl"},{line,343}]},{redbug,'-wrap_print_fun/1-fun-0-',3,[{file,"src/redbug.erl"},{line...

redbug done, terminated - [{io,format,
                               [<5930.44.0>,"~s~n",
                                ["\n16:48:17 <0.52.0>(dead) {erlang,term_to_binary,1}"]],
                               []},
                           {redbug,'-mk_outer/1-fun-2-',5,
                                   [{file,"src/redbug.erl"},{line,343}]},
                           {redbug,'-wrap_print_fun/1-fun-0-',3,
                                   [{file,"src/redbug.erl"},{line,329}]},
                           {lists,foldl,3,[{file,"lists.erl"},{line,1248}]},
                           {redbug,print_loop,2,
                                   [{file,"src/redbug.erl"},{line,519}]}]

AND the file "/home/russell/t2btrc" is empty, but created.

However, if I run

         ([hidden email])1> redbug:start("erlang:term_to_binary", [{arity, true}, {print_file, "/home/russell/t2btrc"}]).
         {38,2}
         ([hidden email])2> erlang:term_to_binary({my_tuple, is, boss}).
         <<131,104,3,100,0,8,109,121,95,116,117,112,108,101,100,0,
           2,105,115,100,0,4,98,111,115,115>>
           redbug done, timeout - 1
           ([hidden email])3>

In the node ([hidden email]) the file is created and contains

   16:49:39 <0.39.0>({erlang,apply,2}) {erlang,term_to_binary,1}

What is up with that?

Thanks in advance if you can explain that to me at all. I did try
reading the redbug code to figure out what was happening, but it wasn't
so easy to follow for me.

Cheers

Russell




_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Redbug rpc call io error

Russell Brown-3

Sorry, adding a subject now.

On 13/11/2018 16:57, Russell Brown wrote:
Hi,

I have a something I don't understand with redbug, if anyone can shed
light, I'd be grateful.

Start two nodes

    erl -name [hidden email] -setcookie trc -pa PATH_TO_EPER_BIN
    erl -name [hidden email] -setcookie trc

in the second node ([hidden email]) I run the following:

   ([hidden email])3> net_kernel:hidden_connect('[hidden email]').
   true
   ([hidden email])4> rpc:call('[hidden email]', redbug, start, ["erlang:term_to_binary", [{arity, true}, {print_file, "/home/russell/t2btrc"}]]).
   {40,2}
   ([hidden email])5> rpc:call('[hidden email]', erlang, term_to_binary, [{my_tuple, is, boss}]).
   <<131,104,3,100,0,8,109,121,95,116,117,112,108,101,100,0,
     2,105,115,100,0,4,98,111,115,115>>
=ERROR REPORT==== 13-Nov-2018::16:48:17 ===
Error in process <0.46.0> on node '[hidden email]' with exit value: {terminated,[{io,format,[<0.44.0>,"~s~n",["\n16:48:17 <0.52.0>(dead) {erlang,term_to_binary,1}"]],[]},{redbug,'-mk_outer/1-fun-2-',5,[{file,"src/redbug.erl"},{line,343}]},{redbug,'-wrap_print_fun/1-fun-0-',3,[{file,"src/redbug.erl"},{line...

redbug done, terminated - [{io,format,
                               [<5930.44.0>,"~s~n",
                                ["\n16:48:17 <0.52.0>(dead) {erlang,term_to_binary,1}"]],
                               []},
                           {redbug,'-mk_outer/1-fun-2-',5,
                                   [{file,"src/redbug.erl"},{line,343}]},
                           {redbug,'-wrap_print_fun/1-fun-0-',3,
                                   [{file,"src/redbug.erl"},{line,329}]},
                           {lists,foldl,3,[{file,"lists.erl"},{line,1248}]},
                           {redbug,print_loop,2,
                                   [{file,"src/redbug.erl"},{line,519}]}]

AND the file "/home/russell/t2btrc" is empty, but created.

However, if I run

         ([hidden email])1> redbug:start("erlang:term_to_binary", [{arity, true}, {print_file, "/home/russell/t2btrc"}]).
         {38,2}
         ([hidden email])2> erlang:term_to_binary({my_tuple, is, boss}).
         <<131,104,3,100,0,8,109,121,95,116,117,112,108,101,100,0,
           2,105,115,100,0,4,98,111,115,115>>
           redbug done, timeout - 1
           ([hidden email])3>

In the node ([hidden email]) the file is created and contains

   16:49:39 <0.39.0>({erlang,apply,2}) {erlang,term_to_binary,1}

What is up with that?

Thanks in advance if you can explain that to me at all. I did try
reading the redbug code to figure out what was happening, but it wasn't
so easy to follow for me.

Cheers

Russell




_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions