jlouis / etorrent

Erlang Bittorrent Client
BSD 2-Clause "Simplified" License
294 stars 50 forks source link

badrpc as an id of DHT node #139

Closed arcusfelis closed 11 years ago

arcusfelis commented 11 years ago
=CRASH REPORT==== 16-Feb-2013::22:06:39 ===
  crasher:
    initial call: etorrent_dht_tracker:init/1
    pid: <0.189.0>
    registered_name: []
    exception exit: {function_clause,
                        [{etorrent_dht,distance,
                             [badrpc,
                              774951173766955388762226121640043803937242174802],
                             [{file,"src/etorrent_dht.erl"},{line,100}]},
                         {etorrent_dht_net,'-dht_iter_search/5-lc$^0/1-0-',2,
                             [{file,"src/etorrent_dht_net.erl"},{line,199}]},
                         {etorrent_dht_net,'-dht_iter_search/5-lc$^0/1-0-',2,
                             [{file,"src/etorrent_dht_net.erl"},{line,199}]},
                         {etorrent_dht_net,dht_iter_search,5,
                             [{file,"src/etorrent_dht_net.erl"},{line,199}]},
                         {etorrent_dht_tracker,handle_info,2,
                             [{file,"src/etorrent_dht_tracker.erl"},
                              {line,207}]},
                         {gen_server,handle_msg,5,
                             [{file,"gen_server.erl"},{line,607}]},
                         {proc_lib,init_p_do_apply,3,
                             [{file,"proc_lib.erl"},{line,227}]}]}

find_node(IP, Port, Target) returns [{badrpc, IP, Port}]. I am thinking about checking ids inside find_node/3.

arcusfelis commented 11 years ago

rpc:parallel_call returned {'EXIT',{noproc,{gen_server,call,[dht_socket_server,{find_node,{127,0,0,4 },1763,774951173766955388762226121640043803937242174802}]}}}.

arcusfelis commented 11 years ago

parallel_eval is a bad choice according documentation:

For every tuple in FuncCalls, evaluates apply(Module, Function, Args) on some node in the network. Returns the list of return values, in the same order as in FuncCalls.

arcusfelis commented 11 years ago

Fixed :)