duplication crash

P <>
Wed Jan 20 17:16:42 CET 2010


Suddenly one afternoon 

I could not start my old trusty erlang node (which had worked
previously for a long long time).

Eventually I realised that I already had started a erlang node with the 
same name and this crash was due to a name clash which was not 
entirely obvious at first (panic, panic, neck hears on end).

I wonder if there is some way to present this simple handling error in 
a way more obvious for the newcomer or is there something in the
crash dump viewer I have missed ?



-----------------------------------------------------------------------------------------
Starting in Windows XP like this:

C:\Program\Erlang\R13B\R13B03\erl5.7.4\bin\werl.exe -sname humle -
setcookie abc  -smp auto +S 2 +A 4



gave the following in the erlang console :


{error_logger,{{2010,1,20},{15,54,30}},"Protocol: ~p: register error: 
~p~n",["inet_tcp",{{badmatch,{error,duplicate_name}},[{inet_tcp_dist,
listen,1},{net_kernel,start_protos,4},{net_kernel,start_protos,3},
{net_kernel,init_node,2},{net_kernel,init,1},{gen_server,init_it,6},
{proc_lib,init_p_do_apply,3}]}]}
{error_logger,{{2010,1,20},{15,54,30}},crash_report,[[{initial_call,
{net_kernel,init,['Argument__1']}},{pid,<0.21.0>},{registered_name,[]},
{error_info,{exit,{error,badarg},[{gen_server,init_it,6},{proc_lib,
init_p_do_apply,3}]}},{ancestors,[net_sup,kernel_sup,<0.10.0>]},
{messages,[]},{links,[#Port<0.50>,<0.18.0>]},{dictionary,[{longnames,
false}]},{trap_exit,true},{status,running},{heap_size,377},{stack_size,
24},{reductions,457}],[]]}
{error_logger,{{2010,1,20},{15,54,30}},supervisor_report,[{supervisor,
{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',
nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfa,
{net_kernel,start_link,[[humle,shortnames]]}},{restart_type,permanent},
{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2010,1,20},{15,54,30}},supervisor_report,[{supervisor,
{local,kernel_sup}},{errorContext,start_error},{reason,shutdown},
{offender,[{pid,undefined},{name,net_sup},{mfa,{erl_distribution,
start_link,[]}},{restart_type,permanent},{shutdown,infinity},
{child_type,supervisor}]}]}
{error_logger,{{2010,1,20},{15,54,30}},std_info,[{application,kernel},
{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"
{application_start_failure,kernel,{shutdown,{kernel,start,[normal,
[]]}}}"}

Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) 
({application_start_failure,kernel,{shutdown,{kernel,start,[normal,
[]]}}})
-----------------------------------------------------------------------------------------


By chance I noticed I had one erlang node already started (puhhh) 
so I managed to start a crashdump_viewer.
This was on a node with another name...



>1 crashdump_viewer:start().
WebTool is available at http://localhost:8888/Or  http://127.0.0.1:8888/
ok
WARNING: Found unexpected line in index table information:
entries



The information below (with the atom: duplicate_name in it) made me realise
what might be going on:

{info_msg,<0.8.0>,
            {<0.20.0>,"Protocol: ~p: register error: ~p~n",
             ["inet_tcp",
              {{badmatch,{error,duplicate_name}},
               [{inet_tcp_dist,listen,1},
                {net_kernel,start_protos,4},
                {net_kernel,start_protos,3},
                {net_kernel,init_node,2},
                {net_kernel,init,1},
                {gen_server,init_it,6},
                {proc_lib,init_p_do_apply,3}]}]}}}]},
     false}]

-----------------------------------------------------------------------------------------


Regards P




More information about the erlang-questions mailing list