beam crashes on inet_gethost port

Daniel Goertzen <>
Mon Jun 5 18:41:06 CEST 2006


I finally got it working by adding "--disable-hipe" to configure.  While 
I'm happy it now works, I wish I had the option of using hipe.

Dan.


Daniel Goertzen wrote:
> I am still trying to get a cross compiled system going (x86_64 to 
> i486, linux, R11B0), but am having troubles.  When I run my i486 
> erlang I get:
>
> bash-3.00# erl
> Segmentation Fault
> bash-3.00#
>
> After much tracing with strace, it is revealed that beam crashes after 
> using inet_gethost as a port.  Beam appears to conduct a successful 
> transaction with inet_gethost, then starts to close the port.  
> inet_gethost shuts down properly, but beam segfaults immediately after 
> receiving SIGCHLD.
>
> Any ideas where to look next?
>
> Thanks,
> Dan.
>
>
> Here is a fragment of a trace:
>
> hints:
> pid 3931 = beam
> pid 3937 = inet_gethost
> pid 3938 = inet_gethost child worker process
> comments in double braces, ie {{comment}}
>
>
> bash-3.00# strace -f erl
> .
> (snip)
> .
> [pid  3931] close(7)                    = 0         {{this is beam's 
> write pipe to inet_gethost}}
> [pid  3931] fcntl64(10, F_GETFL)        = 0x801 (flags 
> O_WRONLY|O_NONBLOCK)
> [pid  3931] fcntl64(10, F_SETFL, O_WRONLY) = 0
> [pid  3931] close(10 <unfinished ...>
> [pid  3937] <... select resumed> )      = 1 (in [0])
> [pid  3931] <... close resumed> )       = 0
> [pid  3937] read(0,  <unfinished ...>
> [pid  3931] times( <unfinished ...>
> [pid  3937] <... read resumed> "", 4)   = 0
> [pid  3931] <... times resumed> {tms_utime=9, tms_stime=0, 
> tms_cutime=0, tms_cstime=0}) = 1923210188
> [pid  3937] kill(3938, SIGUSR1 <unfinished ...>    {{inet_gethost 
> cleans up its child}}
> [pid  3931] gettimeofday( <unfinished ...>
> [pid  3937] <... kill resumed> )        = 0
> [pid  3931] <... gettimeofday resumed> {1149519332, 422564}, NULL) = 0
> [pid  3937] exit_group(0)               = ?
> Process 3937 detached  {{inet_gethost}
> [pid  3931] times({tms_utime=9, tms_stime=0, tms_cutime=0, 
> tms_cstime=0}) = 1923210188
> [pid  3931] --- SIGCHLD (Child exited) @ 0 (0) ---     {{ beam sees 
> inet_gethost exiting }}
> [pid  3931] --- SIGSEGV (Segmentation fault) @ 0 (0) ---  {{beam goes 
> tits up :( }}
> [pid  3938] <... read resumed> "", 4)   = 0
> [pid  3938] --- SIGUSR1 (User defined signal 1) @ 0 (0) ---
> Process 3938 detached
> [pid  3935] <... poll resumed> [{fd=5, events=POLLIN}], 1, 2000) = -1 
> EINTR (Interrupted system call)
> [pid  3936] +++ killed by SIGKILL +++
> [pid  3931] +++ killed by SIGSEGV +++
> +++ killed by SIGKILL +++
> bash-3.00#
>
>




More information about the erlang-questions mailing list