[erlang-questions] Segfault with Erlang R22

Bekes, Andras G Andras.Bekes@REDACTED
Fri Nov 1 19:22:18 CET 2019


Program terminated with signal 11, Segmentation fault.
#0  process_main (x_reg_array=0x20002, f_reg_array=0x2) at x86_64-unknown-linux-gnu/opt/smp/beam_hot.h:5252

5252          c_p->seq_trace_lastcnt = unsigned_val(SEQ_TRACE_TOKEN_SERIAL(c_p));
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.212.el6_10.3.x86_64
(gdb) bt
#0  process_main (x_reg_array=0x20002, f_reg_array=0x2) at x86_64-unknown-linux-gnu/opt/smp/beam_hot.h:5252
#1  0x00000000004641a4 in sched_thread_func (vesdp=0x2b8244840200) at beam/erl_process.c:8465
#2  0x000000000069262a in thr_wrapper (vtwd=<value optimized out>) at pthread/ethread.c:118
#3  0x00002b81f80f7dd5 in _L_unlock_48 () from /lib64/libpthread.so.0
#4  0x00002b81f80f5eb3 in __find_thread_by_id () from /lib64/libpthread.so.0
#5  0x0000000000000000 in ?? ()
(gdb)

I am not sure how to " print the c_p parameter via its raw value (print *(Process*)0x.....)".
Where should I take the value 0x..... from?

-----Original Message-----
From: Mikael Pettersson [mailto:mikpelinux@REDACTED]
Sent: Thursday, October 24, 2019 7:10 PM
To: Bekes, Andras G (IST)
Cc: Erlang Questions
Subject: Re: [erlang-questions] Segfault with Erlang R22

On Thu, Oct 24, 2019 at 4:57 PM Bekes, Andras G
<Andras.Bekes@REDACTED> wrote:
>
> Hi Mikael,
>
> I filed a bug report in the bug tracker: https://bugs.erlang.org/browse/ERL-1074
>
> Unfortunately printing *c_p did not reveal anything:
>
> (gdb) print c_p
> $1 = <value optimized out>
> (gdb) print *c_p
> value has been optimized out
>
> What should be the next step?
> I can reliably produce 5-10 core dumps per week in my test system.

I'd try to get a backtrace (bt command in gdb) from the crashed
thread, then maybe print
the c_p parameter via its raw value (print *(Process*)0x.....) if gdb
insists that the value
is optimized out.

/Mikael

>
> -----Original Message-----
> From: Mikael Pettersson [mailto:mikpelinux@REDACTED]
> Sent: Friday, October 18, 2019 8:03 PM
> To: Bekes, Andras G (IST)
> Cc: Erlang Questions
> Subject: Re: [erlang-questions] Segfault with Erlang R22
>
> On Fri, Oct 18, 2019 at 4:34 PM Bekes, Andras G
> <Andras.Bekes@REDACTED> wrote:
> >
> > Hi All,
> >
> >
> >
> > After upgrading to Erlang R22, my software crashes the Erlang VM with Segmentation fault.
> >
> > It happens rarely, only after several days of test workload, so I can’t really reproduce.
> >
> >
> >
> > I made more than 10 core dumps so far, loaded them into gdb, and all of them died at these 2 crash points:
> >
> >
> >
> > Program terminated with signal 11, Segmentation fault.
> >
> > #0  process_main (x_reg_array=0x20002, f_reg_array=0x2ade29280590) at x86_64-unknown-linux-gnu/opt/smp/beam_hot.h:4064
> >
> > 4064      if (is_not_tuple(r(0))) {
> >
> >
> >
> > or
> >
> >
> >
> > #0  process_main (x_reg_array=0x20002, f_reg_array=0x2) at x86_64-unknown-linux-gnu/opt/smp/beam_hot.h:5252
> >
> > 5252          c_p->seq_trace_lastcnt = unsigned_val(SEQ_TRACE_TOKEN_SERIAL(c_p));
> >
> >
> >
> > The software is not doing any tracing when the crash happens, nor does it have any NIFs.
>
> I think you should open a bug report in the erlang bug tracker.
>
> The second crash site above is in the remove_message() function, in a
> block where ERL_MESSAGE_TOKEN(msgp)
> is neither NIL nor am_undefined, but SEQ_TRACE_TOKEN(c_p) is invalid
> (not the expected 5-tuple).
>
> Maybe printing *c_p in gdb when that happens could shed some light.
>
> /Mikael
>



More information about the erlang-questions mailing list