From 202bb737e3deabfebee683266f4b7c42781eb521 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 30 Apr 2018 10:06:42 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 768 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 768 insertions(+) (limited to 'erts/doc/src/notes.xml') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index fcc7ec5b66..fb33710340 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,774 @@

This document describes the changes made to the ERTS application.

+
Erts 10.0 + +
Fixed Bugs and Malfunctions + + +

+ The type specifications for file:posix/0 and + inet:posix/0 have been updated according to which + errors file and socket operations should be able to + return.

+

+ Own Id: OTP-14019 Aux Id: ERL-550

+
+ +

+ Fix error printout from run_erl and a bug that could + cause unintended fds to be leaked into the started + program.

+

+ Own Id: OTP-14537 Aux Id: PR1529

+
+ +

File operations used to accept filenames + containing null characters (integer value zero). This + caused the name to be truncated and in some cases + arguments to primitive operations to be mixed up. + Filenames containing null characters inside the filename + are now rejected and will cause primitive file + operations to fail.

Also environment variable + operations used to accept names and + values of + environment variables containing null characters (integer + value zero). This caused operations to silently produce + erroneous results. Environment variable names and values + containing null characters inside the name or value are + now rejected and will cause environment variable + operations to fail.

Primitive environment + variable operations also used to accept the $= + character in environment variable names causing various + problems. $= characters in environment variable + names are now also rejected.

Also + os:cmd/1 now + reject null characters inside its command. +

erlang:open_port/2 + will also reject null characters inside the port name + from now on.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14543 Aux Id: ERL-370

+
+ +

+ Fix bugs related to the bookkeeping of microstate + accounting states.

+

+ Own Id: OTP-14652

+
+ +

os:putenv and os:getenv no longer access + the process environment directly and instead work on a + thread-safe emulation. The only observable difference is + that it's not kept in sync with libc + getenv(3) / putenv(3), so those who relied + on that behavior in drivers or NIFs will need to add + manual synchronization.

On Windows this means that + you can no longer resolve DLL dependencies by modifying + the PATH just before loading the driver/NIF. To + make this less of a problem, the emulator now adds the + target DLL's folder to the DLL search path.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14666

+
+ +

Corrected erlang:is_builtin(erlang, M, F) to + return true for apply/2 and + yield/0.

+

+ Own Id: OTP-14713 Aux Id: ERL-500

+
+ +

Fixed a bug where the PATH environment variable wasn't + updated correctly on a release downgrade, effectively + keeping the PATH of the new release.

+

+ Own Id: OTP-14719

+
+ +

A receive optimization that avoids scanning the entire + message queue when receiving a message containing a + freshly created reference could in rare circumstances + (involving recursive calls to the functions that does the + receive) cause the receive to hang. This has been + corrected.

+

+ Own Id: OTP-14782 Aux Id: ERL-511

+
+ +

+ Fix building of Erlang/OTP on platforms which have small + data area with short addressing. For example the + PowerPC/RTEMS platform.

+

+ Own Id: OTP-14909 Aux Id: PR-1692

+
+ +

Fixed a crash when enif_make_binary is called + with a binary produced by enif_inspect_binary in a + different environment.

+

+ Own Id: OTP-14931

+
+ +

Fixed a crash when enif_make_binary is called + more than once with a binary that had previously been + added to an enif_ioq.

+

+ Own Id: OTP-14932

+
+ +

+ The erl_child_setup program now ignores SIGTERM signals.

+

+ Own Id: OTP-14943 Aux Id: ERL-576

+
+ +

+ Force 64-bit alignment on pre-allocators on architectures + which needs it.

+

+ Own Id: OTP-14977

+
+ +

+ Fixed a bug where dirty scheduler picked up non-dirty + work.

+

+ Own Id: OTP-14978

+
+ +

+ Calls to gen_tcp:send/2 on closed sockets now returns + {error, closed} instead of + {error,enotconn}.

+

+ Own Id: OTP-15001

+
+ +

+ erlang:monotonic_time/1 failed with badarg + when passing the perf_counter time unit as + argument.

+

+ Own Id: OTP-15008

+
+ +

+ Fix bug where rapid init:restart() calls would + sometimes crash because a code load request leaked in + between the restarts.

+

+ Own Id: OTP-15013

+
+ +

+ Improve float_to_list(F, [{decimals,D}]) to closer + conform with io_lib:format("~.*f", [D,F]).

+

+ There are however, still cases when float_to_list + does not produce the exact same result as + io_lib:format, especially for large values + F and/or many decimals D.

+

+ Own Id: OTP-15015 Aux Id: OTP-14890

+
+ +

Fixed a deadlock that would occur on certain + allocators when a reallocation failed with +ramv + enabled.

+

+ Own Id: OTP-15024

+
+ +

+ Fix bug that made it impossible to use an erl_tracer as + the seq_trace trace receiver.

+

+ Own Id: OTP-15029

+
+ +

+ Fix bug where a large (> 1 GB) emulator generated error + logger message would cause the emulator to crash.

+

+ Own Id: OTP-15032

+
+
+
+ + +
Improvements and New Features + + +

It is now possible to open device files and FIFOs with + file:open/2.

+

+ Own Id: OTP-11462

+
+ +

+ The erlang:system_flag(scheduler_wall_time,Bool) call is + now reference counted and will be turned off if the + (last) process that started the performance statistics + dies. Thus it is no longer possible to start the + statistics with rpc:call(Node, erlang, system_flag, + [scheduler_wall_time, true]) since it will be turned off + directly afterwards when the rpc process dies.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-11694

+
+ +

+ A new logging API is added to OTP. This is implemented in + the Kernel application, module logger.

+

+ Legacy calls to error_logger will be automatically + redirected to the new API.

+

+ See the reference manual for module logger, and the + User's Guide for the Kernel application for more + information.

+

+ Own Id: OTP-13295

+
+ +

+ gen_sctp:connect_init/4 or rather connect in + inet_drv.c for SCTP has been fixed to not check + the write file descriptor for writeability after a + connect, since for SCTP (SOCK_SEQPACKET) that property + does not seem to be any kind of indicator for when a + connect has finished. This fixes connects that the OS + returned as "in progress" that was misinterpreted by + gen_sctp:connect_init as failed.

+

+ Own Id: OTP-13760 Aux Id: PR-1592

+
+ +

The file driver has been rewritten as a NIF, + decreasing the latency of file operations. Two notable + incompatibilities are:

The + use_threads option for file:sendfile/5 no + longer has any effect; we either use non-blocking + sendfile(2) or fall back to file:read + + gen_tcp:send.

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.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14256

+
+ +

The I/O polling functionality of erts has been + re-written to better make use of the OSs polling + mechanisms. This change means that erts will now always + prefer to use a kernel-polling mechanism if possible. + Also all of the I/O polling has been moved to dedicated + threads instead of being placed in the scheduler + loops.

As a result of this, the erl options + +K and +secio have been removed. It is + still possible to disable kernel-poll, but it has to be + done at compile time through the configure option + --disable-kernel-poll.

The new erl + options +IOt + and +IOp can + be used to change how many IO poll threads and poll sets + that erts should use. See their respective documentation + for more details.

+

+ Own Id: OTP-14346

+
+ +

Truly asynchronous auto-connect. Earlier, when + erlang:send was done toward an unconnected node, + the function would not return until the connection setup + had completed (or failed). Now the function returns + directly after the signal has been enqueued and the + connection setup started.

+

The same applies to all distributed operations that + may trigger auto-connect, i.e. '!', send, + link, monitor, monitor_node, + exit/2 and group_leader.

+

The interface for all these functions are unchanged as + they do not return connection failures. The only + exception is erlang:monitor where a possible + incompatibility is introduced: An attempt to monitor + a process on a primitive node (such as erl_interface or + jinterface), where remote process monitoring is not + implemented, will no longer fail with badarg + exception. Instead a monitor will be created, but it will + only supervise the connection to the node.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14370

+
+ +

Changed the default behaviour of .erlang + loading: .erlang is no longer loaded from the + current directory. c:erlangrc(PathList) can be + used to search and load an .erlang file from user + specified directories.

escript, + erlc, dialyzer and typer no longer + load an .erlang at all.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14439

+
+ +

+ New functionality for implementation of alternative + carriers for the Erlang distribution has been introduced. + This mainly consists of support for usage of distribution + controller processes (previously only ports could be used + as distribution controllers). For more information see + ERTS + User's Guide ➜ How to implement an Alternative Carrier + for the Erlang Distribution ➜ Distribution + Module.

+

+ Own Id: OTP-14459

+
+ +

+ Add support for the lcc compiler and in extension the + Elbrus 2000 platform.

+

+ Own Id: OTP-14492

+
+ +

Support for "tuple calls" have been removed from the + run-time system. Tuple calls was an undocumented and + unsupported feature which allowed the module argument for + an apply operation to be a tuple: Var = dict:new(), + Var:size(). This "feature" frequently caused + confuses, especially when such call failed. The + stacktrace would point out functions that don't exist in + the source code.

+

For legacy code that need to use parameterized modules + or tuple calls for some other reason, there is a new + compiler option called tuple_calls. When this + option is given, the compiler will generate extra code + that emulates the old behavior for calls where the module + is a variable.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14497

+
+ +

Creation of small maps with literal keys has been + optimized to be faster and potentially use less memory . + The keys are combined into a literal key tuple which is + put into the literal pool. The key tuple can be shared + between many instances of maps having the same keys.

+

+ Own Id: OTP-14502

+
+ +

+ When an exception is thrown, include the arguments of the + call in the stacktrace for BIFs band, bor, + bsl, bsr, bxor, div, + rem and the operators +, -, * + and /.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14508

+
+ +

+ The non-smp emulators have been removed. This means that + the configure options --disable-threads and + --enable-plain-emulator have been removed and + configure will now refuse to build Erlang/OTP on + platforms without thread support.

+

+ In order to achieve a similar setup as the non-smp + emulator, it is possible to start Erlang/OTP with the + +S 1 option.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14518

+
+ +

Modules that use floating point constants compiled + with R15 or earlier will need to be re-compiled before + they can be loaded.

+

+ Own Id: OTP-14575

+
+ +

+ Implementation of true asynchronous signaling between + processes in order to improve scalability. Signals + affected include exit, monitor, demonitor, monitor + triggered, link, unlink, and group leader.

+

+ Own Id: OTP-14589

+
+ +

+ Added a PGO (profile guided optimization) pass to the + build step of erts. This can be disabled by passing + --disable-pgo to configure.

+

+ Own Id: OTP-14604

+
+ +

+ Improved the performance of binary:split and + binary:match.

+

+ Own Id: OTP-14610 Aux Id: PR-1480

+
+ +

+ It is not longer possible to disable dirty schedulers + when building erlang.

+

+ Own Id: OTP-14613

+
+ +

Loaded BEAM code in a 64-bit system requires less + memory because of better packing of operands for + instructions.

+

These memory savings were achieved by major + improvements to the beam_makeops scripts used when + building the run time system and BEAM compiler. There is + also new for documentation for beam_makeops that + describes how new BEAM instructions and loader + transformations can be implemented. The documentation is + found in here in a source directory or git repository: + erts/emulator/internal_doc/beam_makeops.md. An online + version can be found here: + https://github.com/erlang/otp/blob/master/erts/emulator/internal_doc/beam_makeops.md

+

+ Own Id: OTP-14626

+
+ +

file:read_file has been changed to read the + content of files that report a size of 0 even when data + can be read from them. An example of such a file is + /proc/cpuinfo on Linux.

+

+ Own Id: OTP-14637 Aux Id: ERL-327 PR-1524

+
+ +

+ It is no longer possible to disable the temp_alloc + allocator. Disabling it caused serious performance + degradations and was never what was wanted.

+

+ Own Id: OTP-14651

+
+ +

The reduction cost of sending messages is now + constant. It will no longer scale according to the length + of the receiving process' message queue.

+

+ Own Id: OTP-14667

+
+ +

+ Improved loading of modules with -on_load + directive, to no longer block all schedulers when the + load operation is completed.

+

+ Own Id: OTP-14680

+
+ +

+ On platforms with real-time signals available, SIGRTMIN+1 + is now used as the internal scheduler suspend signal + instead of SIGUSR2.

+

+ Own Id: OTP-14682

+
+ +

When the value returned from a 'catch' + expression is ignored, no stacktrace will be built if an + exception is caught. That will save time and produce less + garbage. There are also some minor optimizations of + 'try/catch' both in the compiler and + run-time system.

+

+ Own Id: OTP-14683

+
+ +

The guarantees and non-guarantees of + erlang:get_stacktrace/0 are now documented.

+

+ Own Id: OTP-14687

+
+ +

There is a new syntax in 'try/catch' for + retrieving the stacktrace without calling + 'erlang:get_stacktrace/0'. See the reference + manual for a description of the new syntax. The + 'erlang:get_stacktrace/0' BIF is now + deprecated.

+

+ Own Id: OTP-14692

+
+ +

+ New 'used' option for binary_to_term/2 that will + also return number of bytes actually read from the + binary. This enables easy access to any extra data in the + binary located directly after the returned term.

+

+ Own Id: OTP-14780

+
+ +

+ Added more statistics for + erlang:system_info({allocator,A}) in the + mbcs_pool section.

+

+ Own Id: OTP-14795 Aux Id: ERL-88

+
+ +

Added enif_ioq_peek_head to allow retrieving + Erlang terms from NIF IO queues without having to resort + to copying.

+

+ Own Id: OTP-14797

+
+ +

There is a new option 'makedep_side_effect' for + the compiler and -MMD for 'erlc' that + generates dependencies and continues to compile as + normal.

+

+ Own Id: OTP-14830

+
+ +

Added ets:whereis/1 for retrieving the table + identifier of a named table.

+

+ Own Id: OTP-14884

+
+ +

seq_trace labels may now be any erlang + term.

+

+ Own Id: OTP-14899

+
+ +

+ Optimized the common case of monitor followed by + send to the same local process. The monitor signal + is now delayed in order to be piggybacked with the sent + message and thereby only get one lock operation on the + message queue of the receiver. A delayed monitor signal + is flushed if no send has been done at the latest + when the process is scheduled out.

+

+ Own Id: OTP-14901

+
+ +

+ Make hipe compiled code work on x86_64 (amd64) with OS + security feature PIE, where executable code can be loaded + into a random location. Old behavior, if hipe was + enabled, was to disable PIE build options for the VM.

+

+ Own Id: OTP-14903

+
+ +

The number of driver async threads will now default to + 1 as the standard drivers do not use them anymore. Users + that changed this value to tweak the file driver should + replace +A with +SDio since it now uses + dirty IO schedulers instead of async threads.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14928

+
+ +

+ Optimize == and /= for binaries with + different sizes to be constant in time instead of + proportional to the size of their common prefix.

+

+ Own Id: OTP-14934 Aux Id: PR-1708

+
+ +

+ Refactorings making some internal process flags available + for other usage.

+

+ Own Id: OTP-14948

+
+ +

+ Removed need for HiPE to allocate native executable + memory in low 2GB address space on x86_64. Command line + option +MXscs is thereby obsolete and ignored.

+

+ Own Id: OTP-14951

+
+ +

Added enif_make_map_from_arrays for creating a + populated map, analogous to + enif_make_list_from_array.

+

+ Own Id: OTP-14954

+
+ +

Added configuration switches for busy-wait and wake up + thresholds for dirty schedulers, and changing these + settings for normal schedulers will no longer affect + dirty schedulers.

Refer to the documentation for + details. The new switches are +sbwtdcpu, +sbwtdio, +swtdcpu, and +swtdio.

The + default busy wait threshold for dirty scheduler threads + has also been lowered to short.

+

+ Own Id: OTP-14959

+
+ +

+ The list of "taints" now also includes dynamic loaded + drivers in addition to NIF libraries. Statically linked + drivers and NIF libraries that are part of erts are not + included. The "taints" are returned by + system_info(taints) and printed in the header of + erl_crash.dump files.

+

+ Own Id: OTP-14960

+
+ +

Added instrument:allocations and + instrument:carriers for retrieving information + about memory utilization and fragmentation.

+

The old instrument interface has been removed, + as have the related options +Mim and + +Mis.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14961

+
+ +

Added the nifs option to + ?MODULE:module_info/1 for listing a module's + installed NIF functions.

+

+ Own Id: OTP-14965

+
+ +

+ New implementation of erlang:process_info/[1,2].

+

+ In the general case when inspecting another process, the + new implementation sends an asynchronous process-info + request signal to the other process and waits for the + result instead of locking the other process and reading + the result directly. In some special cases where no + conflicts occur, signal order wont be violated, and the + amount of data requested is guaranteed to be small, the + inspected process may be inspected directly.

+

+ Appropriate amount of reductions are now also bumped when + inspecting a process.

+

+ Own Id: OTP-14966

+
+ +

+ Removed process start time from crash dump in order to + save memory in process control block.

+

+ Own Id: OTP-14975 Aux Id: PR-1597

+
+ +

+ Optimize erlang:put/2 when updating existing key + with a new immediate value (atom, small integer, pid, + port).

+

+ Own Id: OTP-14976

+
+ +

+ erlang:process_info/1 has been changed to no + longer include messages by default. Instead + erlang:process_info/2 should be used.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14986 Aux Id: PR-1745

+
+ +

+ New NIF functions: enif_mutex_name, enif_cond_name, + enif_rwlock_name, enif_thread_name, enif_vfprintf, + enif_vsnprintf.

+

+ Own Id: OTP-14994

+
+ +

When erlang:system_flag(backtrace_depth, 0) has + been called, all exceptions will now contain the entry + for one function (despite the zero). It used to + be that a hand-made stack backtrace passed to + erlang:raise/3 would be be truncated to an empty + list.

+

+ Own Id: OTP-15026

+
+ +

+ Fixed bug for named ets tables which could cause + unexpected results from matchspec iteration functions + (ets:select* and ets:match*) if the table + was deleted and recreated with the same name during the + iteration. The iteration could incorrectly continue + through the recreated table. The expected correct + behavior is now for the iteration call to fail with a + badarg exception if the table is deleted before + the iteration has completed.

+

+ Own Id: OTP-15031

+
+ +

The map_get/2 guard BIF has been added. It + works the same way as maps:get/2, except that it + is allowed to use it in guards.

+

+ Own Id: OTP-15037 Aux Id: PR-1784

+
+
+
+ +
+
Erts 9.3
Fixed Bugs and Malfunctions -- cgit v1.2.3