Segmentation fault on Linux

Edmund Dengler <>
Mon Sep 26 22:57:49 CEST 2005


# file core
core: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV), SVR4-style,
SVR4-style, from 'beam'

# gdb ./lib/erlang/erts-5.4.9/bin/beam core
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".

Core was generated by
`/opt/pkgs/erlang/10b-7/lib/erlang/erts-5.4.9/bin/beam -- -root /opt/pkgs/erlang'.
Program terminated with signal 11, Segmentation fault.

warning: current_sos: Can't read pathname for load map: Input/output error

Reading symbols from /lib/libncurses.so.5...done.
Loaded symbols for /lib/libncurses.so.5
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/librt.so.1...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
#0  0x401ac16e in __pthread_sighandler () from /lib/libpthread.so.0
(gdb) bt
#0  0x401ac16e in __pthread_sighandler () from /lib/libpthread.so.0
#1  <signal handler called>
#2  0x4013b061 in fts_children () from /lib/libc.so.6
#3  0x080ec627 in check_io (do_wait=1) at sys/unix/sys.c:2506
#4  0x080ed0db in erl_sys_schedule (runnable=0) at sys/unix/sys.c:3366
#5  0x0809c84a in schedule (p=0x0, calls=0) at beam/erl_process.c:477
#6  0x080d3aa7 in process_main () at beam/beam_emu.c:1148
#7  0x0807622f in erl_start (argc=9, argv=0x0) at beam/erl_init.c:902
#8  0x08065c1b in main (argc=-4, argv=0xfffffffc) at
sys/unix/erl_main.c:28
(gdb)

Regards!
Ed

On Mon, 26 Sep 2005, Mikael Pettersson wrote:

> Edmund Dengler writes:
>  > Howdy!
>  >
>  > I did the run, but probably not what was expected. Is there a "compile so
>  > the binary is debuggable" option for configuration?
>  >
>  > # export ROOTDIR=/opt/pkgs/erlang/10b-7/lib/erlang
>  > BINDIR=$ROOTDIR/erts-5.4.9/bin EMU=beam PROGNAME=erl
>  >
>  > # gdb
>  > GNU gdb 6.0
>  > Copyright 2003 Free Software Foundation, Inc.
>  > GDB is free software, covered by the GNU General Public License, and you are
>  > welcome to change it and/or distribute copies of it under certain conditions.
>  > Type "show copying" to see the conditions.
>  > There is absolutely no warranty for GDB.  Type "show warranty" for details.
>  > This GDB was configured as "i686-pc-linux-gnu".
>  > (gdb) file lib/erlang/erts-5.4.9/bin/erlexec
>  > Reading symbols from lib/erlang/erts-5.4.9/bin/erlexec...done.
>  > Using host libthread_db library "/lib/libthread_db.so.1".
>  > (gdb) r -- -root /opt/pkgs/erlang/10b-7/bin
>  > Starting program: /opt/pkgs/erlang/10b-7/lib/erlang/erts-5.4.9/bin/erlexec
>  > -- -root /opt/pkgs/erlang/10b-7/bin
>  > warning: Unable to find dynamic linker breakpoint function.
>  > GDB will be unable to debug shared library initializers
>  > and track explicitly loaded dynamic code.
>  > Detaching after fork from child process 835.
>  > Detaching after fork from child process 839.
>  >
>  > Program received signal SIGSEGV, Segmentation fault.
>  > 0x401ac16e in ?? ()
>  > (gdb) bt
>  > #0  0x401ac16e in ?? ()
>  > (gdb)
>  >
>  > Regards!
>  > Ed
>  >
>  > On Fri, 23 Sep 2005, Bjorn Gustavsson wrote:
>  >
>  > > Could you please run gdb on the core dump and print the stack backtrace
>  > > so that we can see where it crashed?
>  > >
>  > > /Bjorn
>
> 1) file core.$pid
>    to figure out which executable dumped it
> 2) gdb /path/to/otp/bin/$executable core.$pid
>



More information about the erlang-questions mailing list