aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
AgeCommit message (Collapse)Author
2017-11-30Ensure that trailing slashes are ignored on list_dirJohn Högberg
2017-11-30Ensure that root paths are translated to our preferred formJohn Högberg
2017-11-30Tighten timings in delayed_writeJohn Högberg
The cumulative wait time was as long as the delay itself in the flush-on-size test, causing the test to pass because the write managed to time out.
2017-11-30pread/2 must always return a list of resultsJohn Högberg
2017-11-30Test opening raw files in the same manner as regular onesJohn Högberg
2017-11-30Add microbenchmarks for file:read/2 and file:write/2John Högberg
2017-11-30Account for new behavior in tests that touch prim_fileJohn Högberg
This also hides the module behind ?PRIM_FILE to make testing new implementations less painful.
2017-11-30Reimplement efile_drv as a dirty NIFJohn Högberg
This improves the latency of file operations as dirty schedulers are a bit more eager to run jobs than async threads, and use a single global queue rather than per-thread queues, eliminating the risk of a job stalling behind a long-running job on the same thread while other async threads sit idle. There's no such thing as a free lunch though; the lowered latency comes at the cost of increased busy-waiting which may have an adverse effect on some applications. This behavior can be tweaked with the +sbwt flag, but unfortunately it affects all types of schedulers and not just dirty ones. We plan to add type-specific flags at a later stage. sendfile has been moved to inet_drv to lessen the effect of a nasty race; the cooperation between inet_drv and efile has never been airtight and the socket dying at the wrong time (Regardless of reason) could result in fd aliasing. Moving it to the inet driver makes it impossible to trigger this by closing the socket in the middle of a sendfile operation, while still allowing it to be aborted -- something that can't be done if it stays in the file driver. The race still occurs if the controlling process dies in the short window between dispatching the sendfile operation and the dup(2) call in the driver, but it's much less likely to happen now. A proper fix is in the works. -- Notable functional differences: * The use_threads option for file:sendfile/5 no longer has any effect. * The file-specific DTrace probes have been removed. The same effect can be achieved with normal tracing together with the nif__entry/nif__return probes to track scheduling. -- OTP-14256
2017-11-27Merge branch 'maint'Dan Gudmundsson
* maint: Update HOWTO with wxWidgets build examples https should be mapped to url and not seealso Update kernel appup for OTP-20.2
2017-11-27Merge branch 'siri/appups-20.2' into maintSiri Hansen
* siri/appups-20.2: Update kernel appup for OTP-20.2
2017-11-23Merge branch 'sverker/async-auto-connect/OTP-14370' AGAINSverker Eriksson
2017-11-23erts: Fix erlang:monitor toward c-nodesSverker Eriksson
by suppressing DOP_MONITOR_P, DOP_MONITOR_P_EXIT and DOP_DEMONITOR_P if not supported by the remote node. In 17e198d6ee60f7dec9abfed272cf4226aea44535 I changed the behavior of erlang:monitor to not raise badarg for c-nodes but instead create a monitor to only supervise the connection. But I forgot to prevent DOP_MONITOR_P and friends from being sent to the node that does not expect them. Note: We test both DFLAG_DIST_MONITOR and DFLAG_DIST_MONITOR_NAME for the node to support process monitoring. This is because erl_interface is buggy as it sets DFLAG_DIST_MONITOR without really supporting it. ToDo: Should erl_interface stop setting DFLAG_DIST_MONITOR or should we change the meaning of these flags?
2017-11-22Fix broken to_dis after merge from maint to masterBjörn Gustavsson
d8d07a7593d811 that added the to_dis option to the compiler no longer works when merged to master. That is because of 79f28cfd8df1b7 that removed some unused code in erts_debug. Fix this by adding a new function erts_debug:dis_to_file/2 and use it from compile module where we have access to the filename (in beam_listing we only have an opened file).
2017-11-20Merge branch 'maint'Lukas Larsson
2017-11-20Merge branch 'lukas/system/improve_profile_docs/OTP-14633' into maintLukas Larsson
* lukas/system/improve_profile_docs/OTP-14633: erts: Add term2bin note about encoding guarantee Fix broken link in INSTALL howto system: Add info to profiling effeciency guide Update message queue and pinfo binary docs kernel: Clarify gen_tcp:listen documentation system: Add External OSS tools section to profiling guilde
2017-11-20Merge branch 'maint'Lukas Larsson
Conflicts: lib/compiler/src/beam_listing.erl
2017-11-20Merge branch 'lukas/compiler/add_to_dis/OTP-14784' into maintLukas Larsson
* lukas/compiler/add_to_dis/OTP-14784: compiler: Add +to_dis option that dumps loaded asm
2017-11-20compiler: Add +to_dis option that dumps loaded asmLukas Larsson
2017-11-20Merge branch 'maint'Lukas Larsson
2017-11-20Merge branch 'lukas/docs/xmllint_fixes/OTP-14721' into maintLukas Larsson
* lukas/docs/xmllint_fixes/OTP-14721: ssl/ssh: Remove/ignore unused XML_FILES doc files Refactor xmllint check and make it fail on failure Add toplevel xmllint make target Conflicts: lib/crypto/doc/src/Makefile
2017-11-15Move new|abort_connection_id to erts_internalSverker Eriksson
and drop _id suffix.
2017-11-15Cleanup net_kernelSverker Eriksson
2017-11-15Improve connection abortingSverker Eriksson
2017-11-15erts: Keep magic ref to DistEntry in net_kernelSverker Eriksson
to make sure it's kept alive.
2017-11-15erts: Introduce asynchronous auto-connectSverker Eriksson
2017-11-15kernel: Move auto connect into net_kernel serverSverker Eriksson
as a preparation for async auto-connect requests.
2017-11-15erts: Make DFLAGS_NEW_FUN_TAGS mandatorySverker Eriksson
and remove ugly encoding fallback as {fun, ...} DFLAGS_NEW_FUN_TAGS has been supported by vm/erl_interface/jinterface since R13 or even older. Renamed test case obsolete_funs to term2bin_tuple_fallbacks and removed test for {fun,...} fallback and added missing test for bitstring fallback {Binary, Bits}.
2017-11-15Merge PR-1605 from sverker/sverker/binary_to_term-used OTP-14780Sverker Eriksson
Add 'used' option for binary_to_term/2
2017-11-10Merge branch 'maint'Ingela Anderton Andin
* maint: Updated OTP version Update release notes Update version numbers inets: Prepare for release inets: Add missing guard Avoid WindowBits=8 as per the manual Fix deflateParams on zlib 1.2.11 Ignore empty binaries in enif_inspect_iovec Emasculate writable binaries on entering an iovec Only apply EOS behaviors if there's pending data Conflicts: OTP_VERSION
2017-11-10Merge branch 'maint-20' into maintIngela Anderton Andin
* maint-20: Updated OTP version Update release notes Update version numbers inets: Prepare for release inets: Add missing guard Avoid WindowBits=8 as per the manual Fix deflateParams on zlib 1.2.11 Ignore empty binaries in enif_inspect_iovec Emasculate writable binaries on entering an iovec Only apply EOS behaviors if there's pending data Stop assuming that all schedulers are managed when updating msacc
2017-11-09Merge branch 'john/erts/fix-gunzip-eos/OTP-14730/ERL-507' into maint-20Erlang/OTP
* john/erts/fix-gunzip-eos/OTP-14730/ERL-507: Only apply EOS behaviors if there's pending data
2017-11-09Avoid WindowBits=8 as per the manualJohn Högberg
The docs for zlib:deflateInit/6 explicitly mention that 8 is broken and should not be used unless we know for certain that our zlib version supports it.
2017-11-09Fix deflateParams on zlib 1.2.11John Högberg
1.2.11 started bailing when avail_out==0 regardless of whether there's anything to flush or not, and there's no point in adapting the old method since it was vulnerable to bugs in other zlib versions which updated the deflate parameters even on failure. The api_deflateParams test has been expanded accordingly, and two white-box cases in zip_usage has been updated to make fewer assumptions about the output; the validity of the compressed data is what matters, not whether it's exactly the same as the test vector.
2017-11-02Only apply EOS behaviors if there's pending dataJohn Högberg
2017-10-31Refactor xmllint check and make it fail on failureLukas Larsson
This commit also adds a check to see that all files that are part of an xi:include also have part of XML_FILES and vice versa. It also fixes any applications where this was not true.
2017-10-31kernel: Clarify gen_tcp:listen documentationLukas Larsson
2017-10-30Merge branch 'lukas/erts/misc_fixes'Lukas Larsson
* lukas/erts/misc_fixes: erts: Fix a bunch of compiler warnings kernel: Fix gen_tcp_misc indentation erts: Fail port_SUITE:huge_env if error code > 127 erts: Add lcnt prototype for dist locks update
2017-10-25Merge branch 'maint'John Högberg
* maint: Updated OTP version Update release notes Update version numbers erts: Fix so that bind correct schedulers Update version Fix error handling when decoding an AVP with an alternate dictionary Remove unused function arguments Fix faulty recursion vsn -> 2.1.2 Update appup for ERIERL-14684 Fix speling error 'sndbuf' -> 'recbuf' Add zlib:set_controlling_process/2
2017-10-25Merge branch 'maint-20' into maintJohn Högberg
* maint-20: Updated OTP version Update release notes Update version numbers erts: Fix so that bind correct schedulers Update version Fix error handling when decoding an AVP with an alternate dictionary Remove unused function arguments Fix faulty recursion vsn -> 2.1.2 Update appup for ERIERL-14684 Fix speling error 'sndbuf' -> 'recbuf' Add zlib:set_controlling_process/2
2017-10-23Update kernel appup for OTP-20.2Siri Hansen
2017-10-18kernel: Fix gen_tcp_misc indentationLukas Larsson
2017-10-17kernel: Fix erl_distribution_wb_SUITESverker Eriksson
to use binary_to_term/2 with 'used' option and not rely on term_to_binary generating the same format.
2017-10-17Merge branch 'maint'Hans Bolinder
* maint: stdlib: Make ets:i/1 exit cleaner upon ^D (old Erlang shell)
2017-10-17Merge branch 'hasse/stdlib/fix_ets_i_1/OTP-14663' into maintHans Bolinder
* hasse/stdlib/fix_ets_i_1/OTP-14663: stdlib: Make ets:i/1 exit cleaner upon ^D (old Erlang shell)
2017-10-17Merge branch 'dgud/kernel/get_chars_raw_echo_off'Dan Gudmundsson
* dgud/kernel/get_chars_raw_echo_off: Let io:get_chars/2 (echo off) fetch chars without eol
2017-10-12Merge branch 'rickard/null-chars/ERL-370/OTP-14543'Rickard Green
* rickard/null-chars/ERL-370/OTP-14543: Don't allow null chars in various strings Conflicts: erts/emulator/beam/erl_alloc.types erts/preloaded/ebin/erlang.beam
2017-10-12Merge branch 'maint'Rickard Green
* maint: Revert "Merge branch 'rickard/null-char-filenames/ERL-370/OTP-14543' into maint"
2017-10-12Revert "Merge branch 'rickard/null-char-filenames/ERL-370/OTP-14543' into maint"Rickard Green
This reverts commit 0717a2194e863f3a78595184ccc5637697f03353, reversing changes made to 71a40658a0cef8b3e25df3a8e48a72d0563a89bf.
2017-10-11Don't allow null chars in various stringsRickard Green
Various places that now reject null chars inside strings - Primitive file operations reject it in filenames. - Primitive environment variable operations reject it in names and values. - os:cmd() reject it in its input. Also '=' characters are rejected by primitive environment variable operations in environment variable names. Documentation has been updated to document null characters in these types of data as invalid. Currently these operations accept null chars at the end of strings, but that will change in the future.
2017-10-11Add zlib:set_controlling_process/2John Högberg