[erlang-bugs] Troubles with ethr_dw_atomic_cmpxchg implementation on intel Atom?

Filip Andres filip@REDACTED
Wed Jan 20 18:42:28 CET 2016


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@REDACTED=0x568688f0
<erts_proc+48>) at beam/utils.c:5004
#5  0x5671572b in ptab_list_bif_engine (c_p=c_p@REDACTED=0xf6dc0218,
res_accp=res_accp@REDACTED=0xf4e06178,
    mbp=mbp@REDACTED=0xf1f80a88) at beam/erl_ptab.c:927
#6  0x56716a5d in erts_ptab_list (c_p=c_p@REDACTED=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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20160120/e13a6bae/attachment.htm>


More information about the erlang-bugs mailing list