beam.smp segfault if there are disabled cpu cores

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

beam.smp segfault if there are disabled cpu cores

Konstantin Nikiforov
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.
Reply | Threaded
Open this post in threaded view
|

Re: beam.smp segfault if there are disabled cpu cores

Rickard Green-2
Konstantin Nikiforov wrote:

> 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.
>

This bug has been fixed in R14A. The fix can be found in our github
repository at
<http://github.com/erlang/otp/commit/943ad16fa4b6335b6e170cc94fc7df9041ff4e47>.

Regards,
Rickard Green
--
Rickard Green, Erlang/OTP, Ericsson AB.

________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:[hidden email]