aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
AgeCommit message (Collapse)Author
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.
2017-04-20implement SO_BINDTODEVICE for inet protocolsAndreas Schultz
bind to device is needed to properly support VRF-Lite under Linux (see [1] for details). [1]: https://www.kernel.org/doc/Documentation/networking/vrf.txt
2017-04-12Merge branch sverker/remove-latin1-atom-encoding/OTP-14337Sverker Eriksson
* sverker/remove-latin1-atom-encoding: kernel: Fix erl_distribution_wb_SUITE:whitebox kernel: Remove pg2_SUITE:compat erts: Remove fun_r13_SUITE stdlib: Remove test cases for R12 io protocol kernel: Make DFLAG_UTF8_ATOMS mandatory kernel: Rewrite distribution flag verification tools: Update assumptions in lcnt about external atom format stdlib: Tweak beam_lib_SUITE whitebox assumptions orber: Remove hard dependency to external atom format kernel: Try mend disk_log whitebox tests erts: Mark latin1 atom encoding as deprecated jinterface: Do not generate atoms on old latin1 external format erl_interface: Do not generate atoms on old latin1 ext format erts: Do not generate atoms on old latin1 external format erts: Fix faulty ASSERT for failed dec_term
2017-03-30kernel: Refactor supervision treeBjörn-Egil Dahlberg
Use maps in definitions to make them more readable.
2017-03-14Merge branch 'hasse/fix_erl_anno_use'Hans Bolinder
* hasse/fix_erl_anno_use: parsetools: Fix handling of locations and annotations diameter: Fix handling of locations and annotations kernel: Fix handling of locations and annotations compiler: Fix handling of locations and annotations eunit: Fix handling of locations and annotations Update preloaded erts: Fix handling of locations and annotations dialyzer: Fix handling of annotations in a test debugger: Fix handling of locations and annotations stdlib: Extend functions in erl_parse to handle form_info() stdlib: Fix handling of locations and annotations erts: Correct the documentation of abstract end-of-file stdlib: Add debug tests to the erl_parse module stdlib: improve the erl_anno module's debug tests stdlib: Improve the erl_pp module's debug tests
2017-03-13kernel: Make DFLAG_UTF8_ATOMS mandatorySverker Eriksson
2017-03-13kernel: Rewrite distribution flag verificationSverker Eriksson
2017-03-09Merge branch 'maint'Siri Hansen
Conflicts: lib/kernel/src/kernel.appup.src lib/stdlib/src/stdlib.appup.src
2017-03-08kernel: Fix handling of locations and annotationsHans Bolinder
2017-03-08Update appups in kernel and stdlib for OTP-19.3Siri Hansen
2017-02-22Merge branch 'maint'Lukas Larsson
2017-02-21kernel: Fix hanging os:cmd race conditionLukas Larsson
If the port terminates before Port ! close is issued, there will be no 'closed' reply, so the old code would hang. As it turns out there is no way to figure out if a closed reply is supposed to come as that reply is sent after all links and monitors are triggered. So we have to use the synchronous port_close to close the port.
2017-02-15Merge branch 'fix-source-typos'Björn Gustavsson
* fix-source-typos: (25 commits) Fixed typos in system/doc Fixed typos in lib/xmerl Fixed typos in lib/wx Fixed typos in lib/stdlib Fixed typos in lib/snmp Fixed typos in lib/ssl Fixed typos in lib/ssh Fixed typos in PKCS-8.asn1 file Fixed typos in lib/parsetools Fixed typos in lib/orber Fixed typos in lib/mnesia Fixed typos in lib/megaco Fixed typos in lib/kernel Fixed typos in lib/jinterface Fixed typos in lib/inets Fixed typos in lib/hipe Fixed typos in lib/eunit Fixed typos in lib/erl_interface Fixed typos in lib/eldap Fixed typos in lib/edoc ...
2017-02-15Merge branch 'jur0/fix-function-name'Björn Gustavsson
* jur0/fix-function-name: Fix function name
2017-02-14Fixed typos in lib/kernelAndrew Dryga
2017-02-11Fix function nameJuraj Hlista
From camel case to snake case.
2017-02-06Use magic refs for code loading stateRickard Green
2017-02-06Merge branch 'maint'Björn Gustavsson
* maint: Store messages for 'rex' and 'error_logger' off heap file: match enoent and enotdir in path_open
2017-02-06Merge pull request #1328 from bjorng/bjorn/kernel/off-heap-message/OTP-14142Björn Gustavsson
Store messages for 'rex' and 'error_logger' off heap OTP-14192
2017-02-06Merge pull request #1283 from pulitta/maintBjörn Gustavsson
file: match enoent and enotdir in path_open OTP-14191
2017-02-03Merge branch 'egil/20/erts/signal-service/OTP-14186'Björn-Egil Dahlberg
* egil/20/erts/signal-service/OTP-14186: kernel: Document signal server erts: Use os module instead of erts_internal for set_signal/2 erts: Do not handle SIGILL erts: Fix thread suspend in crashdump erts: Do not enable SIGINT erts: Use generic signal handler erts: Add OS signal tests erts: Handle SIGUSR1 via signal service instead erts: Handle SIGTERM via signal service instead kernel: Add gen_event signal server and default handler erts: Add SIGHUP signal handler erts: Remove whitespace errors Conflicts: erts/emulator/beam/bif.tab
2017-02-03Store messages for 'rex' and 'error_logger' off heapBjörn Gustavsson
Performance for processes that receive huge amounts of messages can be increased by storing the incoming messages outside the heap (that avoids copying the message in a garbage collection). Two OTP processes that are known to receive many messages are 'rex' (used by 'rpc') and 'error_logger'.
2017-02-02erts: Use os module instead of erts_internal for set_signal/2Björn-Egil Dahlberg
* Add specs * Change return signature to 'ok' instead of 'true'
2017-02-02erts: Use generic signal handlerBjörn-Egil Dahlberg
2017-02-01file: match enoent and enotdir in path_openpulitta
2017-01-19erts: Handle SIGUSR1 via signal service insteadBjörn-Egil Dahlberg
2017-01-19erts: Handle SIGTERM via signal service insteadBjörn-Egil Dahlberg
2017-01-19kernel: Add gen_event signal server and default handlerBjörn-Egil Dahlberg
2017-01-12Support for dirty BIFsRickard Green
2016-12-19Merge branch 'maint'Björn-Egil Dahlberg
2016-12-19Merge branch 'legoscia/remove-watchdog-vestiges/PR-1255/OTP-14112' into maintBjörn-Egil Dahlberg
* legoscia/remove-watchdog-vestiges/PR-1255/OTP-14112: Remove vestiges of watchdog support in heart
2016-12-07Merge branch 'maint'Dan Gudmundsson
* maint: Update copyright-year Conflicts: lib/dialyzer/src/dialyzer.hrl lib/dialyzer/src/dialyzer_options.erl lib/dialyzer/test/opaque_SUITE_data/src/recrec/dialyzer.hrl lib/dialyzer/test/opaque_SUITE_data/src/recrec/dialyzer_races.erl lib/hipe/icode/hipe_icode.erl lib/hipe/main/hipe.erl lib/hipe/main/hipe.hrl.src lib/hipe/main/hipe_main.erl
2016-12-07Update copyright-yearErlang/OTP
2016-12-01Merge branch 'richcarl/kernel/disk_log_tweaks/OTP-14057/PR-1245'Hans Bolinder
* richcarl/kernel/disk_log_tweaks/OTP-14057/PR-1245: Pass log format through from handle() Improve caching in disk_log Use pattern matching for records where suitable Eliminate more code duplication Simplify for rflat Clarify that the type for disk log data is iodata() Pass through known size instead of recomputing Use iolist_size instead of local function Only read log format once in collect loop Eliminate some code duplication Rename internal function for clarity Minor documentation cleanup
2016-11-29Pass log format through from handle()Richard Carlsson
2016-11-29Improve caching in disk_logRichard Carlsson
Avoid starting timers for flushing when the written data is empty or larger than the max cache size. Previously, a single huge write to an empty cache would be put in the cache until the next write or the timer event. Also increase the cache size from 16K to 64K.
2016-11-29Use pattern matching for records where suitableRichard Carlsson
2016-11-29Eliminate more code duplicationRichard Carlsson
2016-11-29Simplify for rflatRichard Carlsson