beam.smp segfault if there are disabled cpu cores

Konstantin Nikiforov helllamer@REDACTED
Thu Aug 12 18:08:47 CEST 2010


Archlinux x86_64

Steps to demonstrate the segfault:

0) starting erlang
$ erl
Erlang R13B04 (erts-5.7.5) [source] [64-bit] [smp:2:2] [rq:2]
[async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.7.5  (abort with ^G)
1>


1) disabling one of two cpu cores in power-saving purposes
echo 0 > /sys/devices/system/cpu/cpu1/online


2) starting erlang
$ erl
zsh: segmentation fault  erl
$ dmesg
...
CPU 1 is now offline
SMP alternatives: switching to UP code
beam.smp[14894]: segfault at 7f07a9d3e560 ip 00000000004403f8 sp
00007fff336e70e0 error 6 in beam.smp[400000+1dc000]


3) enabling cpu core back
echo 1 > /sys/devices/system/cpu/cpu1/online


4) starting erlang
$ erl
Erlang R13B04 (erts-5.7.5) [source] [64-bit] [smp:2:2] [rq:2]
[async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.7.5  (abort with ^G)
1>


All ok then all CPU cores enabled. CPU cores goes to offline automatically
in linux notebooks to minimize power consumption then AC plug off.


More information about the erlang-bugs mailing list