diff options
author | Steve Vinoski <[email protected]> | 2014-10-26 21:23:00 -0400 |
---|---|---|
committer | Steve Vinoski <[email protected]> | 2014-10-26 22:06:55 -0400 |
commit | 1e5eb4314301e33a105a0ff1f860d9d290ea2618 (patch) | |
tree | abcd79fafc9b86cbc38fb72899ea0caae80d4d9c /erts/emulator | |
parent | 8304aeb0114e61e8f694a58cf9e91a00856c3fe5 (diff) | |
download | otp-1e5eb4314301e33a105a0ff1f860d9d290ea2618.tar.gz otp-1e5eb4314301e33a105a0ff1f860d9d290ea2618.tar.bz2 otp-1e5eb4314301e33a105a0ff1f860d9d290ea2618.zip |
Fix "-smp disable" for emulator with dirty schedulers
Running "erl -smp disable" on an emulator built with dirty scheduler
support caused problems such as segmentation violations and emulator status
line outputs containing garbage. For example:
$ erl -smp disable
Segmentation fault (core dumped)
and:
$ erl -smp disable
Erlang/OTP 17 [DEVELOPMENT] [erts-6.2] [source] [64-bit] [ds:10:4297895689:4299948152] [async-threads:280]
This problem also caused the emulator smoke_test_SUITE to hit these same
problems if run in an emulator started with the "-smp disable" option.
Fix this segmentation violation by ensuring that dirty scheduler
information is printed in the status line only when the emulator is
compiled with ERTS_SMP enabled.
With this fix in place, the smoke_test_SUITE now passes when the "-smp
disable" option is used, and the emulator status line prints correctly for
both "-smp enable" and "-smp disable":
$ erl -smp enable
Erlang/OTP 17 [DEVELOPMENT] [erts-6.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [kernel-poll:false]
and:
$ erl -smp disable
Erlang/OTP 17 [DEVELOPMENT] [erts-6.2] [source] [64-bit] [async-threads:10] [kernel-poll:false]
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/beam/erl_bif_info.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c index 6efe9d9550..e977c2ec5f 100644 --- a/erts/emulator/beam/erl_bif_info.c +++ b/erts/emulator/beam/erl_bif_info.c @@ -90,7 +90,7 @@ static char erts_system_version[] = ("Erlang/OTP " ERLANG_OTP_RELEASE " [smp:%beu:%beu]" #endif #ifdef USE_THREADS -#ifdef ERTS_DIRTY_SCHEDULERS +#if defined(ERTS_DIRTY_SCHEDULERS) && defined(ERTS_SMP) " [ds:%beu:%beu:%beu]" #endif " [async-threads:%d]" |