Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redbug over rpc IO error #7

Open
russelldb opened this issue Nov 13, 2018 · 0 comments
Open

Redbug over rpc IO error #7

russelldb opened this issue Nov 13, 2018 · 0 comments

Comments

@russelldb
Copy link

As reported here http://erlang.org/pipermail/erlang-questions/2018-November/096669.html

Start two nodes

erl -name  -setcookie trc -pa PATH_TO_EPER_BIN
erl -name  -setcookie trc

in the second node () I run the following:

3> net_kernel:hidden_connect('').
 true
 ()4> rpc:call('', redbug, start,
["erlang:term_to_binary", [{arity, true}, {print_file,
"/home/russell/t2btrc"}]]).
 {40,2}
 ()5> rpc:call('', 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>>
 ()6>
=ERROR REPORT==== 13-Nov-2018::16:48:17 ===
Error in process <0.46.0> on node '' 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


         ()1> redbug:start("erlang:term_to_binary", [{arity,
true}, {print_file, "/home/russell/t2btrc"}]).
         {38,2}
         ()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
           ()3>

In the node () the file is created and contains

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

I expected running the rpc calls to result in the same outcome as running locally. Is this a bug in my thinking, redbug, or something else?

Both nodes are on the same physical host and have access to the file path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant