aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
AgeCommit message (Collapse)Author
2017-10-12kernel: Fix and improve send_tick logicSverker Eriksson
Problem 1: Tick was not sent to hidden when pending sends. Don't hidden need the tick in order to reply? Problem 2: Written packets (#tick.write) was increased even when tick was suppressed due to pending sends. Code rewritten to handle outgoing and incoming separate.
2017-10-02Merge branch 'maint'Rickard Green
* maint: Don't allow null in filenames
2017-09-27Don't allow null in filenamesRickard Green
2017-09-22Speed up erts_debug:df()Björn Gustavsson
The test case erts_debug_SUITE:df/1 in the emulator test suite is about 4 times faster with this change.
2017-09-20Merge branch 'maint'Dan Gudmundsson
* maint: erts, stdlib: Fix xmllint warning Update runtime deps to depend on new stdlib functionality
2017-09-19Merge pull request #1557 from egobrain/000-fix-dns-lookupRaimo Niskanen
OTP-13133 Fixed dns lookup in case of server close connection with econnrefused
2017-09-19Update runtime deps to depend on new stdlib functionalityDan Gudmundsson
~tw and new string functions are new since OTP-20 (stdlib-3.4)
2017-09-18Merge branch 'maint'Siri Hansen
2017-09-15Merge branch 'siri/string-new-api'Siri Hansen
* siri/string-new-api: (28 commits) hipe (test): Do not use deprecated functions in string(3) dialyzer (test): Do not use deprecated functions in string(3) eunit (test): Do not use deprecated functions in string(3) system (test): Do not use deprecated functions in string(3) system (test): Do not use deprecated functions in string(3) mnesia (test): Do not use deprecated functions in string(3) Deprecate old string functions observer: Do not use deprecated functions in string(3) common_test: Do not use deprecated functions in string(3) eldap: Do not use deprecated functions in string(3) et: Do not use deprecated functions in string(3) os_mon: Do not use deprecated functions in string(3) debugger: Do not use deprecated functions in string(3) runtime_tools: Do not use deprecated functions in string(3) asn1: Do not use deprecated functions in string(3) compiler: Do not use deprecated functions in string(3) sasl: Do not use deprecated functions in string(3) reltool: Do not use deprecated functions in string(3) kernel: Do not use deprecated functions in string(3) hipe: Do not use deprecated functions in string(3) ... Conflicts: lib/eunit/src/eunit_lib.erl lib/observer/src/crashdump_viewer.erl lib/reltool/src/reltool_target.erl
2017-09-14kernel: Don't call other modules from simple error loggerSiri Hansen
error_logger implements a simple handler which is used when no other handler is active. This handler is used during system startup, when there is no guarantee that all modules are loaded and must therefore not use any other modules for the formatting. Commit 41b856a2cb270ef807beaa84afe1bb890de5f237 introduced a call to io_lib:printable_list/1, which is now removed.
2017-09-13Fixed dns lookup in case of server close connection with econnrefusedKozlov Yakov
2017-09-07Merge branch 'maint'Siri Hansen
2017-09-05kernel: update simple error logger to print Unicode stringsSiri Hansen
If printable range is set to 'unicode', the simple error logger will now recognize code points > 255 and print lists containing these as strings.
2017-09-05kernel: Improve handling of UnicodeHans Bolinder
2017-08-30Merge branch 'maint'Dan Gudmundsson
* maint: Always reply to sync requests
2017-08-28Always reply to sync requestsDan Gudmundsson
Otherwise processes doing io could get stuck. See ERL-472.
2017-08-28Merge branch 'rickard/dist/OTP-14459' into rickard/dist/master/OTP-14459Rickard Green
Conflicts: erts/emulator/beam/bif.c erts/emulator/beam/dist.c erts/emulator/beam/dist.h erts/emulator/beam/erl_bif_info.c erts/emulator/beam/erl_node_tables.c erts/emulator/beam/erl_node_tables.h erts/emulator/beam/external.c
2017-08-28Introduce sender in distributed signals and dflag configurationRickard Green
2017-08-28Support for distribution controller processesRickard Green
2017-07-27Merge branch 'maint-20' into maintJohn Högberg
* maint-20: Updated OTP version Update release notes Update version numbers Fix doc for the 'quiet' option; it defaults to false asn1: Fix missing quotes of external encoding call Add a dedicated close function for TCP ports to prevent issues like ERL-430/448 Close TCP ports properly on send timeout erts: Add missing release note
2017-07-26Merge branch 'john/kernel/fix-disk-log-docs/OTP-14498' into maint-20Erlang/OTP
* john/kernel/fix-disk-log-docs/OTP-14498: Fix doc for the 'quiet' option; it defaults to false
2017-07-26Fix doc for the 'quiet' option; it defaults to falseJohn Högberg
2017-07-21Merge branch 'maint'Raimo Niskanen
2017-07-21Merge branch 'raimo/kernel/fix-spec-for-inet-get_rc-0/ERL-454' into maintRaimo Niskanen
* raimo/kernel/fix-spec-for-inet-get_rc-0/ERL-454: Improve spec and doc for inet:get_rc/0
2017-07-20Improve spec and doc for inet:get_rc/0Raimo Niskanen
2017-07-07Merge branch 'siri/appups-21'Siri Hansen
* siri/appups-21: Update sasl/test/test_lib.hrl with recent versions of kernel and stdlib Update appups in kernel, stdlib, and sasl for OTP-21.0
2017-07-06kernel: Do not use deprecated functions in string(3)Hans Bolinder
2017-07-06jeckersb/port_please-ipv6/PR-1487/OTP-14501Lukas Larsson
Fix erl_epmd:port_please when using IPv6
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-06Break erts_debug:lock_counters/1 into separate BIFsJohn Högberg
2017-06-29Update appups in kernel, stdlib, and sasl for OTP-21.0Siri Hansen
2017-06-14Fix erl_epmd:port_please when using IPv6John Eckersberg
This mirrors the behavior of inet:gethostbyname when no family or timeout is supplied.
2017-06-14Update copyright yearHans Nilsson
2017-06-12Merge branch 'hasse/unicode_atoms/OTP-14285'Hans Bolinder
* hasse/unicode_atoms/OTP-14285: compiler: Handle (bad) Unicode parse transform module names kernel: Improve handling of Unicode filenames stdlib: Handle Unicode atoms in ms_transform stdlib: Improve Unicode handling of the Erlang parser stdlib: Handle unknown compiler options with Unicode stdlib: Handle Unicode macro names stdlib: Correct Unicode handling in escript dialyzer: Improve handling of Unicode parsetools: Improve handling of Unicode atoms stdlib: Handle Unicode atoms when formatting stacktraces stdlib: Add more checks of module names to the linter stdlib: Handle Unicode atoms better in io_lib_format stdlib: Handle Unicode atoms in c.erl
2017-06-12Accept IPv6 address %suffixes when parsingRaimo Niskanen
This only implements decimal suffixes, and furthermore only with a leading "0". A complete implementation would probably allow one and probably two digit suffixes without. But what primarily is missing is translating interface names to and from interface indexes. This also only implements the parsing, and uses the FreeBSD trick of squeezing in the Scope Id in the second 16-bit word of the fe80::/64 or ff02:/64 address prefix. But inet_drv is not prepared to handle this word, so it might only work on FreeBSD, not being supported even there... So inet_drv needs to handle this too.
2017-06-09kernel: Improve handling of Unicode filenamesHans Bolinder
2017-06-07Adjust inet:ntoa/1 to RFC5952, but not deeperRaimo Niskanen
There are a multitude of RFC:s that point to each other and some of them suggest different addresses with IPv4 suffixes. Use the IPv4 suffix text representation only for the old well known ::a.b.c.d and ::ffff:a.b.c.d prefixes. The others seems to be moving targets.
2017-05-31Update inet:ntoa according to modern RFCsRaimo Niskanen
2017-05-23kernel: Add early reject of invalid node namesLukas Larsson
2017-05-19Merge branch 'hasse/kernel/global_read_concurrency/OTP-14419'Hans Bolinder
* hasse/kernel/global_read_concurrency/OTP-14419: kernel: Create table 'global_names' with read_concurrency
2017-05-19kernel: Create table 'global_names' with read_concurrencyHans Bolinder
Measurements showed contention on one of the ETS tables created by the 'global' module.
2017-05-18kernel: Introcude error_logger:get_format_depth()Hans Bolinder
2017-05-18kernel: Add error_logger:limit_term/1Hans Bolinder
Calling error_logger:limit_term/1 before sending terms as events to the error_logger can be used for limiting the size of the messages. Doing so will not change the output, but potentially save memory. The Kernel variable error_logger_format_depth is used when limiting the size of terms.
2017-05-17Add persistence to history of the non-legacy shellFred Hebert
This patch adds a mechanism by which shell history gets stored persistently on disk and gets loaded whenever a new shell session begins. The log files are added to the user's cache directory, with multiple files in it, although the location is configurable. All Erlang instances on a given host will share the same log file. There are two hook points in group.erl that are used: when instantiating the buffer, where we fetch from disk, and when adding a line to the buffer (gets stored). This allows all shell instances to use the same base set of lines when loaded, but to keep their history separate after the fact. As lines are added as you go, a new shell session (with ^G -> s -> c) will have access to previous sessions' lines. The implementation makes use of the disk_log library with a rotating log in order to store data, and allow automated repairs. By default, the feature is disabled and must be turned on through OTP environment variable part of the kernel application. The options include: | Option | Accepted values | Default | Description | | ------------------------ | ----------------- |---------- | -------------------- | | shell_history | enabled, disabled | disabled | turn feature on/off | | shell_history_path | any string | user cache| where to put files | | shell_history_file_bytes | 51200..N bytes | 512kb | max data size (>50kb)| | shell_history_drop | ["q().", ...] | [] | blacklisted lines | A version header is added to the disk_log configuration, allowing changes in the storage format to be enacted in the future (i.e. adding segmentation by node name in the same file, or encoding) without conflict. Log rotation is used with multiple log files to ensure proper enforcement of resizing without too much data loss. Because disk_log does not allow to just flush bits of content on rewrite (it truncates any full file), we instead use a wrap log and try to divide the configured size into up to 10 log files so that every time we rotate a log, we lose only 10% of the data. This remains true for corrupted files that cannot fully be repaired. This many-logs-based approach in turn forces the use of a minimal log size for the `shell_history_file_bytes` configuration, since it has to be divided by 10. The shell history is not loaded for the `user` process which, despite running the group.erl module, does not actually require history as it mostly just forwards IO protocol information.
2017-05-17add option 'quiet' to disk_logFred Hebert
This option allows to suppress output of info_msgs to error_logger when recoverable errors are encountered in disk_log by setting the value to 'true'. Defaults to 'false', the backwards compatible behaviour.
2017-05-17Fix type declaration for disk_log.hrlFred Hebert
A specific type was given as an atom rather than an actual type defintion.
2017-05-06Fix typo in child spec for file_serverBen Tyler
'modeules' -> 'modules' Introduced in 3edc6dbf8f150bb6ba7c800ed5cc379771f8b279 (present in 20.0-rc1, but not in the 19 release series).
2017-05-04Update copyright yearRaimo Niskanen
2017-04-28Merge branch 'zandra/kernel/nodenames/OTP-13805'Zandra Norman
* zandra/kernel/nodenames/OTP-13805: kernel: Do not allow unicode in nodenames
2017-04-28kernel: Do not allow unicode in nodenamesZandra Norman
Verify that unicode isn't used in a node name and logi an info message if it is. Filter the head part of the name a bit harder to work with epmd.