Troubles with ethr_dw_atomic_cmpxchg implementation on intel Atom?
Filip Andres <[email protected]> Wed, 20 Jan 2016 18:42:28 +0100
| Newsgroups | gmane.comp.lang.erlang.bugs |
|---|---|
| Message-ID | <CAD0a1+bigifMLjg4upvewdSmSct7ZQU4eZwknSSrgdEW-mgqMA@mail.gmail.com> |
--===============3201172513528957973==
Content-Type: multipart/alternative; boundary=001a1136c4baa572d10529c78390
--001a1136c4baa572d10529c78390
Content-Type: text/plain; charset=UTF-8
Hello,
I have found out that on intel Atom processors the erlang:processes()
crashes the VM.
To me it seems like a glitch in the implementation of
ethr_dw_atomic_cmpxchg on platforms lacking native support for double word
compare-and-exchange (although I cannot claim I really understand all of
erl_threads.h and atomic.h).
GDB stacktrace:
(gdb) bt
#0 0x56798d70 in ethr_dw_atomic_cmpxchg () at
../include/internal/i386/atomic.h:177
#1 0x566103ce in ethr_dw_atomic_cmpxchg_nob (xchg=0xf4e0609c,
new=0xf4e060a4, var=0x568688f0 <erts_proc+48>)
at beam/erl_threads.h:1456
#2 erts_atomic64_inc_read_nob (var=0x568688f0 <erts_proc+48>) at
beam/erl_threads.h:1646
#3 step_interval_nob (icp=0x568688f0 <erts_proc+48>) at beam/utils.c:4954
#4 erts_smp_step_interval_nob (icp=icp@entry=0x568688f0
<erts_proc+48>) at beam/utils.c:5004
#5 0x5671572b in ptab_list_bif_engine (c_p=c_p@entry=0xf6dc0218,
res_accp=res_accp@entry=0xf4e06178,
mbp=mbp@entry=0xf1f80a88) at beam/erl_ptab.c:927
#6 0x56716a5d in erts_ptab_list (c_p=c_p@entry=0xf6dc0218,
ptab=0x568688c0 <erts_proc>) at beam/erl_ptab.c:766
#7 0x5661be76 in processes_0 (A__p=0xf6dc0218, BIF__ARGS=0xf7483100)
at beam/bif.c:3841
#8 0x5659978b in process_main () at beam/beam_emu.c:3690
#9 0x56638784 in sched_thread_func (vesdp=0xf6087dc0) at
beam/erl_process.c:8021
#10 0x567a19cc in thr_wrapper (vtwd=0xffffd1b4) at pthread/ethread.c:114
#11 0xf7f164be in start_thread (arg=0xf4e06b40) at pthread_create.c:333
#12 0xf7e2a3fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114
Some more information in:
https://bugzilla.redhat.com/show_bug.cgi?id=1221824
--001a1136c4baa572d10529c78390
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div><div><div>Hello,<br></div>I have found out that on in=
tel Atom processors the erlang:processes() crashes the VM.<br>To me it seem=
s like a glitch in the implementation of ethr_dw_atomic_cmpxchg on platform=
s lacking native support for double word compare-and-exchange (although I c=
annot claim I really understand all of erl_threads.h and atomic.h).<br></di=
v><br></div>GDB stacktrace:<span style=3D"font-family:arial,helvetica,sans-=
serif"><br></span><pre class=3D"" id=3D"comment_text_25"><span style=3D"fon=
t-family:arial,helvetica,sans-serif">(gdb) bt
#0 0x56798d70 in ethr_dw_atomic_cmpxchg () at ../include/internal/i386/ato=
mic.h:177
#1 0x566103ce in ethr_dw_atomic_cmpxchg_nob (xchg=3D0xf4e0609c, new=3D0xf4=
e060a4, var=3D0x568688f0 <erts_proc+48>)
at beam/erl_threads.h:1456
#2 erts_atomic64_inc_read_nob (var=3D0x568688f0 <erts_proc+48>) at b=
eam/erl_threads.h:1646
#3 step_interval_nob (icp=3D0x568688f0 <erts_proc+48>) at beam/utils=
.c:4954
#4 erts_smp_step_interval_nob (icp=3Dicp@entry=3D0x568688f0 <erts_proc+=
48>) at beam/utils.c:5004
#5 0x5671572b in ptab_list_bif_engine (c_p=3Dc_p@entry=3D0xf6dc0218, res_a=
ccp=3Dres_accp@entry=3D0xf4e06178,=20
mbp=3Dmbp@entry=3D0xf1f80a88) at beam/erl_ptab.c:927
#6 0x56716a5d in erts_ptab_list (c_p=3Dc_p@entry=3D0xf6dc0218, ptab=3D0x56=
8688c0 <erts_proc>) at beam/erl_ptab.c:766
#7 0x5661be76 in processes_0 (A__p=3D0xf6dc0218, BIF__ARGS=3D0xf7483100) a=
t beam/bif.c:3841
#8 0x5659978b in process_main () at beam/beam_emu.c:3690
#9 0x56638784 in sched_thread_func (vesdp=3D0xf6087dc0) at beam/erl_proces=
s.c:8021
#10 0x567a19cc in thr_wrapper (vtwd=3D0xffffd1b4) at pthread/ethread.c:114
#11 0xf7f164be in start_thread (arg=3D0xf4e06b40) at pthread_create.c:333
#12 0xf7e2a3fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:114</=
span></pre>Some more information in: <a href=3D"https://bugzilla.redhat.com=
/show_bug.cgi?id=3D1221824">https://bugzilla.redhat.com/show_bug.cgi?id=3D1=
221824</a><br></div>
--001a1136c4baa572d10529c78390--
--===============3201172513528957973==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs
--===============3201172513528957973==--