aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/common
AgeCommit message (Collapse)Author
2019-02-19Merge branch 'sverker/heart-nice-exit/OTP-15599' into maintSverker Eriksson
* sverker/heart-nice-exit/OTP-15599: erts: Avoid heart killing a nicely exiting emulator
2019-02-14erts: Avoid heart killing a nicely exiting emulatorSverker Eriksson
Symptom: Heart kills exiting emulator before is has flushed all ports and with HEART_KILL_SIGNAL=SIGABRT it may also produce unnecessary core dumps from doing init:reboot() for example. Problem: Heart port is closed together with all the others in handle_reap_ports() which is detected by heart OS process. Solution 1: Leave the heart port alone in handle_reap_ports() and let it be closed by OS when emulator exists. It doesn't need to be flushed anyway. Solution 2: When heart OS process gets EOF on connection let it wait max 5 seconds for emulator process to self terminate before trying to kill it.
2019-01-28Add -ztma option for enabling tuple callsRichard Carlsson
2018-06-18Update copyright yearHenrik Nord
2018-05-24Fix use-after-free on Windows in escriptBenedikt Reinartz
Since commit 385b18de6fd72672ed7d6736b30f56d6691d4433, the emulator path was not copied anymore before pushing it to the args vector (before it was done within the `push_words` function. Since on Windows `free_env_val` is not a NOP as it is on Unix systems, the string is freed and afterwards used, leading to strange errors like this: escript: Error executing 'àyI': 2 This is fixed by removing the `free_env_val` call.
2018-05-03Merge branch 'maint'John Högberg
* maint: Updated OTP version Update release notes Update version numbers ssl: Prepare for release ssl: Proper handling of clients that choose to send an empty answer to a certificate request heart: Use ntohs instead of manual conversion
2018-05-02Merge branch 'john/erts/fix-heart-command-overflow/OTP-15034/ERIERL-166' ↵Erlang/OTP
into maint-20 * john/erts/fix-heart-command-overflow/OTP-15034/ERIERL-166: heart: Use ntohs instead of manual conversion # Conflicts: # lib/kernel/test/heart_SUITE.erl
2018-04-24heart: Use ntohs instead of manual conversionJohn Högberg
Multiplying a signed char by 256 is undefined behavior and caused problems on some platforms when the length was long enough. We could cast it to an unsigned int to make it work, but it's best not to reinvent the wheel. Fixes OTP-15034
2018-04-23erts: Rewrite memory instrumentationJohn Högberg
This commit replaces the old memory instrumentation with a new implementation that scans carriers instead of wrapping erts_alloc/erts_free. The old implementation could not extract information without halting the emulator, had considerable runtime overhead, and the memory maps it produced were noisy and lacked critical information. Since the new implementation walks through existing data structures there's no longer a need to start the emulator with special flags to get information about carrier utilization/fragmentation. Memory fragmentation is also easier to diagnose as it's presented on a per-carrier basis which eliminates the need to account for "holes" between mmap segments. To help track allocations, each allocation can now be tagged with what it is and who allocated it at the cost of one extra word per allocation. This is controlled on a per-allocator basis with the +M<S>atags option, and is enabled by default for binary_alloc and driver_alloc (which is also used by NIFs).
2018-03-26Add +sbwt/+swt analogues for dirty schedulersJohn Högberg
Sharing these settings for all schedulers can degrade performance, so it makes sense to be able to configure them separately. This also changes the default busy-wait time to "short" for both kinds of dirty schedulers.
2018-03-06Merge branch 'raimo/stop-encouraging-v4-mapped/ERL-503/OTP-13716'Raimo Niskanen
* raimo/stop-encouraging-v4-mapped/ERL-503/OTP-13716: Stop translating V4MAPPED addresses Stop returning V4MAPPED addresses Implement function for IPv4-mapped IPv6 addresses
2018-02-13Stop returning V4MAPPED addressesRaimo Niskanen
2018-02-12Merge 'sverker/maint-20/alloc-n-migration/ERIERL-88'Sverker Eriksson
into 'sverker/master/alloc-n-migration/ERIERL-88'
2018-02-12Merge 'sverker/maint-19/alloc-n-migration/ERIERL-88'Sverker Eriksson
into 'sverker/maint-20/alloc-n-migration/ERIERL-88' OTP-14915 OTP-14916 OTP-14917 OTP-14918
2018-02-08erts: Add migration options "acnl" and "acfml"Sverker Eriksson
acnl: Abandon Carrier Nr Limit acfml: Abandon Carrier Free block Min Limit
2017-12-05Merge branch 'john/erts/erlexec-bindir-path/OTP-14719'John Högberg
2017-12-05Ensure that bindir is first in $PATH on startupJohn Högberg
erlexec adds $ROOT/erts-<vsn>/bin and $ROOT/bin first in $PATH on startup, but didn't do so if they were in the $PATH already, which meant that the bindir didn't point to the current release after a downgrade.
2017-10-18Merge branch 'maint'Lukas Larsson
2017-10-18Merge branch 'lukas/erts/win_user_home_dir/OTP-14691' into maintLukas Larsson
* lukas/erts/win_user_home_dir/OTP-14691: erts: Use PROFILE dir as home on windows
2017-10-17Merge branch 'dgud/dot_erlang/OTP-14439'Dan Gudmundsson
* dgud/dot_erlang/OTP-14439: fixup! Do not load .erlang from current dir erlc: Do not load .erlang escript: Do not load .erlang dialyzer: Do not load .erlang reltool: Add no_dot_erlang bootfiles Enable usage of no_dot_erlang in bootstrap Do not load .erlang from current dir
2017-10-13erts: Use PROFILE dir as home on windowsLukas Larsson
Instead of using C:\Windows we use the profile path as the home path on windows. The profile path normally resolves to C:\Users\%USERNAME%. This fixes an issue where the default path to the .erlang.cookie was not the same for jinterface as for erl.
2017-10-02erts: Move all I/O polling to a seperate threadLukas Larsson
2017-09-28erlc: Do not load .erlangDan Gudmundsson
Use 'no_dot_erlang' start script for tools. Options and paths should be stated on the command line, via a Makefile, rebar.config etc.
2017-09-28escript: Do not load .erlangDan Gudmundsson
Previously you could not opt out on loading .erlang, change the default to not load the resource file. The escript author can invoke c:erlangrc(PathList) to find and load .erlang if needed.
2017-09-28dialyzer: Do not load .erlangDan Gudmundsson
Use 'no_dot_erlang' start script for tools. Options and paths should be stated on the command line.
2017-09-11erts: non-smp removal cleanup in erlexecLukas Larsson
2017-07-17erts: Remove ERTS_SMP and USE_THREAD definesLukas Larsson
This refactor was done using the unifdef tool like this: for file in $(find erts/ -name *.[ch]); do unifdef -t -f defile -o $file $file; done where defile contained: #define ERTS_SMP 1 #define USE_THREADS 1 #define DDLL_SMP 1 #define ERTS_HAVE_SMP_EMU 1 #define SMP 1 #define ERL_BITS_REENTRANT 1 #define ERTS_USE_ASYNC_READY_Q 1 #define FDBLOCK 1 #undef ERTS_POLL_NEED_ASYNC_INTERRUPT_SUPPORT #define ERTS_POLL_ASYNC_INTERRUPT_SUPPORT 0 #define ERTS_POLL_USE_WAKEUP_PIPE 1 #define ERTS_POLL_USE_UPDATE_REQUESTS_QUEUE 1 #undef ERTS_HAVE_PLAIN_EMU #undef ERTS_SIGNAL_STATE
2017-07-17erts: Remove usage of sys.h from etc toolsLukas Larsson
2017-07-11Fix building debug emulator on windowsJohn Högberg
CFLAGS weren't updated to include the sys/common directory for this build target.
2017-07-06Merge branch 'john/erts/runtime-lcnt' into maintJohn Högberg
* john/erts/runtime-lcnt: Document rt_mask and add warnings about copy_save Add an emulator test suite for lock counting Break erts_debug:lock_counters/1 into separate BIFs Allow toggling lock counting at runtime Move lock flags to a common header Enable register_SUITE for lcnt builds Enable lcnt smoke test on all builds that have lcnt enabled Make lock counter info independent of the locks being counted OTP-14412 OTP-13170 OTP-14413
2017-07-06Allow toggling lock counting at runtimeJohn Högberg
The implementation is still hidden behind ERTS_ENABLE_LOCK_COUNT, and all categories are still enabled by default, but the actual counting can be toggled at will. OTP-13170
2017-07-02escript.c: remove dead codeMikael Pettersson
2017-05-24Merge branch 'rickard/escript-space-path-fix/OTP-14433'Rickard Green
* rickard/escript-space-path-fix/OTP-14433: escript: Do not split path to Erlang system into multiple words
2017-05-24Merge pull request #1475 from rickard-green/rickard/escript-emulator-fixRickard Green
Fix erlang system lookup from escript bug introduced in PR #1293 OTP-14201
2017-05-23escript: Do not split path to Erlang system into multiple wordsRickard Green
escript failed to start Erlang systems with spaces in the absolute path (when absolute path was used).
2017-05-23Fix erlang system lookup from escript bug introduced in PR #1293Rickard Green
Erlang system found in PATH was used even when explicitly pointing out the escript binary in another Erlang system.
2017-05-23Revert setting default argv0 nameDan Gudmundsson
Changing argv[0] from emu name to progname if ESCRIPT_NAME was not set caused to many failing scripts, revert that part of the change. See 86f6a9856
2017-05-16Teach erlexec the -emu_type optionBjörn Gustavsson
Add the option -emu_type to start an emulator of a certain type. For exampe, "-emu_type lcnt" will start beam.lcnt.smp. Any string will be accepted after -emu_type. If there is no corresponding emulator, there will be an error similar to: erlexec: The emulator '.../bin/x86_64-unknown-linux-gnu/beam.foo.smp' does not exist. On Windows, there is an undocumented option "-debug". Remove that option, because -emu_type can be used instead.
2017-05-04Update copyright yearRaimo Niskanen
2017-04-28Merge branch 'dgud/erts/erlscript_name'Dan Gudmundsson
* dgud/erts/erlscript_name: Rename argv[0] from beam to invoking program name OTP-14381
2017-04-27Merge branch 'rickard/ds-stack-size'Rickard Green
OTP-14380 * rickard/ds-stack-size: Suggested stack size options for dirty schedulers
2017-04-24Rename argv[0] from beam to invoking program nameDan Gudmundsson
Allows ps and htop to display the invoking program/script name instead of beam[.smp].
2017-04-21erts: Deprecate the non-smp emulatorsLukas Larsson
2017-04-21Merge branch 'bjorn/dialyzer/add-typer/OTP-14336' into run-travisBjörn Gustavsson
* bjorn/dialyzer/add-typer/OTP-14336: Add smoke test for TypER Add back TypEr to the main OTP repository
2017-04-20Add back TypEr to the main OTP repositoryBjörn Gustavsson
It turned out that the dependencies between Dialyzer and TypEr makes it impractical to have TypEr in a separate repository. Add it back to the OTP repository, but put the Erlang module 'typer' in the dialyzer application.
2017-04-20erts: Rebuild etc executables if config.h changesLukas Larsson
2017-04-11Suggested stack size options for dirty schedulersRickard Green
2017-03-28Merge branch 'lukas/erts/hide-debug-consoles'Lukas Larsson
* lukas/erts/hide-debug-consoles: erts: Only show debug consoles if ERL_CONSOLE_MODE is defined
2017-03-08Remove typer applicationSiri Hansen
The application now has an own repo, https://github.com/erlang/typer
2017-03-06erts: Only show debug consoles if ERL_CONSOLE_MODE is definedLukas Larsson