[erlang-questions] beam[8449]: segfault at 0 ip 0000000000437e10 sp 00007fffce250948 error 4 in beam[400000+174000]

Mikael Pettersson <>
Mon May 24 15:14:53 CEST 2010


Liang Yupeng wrote:
> Thanks for your reply, Mikael. Yes, it is beam.smp and 64-bit one.

I have some doubts about that, see below.

> > 3. what tools (esp. gcc version) was this built with?
> >
> I install erlang by the command apt-get:
...
> Is this OK? Should I install a new beam-vm by source to get some debug info?

Run `strings -a /path/to/beam | fgrep GCC | sort -u'
(where /path/to/beam is the path to the beam executable).

> > 4. using gdb or objdump on the `beam' executable, can you
> >    provide a disassembly of the procedure surrounding 0x437e10?
> 
>     :~$ objdump -D /usr/lib/erlang/erts-5.7.2/bin/beam.smp >
>     beam.smp.objdump
>     :~$ cat beam.smp.objdump | grep -C 10 437e1
>       437deb:    48 83 c4 38              add    $0x38,%rsp
>       437def:    e9 8c fa ff ff           jmpq   437880
>     <erts_alcu_realloc_thr_spec>
>       437df4:    be 36 7e 55 00           mov    $0x557e36,%esi
>       437df9:    89 c7                    mov    %eax,%edi
>       437dfb:    e8 70 50 00 00           callq  43ce70
>     <erts_thr_fatal_error>
> 
>     0000000000437e00 <erts_alcu_realloc_ts>:
>       437e00:    4c 89 6c 24 e8           mov    %r13,-0x18(%rsp)
>       437e05:    4c 8d ae 28 01 00 00     lea    0x128(%rsi),%r13
>       437e0c:    48 89 5c 24 d0           mov    %rbx,-0x30(%rsp)
>       437e11:    48 89 6c 24 d8           mov    %rbp,-0x28(%rsp)
>       437e16:    4c 89 64 24 e0           mov    %r12,-0x20(%rsp)
>       437e1b:    48 89 f3                 mov    %rsi,%rbx
>       437e1e:    4c 89 74 24 f0           mov    %r14,-0x10(%rsp)
>       437e23:    4c 89 7c 24 f8           mov    %r15,-0x8(%rsp)
>       437e28:    41 89 fe                 mov    %edi,%r14d
>       437e2b:    48 83 ec 38              sub    $0x38,%rsp
>       437e2f:    4c 89 ef                 mov    %r13,%rdi
>       437e32:    48 89 d5                 mov    %rdx,%rbp
>       437e35:    49 89 cc                 mov    %rcx,%r12
>       437e38:    e8 e3 f1 fe ff           callq  427020
>     <>
>       437e3d:    85 c0                    test   %eax,%eax
>       437e3f:    0f 85 ae 02 00 00        jne    4380f3
>     <erts_alcu_realloc_ts+0x2f3>
>       437e45:    48 85 ed                 test   %rbp,%rbp
> 
> Is these lines enough?

This makes me suspect even more that the crash is in an instance of
the uni-processor beam executable, not the beam.smp executable.
There are two signs for that:
1. The kernel message refers to the executable as `beam' not `beam.smp'.
2. The above disassembly from beam.smp doesn't HAVE any instruction starting
   at 0x437e10.

So please do the objdump and grep thing again but on the plain `beam' executable.


More information about the erlang-questions mailing list