<div>
                    Hi,
                </div><div><br></div><div>I've found a but that if Erlang is installed in a path with spaces then _epmd_ fails to start when started automatically by _erl_. You can still start epmd manually.</div><div><br></div><div>Platform where the bug happens: Linux & Mac (where I tested at least).</div><div><br></div><div>How to reproduce:</div><div><br></div><div>Install Erlang in a path with spaces like "/tmp/path with spaces/"</div><div><br></div><div>Start Erlang like this:</div><div><br></div><div>erl -sname foo</div><div><br></div><div>You will get this error:</div><div><br></div><div><div><div>sh: /tmp/path: No such file or directory</div><div>{error_logger,{{2012,4,22},{11,50,7}},"Protocol: ~p: register error: ~p~n",["inet_tcp",{{badmatch,{error,econnrefused}},[{inet_tcp_dist,listen,1,[{file,"inet_tcp_dist.erl"},{line,70}]},{net_kernel,start_protos,4,[{file,"net_kernel.erl"},{line,1314}]},{net_kernel,start_protos,3,[{file,"net_kernel.erl"},{line,1307}]},{net_kernel,init_node,2,[{file,"net_kernel.erl"},{line,1197}]},{net_kernel,init,1,[{file,"net_kernel.erl"},{line,357}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}]}</div><div>{error_logger,{{2012,4,22},{11,50,7}},crash_report,[[{initial_call,{net_kernel,init,['Argument__1']}},{pid,<0.19.0>},{registered_name,[]},{error_info,{exit,{error,badarg},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,320}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}},{ancestors,[net_sup,kernel_sup,<0.9.0>]},{messages,[]},{links,[#Port<0.53>,<0.16.0>]},{dictionary,[{longnames,false}]},{trap_exit,true},{status,running},{heap_size,610},{stack_size,24},{reductions,474}],[]]}</div><div>{error_logger,{{2012,4,22},{11,50,7}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfargs,{net_kernel,start_link,[[a,shortnames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}</div><div>{error_logger,{{2012,4,22},{11,50,7}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,shutdown},{offender,[{pid,undefined},{name,net_sup},{mfargs,{erl_distribution,start_link,[]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]}</div><div>{error_logger,{{2012,4,22},{11,50,7}},std_info,[{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}</div><div>{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}"}</div><div><br></div><div>Crash dump was written to: erl_crash.dump</div><div>Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})</div></div></div><div><br></div><div>If you DTrace it like this for example:</div><div><br></div><div>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">sudo dtruss -f ./erts-5.9.1/bin/erl -boot ./releases/2.8.1/start_clean -sname a</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"><font size="3">You will see that the error happens in this system call:</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">execve("/tmp/path\0", 0x10C204BD0, 0x10C2049E0)<span class="Apple-tab-span" style="white-space:pre">             </span> = -1 Err#2</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><font size="3">Which I think is part of this file: </font>erts/emulator/sys/unix/sys.c </p></div><div><br></div>
                <div><div>In the Mac is quite common to have User home folders in path with spaces. I've found this while trying to create an Erlang release and distribute it via inside a Mac.app</div><div><br></div><div>The bug happens in R15B01 so I guess it also appears in earlier versions.</div><div><br></div><div>Also perhaps if epmd is not running for whatever the reason maybe Erlang could give a more meaningful error.</div><div><br></div><div>Regards,</div><div><br></div><div>Alvaro</div><div><br></div><div>-- </div><div>Sent with <a href="http://www.sparrowmailapp.com/?sig">Sparrow</a></div><div><br></div></div>