Fix so that the options to enable Transparent Huge Page alignment of the Erlang VM executable are only applied to the Erlang VM and not other native programs such as erlc and dialyzer. This bug was introduced in Erlang/OTP 27.0.
When no time warp mode was enabled, a smaller Erlang monotonic time could be read than a previously read time, i.e., breaking the monotonic property. The runtime system will abort when detecting an issue like this since OTP 24.3.4.17 and OTP 25.0.
A binary returned from the socket receive functions is no longer created as a sub binary of an often large receive buffer binary (socket option otp,rcvbuf). This avoids space waste, trusting the allocators to implement reallocation efficiently.
The erl command now supports the -S flag, which is similar to the -run flag, except that it will pass all arguments up to end of the command line to the called function. (The -run flag will not pass arguments beginning with a hyphen.) Another difference is that -S will always call a function with one argument, passing an empty list if no arguments were given.
When implementing an alternative carrier for the Erlang distribution, a separate input handler process may now be registered, using erlang:dist_ctrl_input_handler/2, also in the case when the distribution controller is a port.
When the runtime system halts, it performs various flush operations before terminating. By default there is no limit on how much time the flush operations are allowed to take. A new halt flush timeout functionality has been introduced which can be used for limiting the amount of time that the flushing operations are allowed to take. For more information see the documentation of the flush_timeout option of the erlang:halt/2 BIF and the documentation of the erl +zhft command line flag.
Safe destructive update of tuples has been implemented in the compiler and runtime system. This allows the VM to update tuples in-place when it is safe to do so, thus improving performance by doing less copying but also by producing less garbage.
The obsolete and undocumented support for opening a port to an externalresource by passing an atom (or a string) as first argument toopen_port(), implemented by the vanilla driver,has been removed. This feature has been scheduled for removal in OTP 27since the release of OTP 26.
An optional NIF callback ERL_NIF_OPT_ON_UNLOAD_THREAD to be called by all scheduler threads when a NIF library is unloaded. Used for releasing thread specific data. Can be set with function enif_set_option.
Added the +MMlp onoff emulator option to let the mseg allocator use "large pages" (sometimes known as "huge pages" or "super pages"). This currently only affects super-carrier allocations, but may be extended in the future.
Calling erlang:trace/3 with first argument one of ports, processes, existing_ports, existing_processes, existing or all, could cause emulator crash if a dirty scheduler was executing a simultaneous trace action.
A new configure argument --enable-ensure-os-monotonic-time has also been added. It enables functionality ensuring the monotonicity of monotonic timestamps delivered by the OS. When a non-monotonic timestamp is detected, it will be replaced by the last delivered monotonic timestamp before being used by Erlang's time functionality. Note that you do not want to enable this unless the OS monotonic time source on the system fails to produce monotonic timestamps. This since ensuring the monotonicity of OS monotonic timestamps will hurt scalability and performance of the system.
A process optimized for parallel signal delivery could under some circumstances lose wakeup information. That is, the processes was not woken up to take care of the signal, so the signal would not be taken care of until the process was woken by another signal. Only processes configured with message_queue_data set to off_heap utilize this optimization.
32-bit runtime systems on most Unix like platforms could crash if a BIF timer was set with a huge timeout of more than 68 years into the future. In order for the crash to occur, the huge timer (at a later time than when it was set) had to become the nearest active timer set on the specific scheduler on which it was set. This could not happen on a system with only one scheduler since there would always be shorter timers in the system.
A process with message_queue_data configured as off_heap could end up inan inconsistent state when being receive traced, inspected usingprocess_info/2 with the message_queue_len item, orinspected using the break menu (CTRL-C). When it ended up in this inconsistentstate, it was not enqueued into a run queue even though it was set in arunnable state.This also effected signals being sent to the process after ithad gotten into this inconsistent state, in such a way that it was from thispoint not possible to communicate with it.
A race occurring when a process was selected for dirty executionsimultaneously as it was scheduled for handling a signal could cause theprocess to end up in an inconsistent state. When it ended up in thisinconsistent state, it was not enqueued into a run queue even though it wasset in a runnable state. This also effected signals being sent to the processafter it had gotten into this inconsistent state, in such a way that it wasfrom this point not possible to communicate with it.
When a process had to to wait in the run queue for a long time before beingselected for dirty execution, it could not receive signals. This causedinspection of such a process, for example usingprocess_info/2, to take a long time.
Incoming distributed messages larger than 64 KiB sent using an alias which hadbeen removed on the receiving node could crash the node. This crash was quiteunlikely on OTP 24 and OTP 25, but very likely on OTP 26.
If the external term format encoding of an argument list part of a distributedspawn operation was faulty, the newly spawned remote process could misbehave.The misbehavior included hanging or interpret an incoming message as anargument list to use. This was very unlikely to happen unless using analternate implementation of the distribution protocol which made a faultyencoding of the argument list. The child process will now detect this errorand terminate before executing the user specified code.
Fix bugs where if the body of a matchspec would return a map with a variable('$1', '$_' etc) as one of the keys or values and the variable was not animmidiate, the term would not be copied to the receiving processes heap. Thiswould later corrupt the term in the table as the GC could place move markersin it, which in turn would cause the VM to crash.
A process optimized for parallel signal delivery could under somecircumstances lose wakeup information. That is, the processes was not woken upto take care of the signal, so the signal would not be taken care of until theprocess was woken by another signal. Only processes configured withmessage_queue_data set tooff_heap utilize this optimization.
Delivery time of message signals to a process not executing any receiveexpressions could become very long, potentially infinite. For example, aprocess checking for messages usingprocess_info(self(), message_queue_len) orprocess_info(self(), messages) and avoiding to execute areceive expression matching on messages could be very slow in detecting newmessages. Note that you are still discouraged from using process_info() thisway. A process that wants to check if there are messages available to handleshould execute a receive expression matching on messages.
Fix bug causing "magic" references in a compressed ETS table to not keep thereferred object alive. The symptom would be the referred object being garbagecollected prematurely and the reference appearing stale, not referring toanything. Examples of such magically referred objects are atomics and NIFresources.
A BEAM file usually contains a chunk with the tag "Type" containing typeinformation that can be used by the JIT. The beam_lib:strip/1 takes care topreserve that chunk, but a build/release tool that does customized strippingcould accidentally remove the chunk. Loading a BEAM file without the "Type"chunk could cause incorrect behavior of the loaded code.
In Erlang/OTP 27, by default escripts will be compiled before being executed.That means that the compiler application must be installed. It is possibleto force the escript to be interpreted by adding the directive-mode(interpret). to the escript file.
The enif_set_option() function has beenintroduced into the NIF API. It can be used in order to set theERL_NIF_OPT_DELAY_HALT and/orERL_NIF_OPT_ON_HALT options with which one cansynchronize halt of the runtime system with flushing enabled and execution ofNIFs.Halt of the runtime system without flushing enabled, nowterminates the runtime system without execution of atexit/on_exit handlersthat may have been installed into the runtime system which might be considereda potential incompatibility.
Windows users will notice that erl.exe has the same functionality as a normalUnix shell and that werl.exe has been removed and replaced with a symlink toerl.exe. This makes the Windows Erlang terminal experience identical to thatof Unix.
If you have old code in the system that is not time warp safe, you nowexplicitly need to start the system inno time warp mode (orsinge time warp mode if it ispartially time warp safe) in order to avoid problems. When starting the systemin no time warp mode, the system behaves as it did prior to the introductionof the extended time functionality introduced in OTP 18.
If you have code that is not time warp safe, you are strongly encouraged tochange this so that you can use multi time warp mode. Compared to no time warpmode, multi time warp mode improves scalability and performance as well asaccuracy and precision of time measurements.
The behavior of setting reuseaddr on Windowshave changed in a backwards incompatible way. The underlying SO_REUSEADDRsocket option is now only set if both the reusaddr and the reuseportinet options have been set. This since the underlying SO_REUSEADDR socketoption on Windows behaves similar to how BSD behaves if both the underlyingsocket options SO_REUSEADDR and SO_REUSEPORT have been set. See thedocumentation of the reuseaddr option for more information.
c80f0f1006