These release notes describe the Erlang Runtime System, i.e. the emulator, the builtin drivers,
erl_call
utility, and theerl_interface
library.Erts 4.9.1
Fixed errors and malfunctions
process_info(Pid, backtrace)
returned just a binary, not a tuple{backtrace, Pid}
, as the documentation indicates.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-3357Improvements and new features
- Funs are now a distinct type, not tuples as they used to be. Applications that assume that funs are tuples will no longer work. There are new BIFs
erlang:fun_info/2
which can be used to take funs apart anderlang:fun_to_list/1
which returns a textual representation of a fun.
Funs have their own external representaion when they are sent to other nodes. If a fun is sent to an old R5 node, it will automatically be converted to the old tuple form. Funs in the old tuple form received from other nodes will be recognized as funs in this version of OTP (R6), but not in R7.
The
check_process_code/2
BIF will now returntrue
if the process contains funs that depend on the old code of the module.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-3364- When Erlang was started the path to the runtime system was always added to the PATH environment variable. This could cause the PATH to grow indefinitely when Erlang was restarted by e.g. heart. The path is now only added if needed.
Own Id: OTP-3366- The BIF
binary_to_term/1
will now ignore any garbage following the encoded term (as it used to do in versions of OTP before R3). The undocumented BIFerlang:old_binary_to_term/1
(which is now equvivalent tobinary_to_term/1
) will be removed in a future release.
Own Id: OTP-3368Erts 4.9
Known problems
- System enters unstable state if epmd crashes
Own Id: OTP-1067
Aux Id: tir-f-054Fixed errors and malfunctions
- If more than a few thousand timers (produced by
erlang:send_after
orerlang:start_timer
) were active, the system became sluggish. This has been somewhat improved.
Own Id: OTP-3164
Aux Id: OTP-3192- Matching on bignumbers was done incorrectly so that matching two different bignumbers would succeed. Also, 'case 38792784388877 of' (bignumber literal as control expression) would not load. These errors have been corrected.
Own Id: OTP-3188
Aux Id: Seq 3645- For the particular number -134217728, the
abs
operator returned an incorrect result.
Own Id: OTP-3190- When using zombies, about 1k bytes of memory leaked for every process becoming a zombie. In BEAM, keeping large number of zombies caused Erlang to use much more memory than necessary.
Own Id: OTP-3191- The improved fun handling caused problems for the debugger. If you try interpret a module which have ever been loaded, the emulator will not invoke error_handler:undefined_lambda/3 function when it doesn't find the fun. Therefore, the debugger will never be invoked. This has been fixed so that if the emualator doesn't find a fun in the loaded code for a module, it will invoke error_handler:undefined_lambda/3 if there is no current code for the module.
Own Id: OTP-3213- erlang:old_term_to_binary/1 could crasch for certain forms of correct input. This has been corrected.
Own Id: OTP-3216
Aux Id: Seq 8- Too long argument lists to apply/2 or apply/3 used to crasch the emulator. This has been corrected. A
system_limit
exception will be generated.
Own Id: OTP-3255- 'Last change:' removed from manual page footers on Solaris 2.
Own Id: OTP-3264- The process_info(memory) call returns a more accurate number than in earlier releases. More of the internal structures (old heap and book-keeping information for binaries) are included in the count.
Own Id: OTP-3328Improvements and new features
erlang:monitor/2
can now monitor processes on other nodes.
Own Id: OTP-3113
Aux Id: OTP-2818, OTP-3114- The reference type has been extended from 18 bits to 82 bits. For compatibility with older nodes, an R6 node can send a ref to an older node; if the older node sends it back, it has lost all but its 18 least significant bits, but still compares equal to the original ref. The external format has been extended to represent the new longer refs; that means for example that binaries with refs, produced on an R6 node, cannot be converted to a term on an older node. In
erl_interface
, a functionerl_mk_long_ref
has been added, and macrosERL_REF_NUMBERS
andERL_REF_LEN
.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-3140
Aux Id: OTP-3139- BEAM only: The stack of a process was and is allocated as part of the heap. Therefore,
process_info(Pid, stack_size)
used to always return 0. Now, it instead returns the actually used size of the stack.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-3173- For each process, it is possible to save information about the last global calls made by the process.
process_flag(Pid, save_calls, N)
specifies thatN
calls are to be saved. The list of the last calls is obtained withprocess_info(Pid, last_calls)
.
Own Id: OTP-3230- The process dictionary is faster and optimized for integer keys, which makes it suitable for storing incoming messages to a gen_server.
Own Id: OTP-3233- A mechanism to express function parameter matching and trace actions is added to the emulator. It is used by the erlang:trace_pattern/2 BIF. This allows users to express which actions to take as a result of entering a traced function based on parameter type and values. The descriptions of parameter matching and associated actions are commonly called match_spec's and are documented in the erts users guide.
Own Id: OTP-3235- Erlang is now resistant to operating system time changes. The internal time, as reported by
erlang:now/0
, is slowly adjusted to match the system time without disturbing any erlang processes.
Own Id: OTP-3262
Aux Id: Seq 3896- Due to an oversight, the following improvement was left out of the documentation in previous releases: The operator
--
performs list subtraction. It is also available as the functionlists:subtract/2
.
Own Id: OTP-3318- There is now a rudimentary flow control between processes on the same node. The cost of a send operation, counted in reductions, will be proportional to the length of the receiver's message queue. This means that a process sending continously to another process will be slowed down as the message queue of the receiver grows.
Own Id: OTP-3332Erts 4.8.1
Known problems
- System enters unstable state if epmd crashes
Own Id: OTP-1067
Aux Id: tir-f-054Fixed errors and malfunctions
- In some circumstances, the first character printed on a line could be rubbed out by later material. Example:
io:format("string: ~s", ["yes\r\n"])
. The first 's' disappeared. This has been fixed.
Own Id: OTP-3084
Aux Id: OTP-3098- When editing the command line in the Erlang shell on Unix, the cursor could jump to the wrong line when characters were rubbed out in a line which wrapped over several screen lines. The problem was present at least when using an
xterm
terminal emulator. This has been fixed.
Own Id: OTP-3098
Aux Id: OTP-3084- If the
erl
option-compile
was used with no arguments, an incomprehensible error message was given. (For example, the callerl -compile -S file.erl
may be thought to compilefile.erl
with the-S
option, but it doesn't, sinceerl
command-line options cannot take other options as arguments.)
Own Id: OTP-3109- For Beam, two minor bugs in the relational operators have been corrected. Comparing an atom to a float could give the wrong answer (depending on operand order); for example,
a =< 1.0
used to returnfalse
instead oftrue
. The operator==
used to work like=:=
inside lists and tuples; for example,{42} == {42.0}
used to returnfalse
instead of the correcttrue
.
Own Id: OTP-3120- The driver_data array is initiated to late. It might be accessed (due to a SIGCHLD) before it is initiated with a emulator crash as result. The error did only occur when something was piped into
erl
from a Bourne shell on Solaris 2.6 or 2.7. This is now corrected.
Own Id: OTP-3127Improvements and new features
erlang:monitor/2
anderlang:demonitor/1
have been changed since release R5A: an info field containing the exit reason has been added to the message sent when a monitored process exits;erlang:demonitor(Ref)
can only be performed by the process which obtainedRef
by callingerlang:monitor/2
.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-3114
Aux Id: OTP-2818, OTP-3113- In Beam,
fun
s can now "survive" a code change, that is, afun
defined in the old version of a module can now be called. In previous versions of Beam and in Jam, onlyfun
s in the current version of a module could be called.
Theerror_handler
module has been extended with anundefined_lambda/3
function, which will be called if an attempt is made to call afun
that is defined in a module that is not loaded. This new function will only be called in Beam.
Fun
s in Beam are also faster than in previous versions.
Own Id: OTP-3124Erts 4.8
Fixed errors and malfunctions
- When a process exits with reason
nocatch
, the BEAM emulator now reports this to the error logger, which it did not previously do. The JAM emulator always did.
Own Id: OTP-2667- The string printed by 'erl -version' is now prettier and the emulator will terminate after printing the string.
Own Id: OTP-2815- The encoding and decoding of the Erlang types port and reference is corrected. Previously the emulator could crash when a corrupt reference or port was received from e.g a C-node. Earlier a reference created by a C-node and sent to an Erlang-node got it's creation field changed when it was sent back to the C-node. This is also corrected (for both reference and port).
Own Id: OTP-2822- Unix only:
halt()
hanged indefinitely if Erlang was started with-noinput
/-noshell
and read-only port programs had been started (for example when usinggs:start()
).
Own Id: OTP-2947
Aux Id: Seq 1409, OTP-3019- When the system clock was adjusted, in such a way that time goes "backwards", time-outs were sometimes prematurely released (Unix only).
Own Id: OTP-2965
Aux Id: Seq 1468- If all file descriptors were used up, an Erlang crash dump couldn't be produced. This has been fixed.
Own Id: OTP-2977
Aux Id: OTP-2662- "
erl -compile
" exited with exit code 0 even if compilation failed. Now failing compilation causes non-zero exit code. Note that any trailing '-s' commands will no longer be executed.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-3055Improvements and new features
- Processes which exit abnormally can now be kept for inspection. Such processes are called zombies. The BIF call
erlang:system_flag(keep_zombies, N)
sets the number of zombie processes to keep (default is 0). Zombies are invisible to most BIFs, exceptprocesses/0
, andprocess_info/[1,2]
. In order to check whether a process is alive, the testprocess_info(Pid,status)==undefined
no longer works; the new BIFis_process_alive/1
should be used instead. In thec
module, the new functionzi/0
lists zombies as well as living processes. The number of zombies to keep can also be set with the kernel application environment variablekeep_zombies
.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-1784
Aux Id: seq 359- An option
exit_status
has been added toopen_port/2
, to be used when spawning external programs. When the external process connected to the port exits, a message of the form{Port, {exit_status, Status}}
is sent to the connected process, whereStatus
is the exit status of the external process.
Own Id: OTP-2398
Aux Id: OTP-1241- Messages originating from within the Erlang system (not using the Erlang I/O system to do output), such as error reports for exiting processes, used to write all strings as lists of character codes. Now they are written using string syntax when possible.
Own Id: OTP-2450- The printed form of some Erlang terms has been improved: binaries are now printed with their size; ports are printed with their node and id (id is the result of
erlang:port_info(Port, id)
); references are printed with their node and the sequential number which identifies them. Examples:#Bin<216>
,#Port<0.5>
,#Ref<0.117>
.
Own Id: OTP-2600- The number of ports is no longer set statically to 256, but set dynamically to at least the number of available file descriptors. The id's of ports are no longer restricted to the maximum number of ports, so they are reused considerably less often.
Own Id: OTP-2653- Erlang crash dumps now also contain the names of all atoms. This will make it easier to find errors due to excessive run-time generation of atoms.
Own Id: OTP-2688- On UNIX when Erlang was started with
erl -noshell
from the shell, 2 jam processes (or beam) was created. This was not an error but it was unnecessary in this case. The extra tiny jam process is no longer created in this case.
Own Id: OTP-2717
Aux Id: OTP-2027- New BIFs
erlang:monitor/2
anderlang:demonitor/1
have been introduced, for monitoring the exit of processes.erlang:monitor/2
anderlang:demonitor/1
are likely to change somewhat in release R5B; they are present now for the functionality to be tested. The exact format of the monitoring messages may change, and restrictions may be imposed on which process can turn off a monitoring.
Own Id: OTP-2818
Aux Id: OTP-2794 WP37- Compiled Beam modules have a new format. All modules must be recompiled before they can be used in R5. Also, tools manipulating the module attributes in the object files directly must be changed, because the attributes are now stored differently.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-2847
Aux Id: OTP-2794 WP37- Diverse
ets
updates: A new ets data-typeordered_set
is added, which keeps objects in erlang term order.
Limited support for conncurrent updates and traversals of ets tables is added, including a safe way of "fixing" ets tables.
The limit on the number of ets tables is now user defineable through an environment variable.
A new function,ets:rename
is added.
Any integer field in a tuple can now be updated with theets:update_conter/3
function.
Own Id: OTP-2849
Aux Id: seq 1316, OTP-2705, OTP-2884, OTP-2913, OTP-3005- An Erlang system which is instrumented for memory statistics (i.e., started with the
-instr
option) now includes the statistics in the Erlang crash dump when one is produced.
Own Id: OTP-2860- A new BIF
process_display/2
has been introduced, which prints process information to standard error. Currently, it can be used for inspecting the stack of a process.
Own Id: OTP-2941- An Erlang crash dump now contains more information than before: the names and sizes of all ETS tables; zombie processes, in the order in which they died. For each process: a stack backtrace (see
erlang:process_display(Pid, backtrace)
); the size of message buffer data; active monitors (seeerlang:monitor/2
) in the list of links; active timers.
Own Id: OTP-2975
Aux Id: OTP-2662, OTP-2688, OTP-2860erlang:trace/3
no longer returnsfalse
for any arguments; it exits withbadarg
in all cases when the trace request couldn't be honoured. The documentation has been improved somewhat.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-3023
Aux Id: OTP-2939- The timeout specified in 'receive after' and for the timer BIFs can now be a positive integer up to 4294967295 milli-seconds (almost 50 days). The limit used to be 134217727 milli-seconds (about 37 hours).
Own Id: OTP-3047- Due to an oversight, the following improvements were left out of the documentation in previous releases:
There is a guard test
function/1
for testing whether a term is a fun. Note that since funs are currently represented as tuples, testing for fun should be done before testing for tuple.The operator
++
performs list concatenation.The operators
not
,and
,or
andxor
operate on Boolean values.The unary operator
bnot
performs a bitwise 'not' on an integer.
Own Id: OTP-3066- The source code for the
setuid_socket_wrap
utility that binds privileged ports (as root) and passes these ports to the Erlang emulator is now included in OTP for the UNIX platforms. The file can be found at$(ERL_ROOT)/erts-4.8/src/setuid_socket_wrap.c
.
Own Id: OTP-3070- BEAM only: The address space limit of the Erlang machine, which was 265 MByte in previous releases is now extended to 1GByte for the Beam virtual machine.
Own Id: OTP-3089Erts 4.7.3
Fixed errors and malfunctions
- Nothing, we need more input, can't recreate the problem, see Notes.
Own Id: OTP-2216
Aux Id: seq 656- When killing a shell in the ^G command level using the sequence "^G k", some processes associated with the shell were left running. Now, there are no extra processes left anymore.
Own Id: OTP-2317os:cmd
on WIN32 does not always catch the output from the executed program correctly. This is now corrected.
Own Id: OTP-2371
Aux Id: seq 808- In previous releases of OTP it was not possible to upgrade the Erlang emulator (named e.g jam471 or beam471) because the executable file was renamed for each new version. This is now corrected by always giving the same name (jam or beam) without version number to the executable file.
Own Id: OTP-2372ets:i()
could cause heart-beat timeout if there was many large ets-tables in the Erlang-system. This is now corrected.
Own Id: OTP-2409
Aux Id: seq 829- Comparison between a float and an integer larger than the largest float gave the wrong result. This has been fixed.
Own Id: OTP-2436- Heart is corrected to work on Linux.
Own Id: OTP-2488- LINUX only: The gen_udp process did terminate when sending (with
gen_udp:send
) to a non existing destination port. This is now corrected.
Own Id: OTP-2510- On WIN32 an output of 0 bytes to the shell console with
io:format
or similar could cause the shell console to hang. This problem occurred whensystools:make_script
was run. The problem only occured when running "erl" and not when "werl" was run. This is now corrected.
Own Id: OTP-2575
Aux Id: seq 932- UNIX only: The UNIX manual page for
erlsrv
was wrongly formatted, this is now corrected.
Own Id: OTP-2593
Aux Id: Seq 950- Unix only: If Erlang was started with -noshell, made some output and then exited, it could happen that the output didn't appear until after Erlang had exited (for example, the error messages from "erlc" could appear after the new Unix shell prompt). This has been fixed.
Own Id: OTP-2599- Redundant text "Module:" is removed from the title of the reference manual for module
seq_trace
.
Own Id: OTP-2603
Aux Id: seq 954- Low priority processes were not fairly scheduled (in most cases), i.e. a low priority process was never run at all if there were runnable processes of a higher priority. This has been corrected.
Own Id: OTP-2644- Vxworks only: Erlang crash dumps are now generated if a file system is present.
Own Id: OTP-2671- Certain BIFs, such as erlang:monitor_node/2 (which are implemented as traps to Erlang code), behaved erratically in JAM (for example, returning an incorrect value). This has been fixed.
Own Id: OTP-2680- The
heart
port program can now handle the shutdown alternative on all platforms. Previously this only worked on Solaris.
Own Id: OTP-2695- The number of 'ets' tables was limited to around 1642. This is raised to around 6544.
Own Id: OTP-2705Improvements and new features
- The name of a distributed Erlang node should always be on the form Node@Host, where both Node and Host are nonempty strings not containing any '@'. This format is checked when the node becomes distributed. Previously, the check was less strict than it should have been, for example allowing duplicated '@' characters. This has been fixed.
Own Id: OTP-2537- Enhanced memory handling on VxWorks, erlang can use its own malloc algorithms in a user supplied area.
Own Id: OTP-2669- An additional way to stop an Erlang node when a serious error condition is suspected has been introduced (Unix only): if the signal SIGUSR1 is sent to the Erlang system, an Erlang crash dump and a core dump are produced, whereby the Erlang system terminates. (This function was present already in R4A, but left out of the release notes.)
Own Id: OTP-2700
Aux Id: OTP-2414- The max size for
Cmd
inheart:set_cmd(Cmd)
is increased from 254 up to 2046 characters.
Own Id: OTP-2703Erts 4.7.1
Fixed errors and malfunctions
- Processes that did "heavy" file processing did not pay for that. They could execute for a very long time before other processes were scheduled in. Now every file operation costs 100 reductions, which will not allow a process to do many file operations before it is scheduled out.
Own Id: OTP-1932- When using the -boot and -config command-line options on Windows, filenames in the native Windows syntax using only backslashes didn't work -- forward slashes had to be used. Now backslashes work as well as forward slashes.
Own Id: OTP-2373- In the Werl window, marking a region containing blank lines below the last line displayed and choosing 'Copy' from the menu, would crash Werl. This has been corrected.
Own Id: OTP-2381- When several lines were inserted into the Erlang shell using the paste function of the window manager, all but the first line could be lost. This has been fixed.
Own Id: OTP-2435- Errors when sending incorrect data to a port was reported using the old method if the owner did not trap exit. This has been corrected so posix error codes are always sent.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-2437- If the real-time clock jumped backwards (for any reason), all timers in Erlang would release immediately. This is handled somewhat more gracefully, by pretending that the time stands still.
Own Id: OTP-2438
Aux Id: seq 836- The garbage collector now does a complete garbage collection ("fullsweep"), whenever a process has binaries that could only be freed by a complete collection. This frees binaries sooner, but takes more times for processes that have a lot of live data.
Own Id: OTP-2454
Aux Id: seq 845, seq 849- The
erlc
program now tries to execute the programerl
in the same directory which theerlc
program itself is located in. If that fails,erl
will be searched for inPATH
.
Own Id: OTP-2460inet:gethostname()
did not always return a short hostname without the domain part. The error was introduced in OTP R3B and is now corrected.
Own Id: OTP-2489
Aux Id: seq 864Improvements and new features
- The erlsrv utility provides the means for running Erlang applications as system services on Windows NT.
Own Id: OTP-1669- There are two new options to open_port/2 which apply when the port is of type 'spawn': {env, Env} and {cd, Dir}, which set environment variables, and change the working directory, respectively.
The new options are currently not implemented on VxWorks.
Own Id: OTP-1720- Line oriented I/O with new parameter {line, N} to open_port/2.
Own Id: OTP-1886- New parameter to open_port/2, stderr_to_stdout, will redirect standard error output to standard output for port programs on all platforms.
Own Id: OTP-1887- The spawn_opt/4 BIF allows the minimum heap size, garbage collection type, and priority to be set when creating a process.
Own Id: OTP-2261
Aux Id: seq 720- Short lived processes no longer get a second heap for the generational garbage collection.
Own Id: OTP-2336- The emulator can switch GC algorithm for a process when the heap grows to a certain size
Own Id: OTP-2337- A new module 'instrument' has been added to 'tools'. When running an instrumented version of Erlang, data are collected about the usage of resources, and can later be analysed. The command-line option -instr causes 'erl' to start instrumented Erlang.
Own Id: OTP-2358- Three new BIFs exist, for managing timers:
erlang:start_timer/3, erlang:send_after/3 and erlang:cancel_timer/1.
(A previously existing undocumented BIF set_timer/3 has been replaced by the new start_timer/3.)
Own Id: OTP-2376- When tracing process scheduling, a process to be scheduled in used to be garbage-collected (if needed) before the trace message was sent. This gave an incorrect total for the excution time of the process. This has been corrected.
Own Id: OTP-2394- For improving the error reporting when detecting an error serious enough to warrant stopping the Erlang node, a new BIF erlang:halt/1 has been introduced.
Addendum to the documentation for halt/0: halt/0 returns the status code 0 to the environment.
(The BIF erlang:halt/1 previously existed in an undocumented form, with slightly different behaviour.)
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-2414
Aux Id: OTP-2359- The description of error_handler:undefined_global_name/2 has been removed, since it's no longer called from Erlang 4.6 and later.
Own Id: OTP-2525- Sequential tracing is available in alfa status and only for JAM systems. Since it is an alpha release the programmatic interface could be slightly changed based on experience from users. The module
seq_trace
contains the interface. Sequential tracing makes it possible to trace all messages that are a direct result from one initiating message e.g. all messages in a call-setup for one connection.
Own Id: OTP-2527Erl_interface Release Notes
4.7.3
Fixed errors and malfunctions
- A C-node could sometimes leak a file descriptor after querying epmd about a non-existent Erlang node. This is now fixed.
Own Id: OTP-2683Improvements and new features
- A problem receiving large messages from remote Erlang nodes has been fixed.
Own Id: OTP-26764.7.1
Fixed errors and malfunctions
- Nodenames passed to erl_call with "-s" are now terminated correctly.
Own Id: OTP-2241
Aux Id: seq 707- erl_var_content was sometimes traversing lists incorrectly, possibly resulting in a segmentation violation. This has been corrected.
Own Id: OTP-2325
Aux Id: OTP-2326- A pointer error in the VxWorks version of erl_gethostbyname() was causing segmentation violations. This has been fixed.
Own Id: OTP-2327- A missing symbol was causing link errors on VxWorks. This is corrected.
Own Id: OTP-2333- Many of the functions in Erl_interface would abort when passed NULL asrguments. Now, these functions return NULL in situations where it is reasonable to do so.
Own Id: OTP-2335- Erl_connect() is no longer passing the hostname and nodename arguments in the wrong order to an internal help function. This was causing problems when the node attempted to call erl_publish().
Own Id: OTP-2355- In R3 a header file
erl_timeout.h
was erroneously included in the release. Some symbols were defined inerl_timeout.h
that could conflict with user-defined symbols, since they were not prefixed properly. This file is no longer included.
Own Id: OTP-2452
Aux Id: seq 848Improvements and new features
- The documentation for
erl_call
now states correctly that some arguments need to be quoted.
Own Id: OTP-2047- NULL pointers are now handled properly by an internal function used for free()ing Erlang terms.
Own Id: OTP-2242- C nodes now have access to Global, through a nearby Erlang node.
Own Id: OTP-2249
Aux Id: OTP-2459- C nodes now have a mechanism for storing state data and backing it up to Mnesia on a nearby Erlang node.
Own Id: OTP-2250- A set of primitives has been written that enable the use of an IDL backend for C, so the C-Erlang interface can now be specified in IDL.
Own Id: OTP-2251- erl_fix_alloc has been completely rewritten and is now simpler, faster, and does not leak.
Own Id: OTP-2326- erl_start_sys and erl_Start_Epmd now works on Windows and VxWorks
Own Id: OTP-2356- Some of the threads files in erl_interface are only meaningful on a unix platform. These files are no longer used on Windows and VxWorks.
Own Id: OTP-2357- The ErlMessage struct used by erl_receive_msg() has been changed as part of a larger change to make C nodes understand more of the Erlang distribution protocol.
(*** INCOMPATIBILITY with R3B02 ***)
Own Id: OTP-2511- Users must now include an extra header file and link with an extra library to use some of the erl_interface features. In general, this means that for anything new in R4, or to use the communication facilities.
(*** INCOMPATIBILITY with R3B02 ***)
Own Id: OTP-2512- The functions erl_mk_pid(), erl_mk_port() and erl_mk_ref() previously allowed pids, ports and refs to be created with arbitrary numbers in some of the fields. Now the values provided by the caller are masked, so that only valid numbers can be used.
(*** INCOMPATIBILITY with R3B02 ***)
Own Id: OTP-2513R3B02 (Erts 4.6.4)
Fixed errors and malfunctions
- On Windows, 'epmd -daemon' did not release epmd from the command shell (if the command shell was terminated, so was epmd). This has been corrected.
Own Id: OTP-2220
Aux Id: seq 671- The BEAM emulator did sometimes crash during execution when an Erlang process was about to generate it's exit reason. This is now corrected.
Own Id: OTP-2227
Aux Id: seq 687, OTP-1783, OTP-1849- In the BEAM emulator, the
trace
bif did erroneously report calls toelement/2
as calls toprocess_info/2
. This is now corrected. *New-Rev(s):
Own Id: OTP-2228
Aux Id: seq 689- Erlang (R3B version) did not support nis or nisplus lookup of host names. This is now corrected.
Own Id: OTP-2235
Aux Id: seq 703, OTP-2036- Erlang (R3B version) did not support WINS lookup of hostnames. This is now corrected.
Own Id: OTP-2236
Aux Id: seq 685, seq 702, TSR-1998-02-17/a- On WIN32
receive after
could timeout to early during certain circumstances and only on some PC brands. On these PC:s the assumption that a call toGetSystemTime
always returns a higher value than the previous call proved to be wrong. This is now corrected.
Own Id: OTP-2245- Releasehandling did not work on WINDOWS. This is now corrected. A new option
-start_erl
towerl
anderl
is introduced which works in the same way as thestart_erl
script on UNIX. I.e with this option the filestart_erl.data
will be read and used to determine which versions to execute.
Own Id: OTP-2297
Aux Id: seq 755- In the following situation, the EXIT message would contain the wrong Pid: Node B holds a pid
OldPidA
which refers to a process on node A. Node A goes down and restarts. Node B doeslink(OldPidA)
; the pid in the exit message{'EXIT', Pid, noproc}
is not the same asOldPidA
. This has been corrected.
Own Id: OTP-2304
Aux Id: seq 706ets:new/2
could case the whole emulator to crash if called with a not well formed list as second argument. Example:ets:new(a,[set|protected])
which should result in{'EXIT',{badarg,Reason}}
and not make the emulator to crash. This is corrected.
Own Id: OTP-2314
Aux Id: seq 769heart:set_cmd/1
cannot set a command longer than 127 characters, this is now corrected. This problem does not exist in pre R3 versions of OTP.
Own Id: OTP-2374- A bug in ets:lookup_element could cause the emulator to crash if the lookup was to return a list of more than one element. This is corrected.
Own Id: OTP-2386Improvements and new features
- On Windows, the value of the environment variable
ERL_WINDOW_TITLE
, if set, will be used as the window title for theerl
andwerl
windows. To set the title when starting Erlang, the-env
option can be used like this:werl -env ERL_WINDOW_TITLE Title
.
Own Id: OTP-2222
Aux Id: seq 678R3B01 (Erts 4.6.3)
Fixed errors and malfunctions
- The
-pa
and-pz
options toerl
did not add the paths to the code server when combined with the-mode embedded
option. This is corrected.
Own Id: OTP-2160
Aux Id: seq 644R3B (Erts 4.6.3)
Fixed errors and malfunctions
- On Unix, using erl in a pipeline like this now works as expected:
'cat - | erl -noshell -s nisse'
It used to fail with an error message from cat.
Own Id: OTP-2027- In a distributed node, calling
init:stop/0
used to cause a lot of crash reports to be generated. This has been corrected.
Own Id: OTP-2044
Aux Id: seq 540- Epmd is now reading data non-blocking. This means that hanging nodes, and other situations where epmd may be expecting data but get none, will not block epmd from fulfilling other requests. There is also a one minute timeout for inactivity when epmd expects more data from a node. Epmd will then close the connection.
Epmd still writes data blocking. The amount of data that is written is normally so small that this is not a problem but it should be addressed in a future release.
Own Id: OTP-2046- On Windows, pressing Ctrl-C or Ctrl-Break in erl (not in werl) used to hang erl. This has been corrected.
Own Id: OTP-2058- Previously (in erts 4.6.1 and 4.6.2) a distributed Erlang node could not be started on a host with a hostname containing for example underscore (_). This checking is now relaxed and the only requirement from the Erlang systems point of view is that it contains visible characters (#21..#7E).
Own Id: OTP-2059
Aux Id: seq 568- For statistics(runtime) and statistics(wall_clock), there was sometimes a discrepancy between the reported time since last call, and the actual difference between the two reported times since the Erlang node was started. This is now fixed.
Own Id: OTP-2081- The data sent on a socket with
gen_tcp:send
was lost if the socket was explicitly closed. This is corrected.
Own Id: OTP-2088
Aux Id: seq 591- On Windows 95, the
erl
andwerl
programs used to crash if Winsock2 was not installed.
In this release, the Erlang emulator will work in a single-node configureation even without Winsock2, but the functionality will be limited in that modules that use TCP/IP or UDP/IP (for instance, gen_tcp, gen_udp, ftp) through the new inet driver will not work.
The Erlang emulator will not start if the-sname
or-name
is used.
Own Id: OTP-2145- During startup of OTP on Unix,
receive after
timeouts would trigger too early. This was particularly pronounced in embedded mode when a large number of modules were loaded. This has been corrected.
Own Id: OTP-2158
Aux Id: OTP-2054 OTP-2152Improvements and new features
- International characters in the range 160-255 can now be entered and shown in the Erlang shell on both Unix and Windows. Is is assumed that the characters are encoded according to ISO 8859-1, which is used in both Solaris and Windows. Note that on Windows, characters will be displayed correctly only in the Werl window, not by erl started in a command prompt window (because it uses the IBM character set).
As as consequence of this change, the Meta key on Sun keyboards will now generate accented international characters. It cannot be used for entering editing commands, like Meta-B for backing up a word; but Esc B will still work.
Own Id: OTP-1782- Ports opened with open_port({spawn, Name}, Opts) no longer write error reports. Instead, if the owner of the port (or another process linked to the port) traps exits, it will receive {'EXIT', Port, PosixCode} messages, where PosixCode is an atom given the Posix error codes. Posix error codes are listed in the manual pages for the file and inet modules.
Example of Posix codes for ports: einval if you send more than 255 bytes to port opened with {packet, 1} and enomem if driver fails to allocate memory.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-1796- The erl (and also werl on Windows) options -pa and -pz are slightly modified in order to behave exactly the same as the functions add_patha/1 and add_pathz/1 in the module code.
Own Id: OTP-2008- The following information is interesting for users of the 4.6 through 4.6.2 releases. Others can safely ignore this information.
There are new flags in erl (and werl) for controlling what the emulator should do when a send operation to a registered name is attempted and there is no such name registered. In the ERTS 4.6.3 release (like all releases before 4.6), the current process generates an exception if it attempts to send to an unregistered name.
The 4.6, 4.6.1, and 4.6.2 releases, however, silently ignored such attempts. In the 4.6.1 and 4.6.2 releases, the +W flag enabled the old exception generating behaviour.
In this release (4.6.3) the default behaviour is to generate an exception, but the +W flag is still allowed for backwards compatibility. The new flag +w will turn on the new behaviour (to silently ignore messages sent to an unregistered name); we do not recommend that this flag is used.
Own Id: OTP-2010- Creation of Unix subprocesses with open_port({spawn,...) now uses the 'vfork' system call by default, instead of 'fork'. Using 'vfork' leads to less swap space usage. If the old behaviour is wanted, set the environment variable "ERL_NO_VFORK" to any value.
Own Id: OTP-2131- There has been improvements in the
global
andapplication_controller
which have made the distribution protocol in R3 incompatible with prior versions.
Because of this the Erlang Port Mapper Daemon, epmd, has changed port number. For the user this means that nodes running an older version of OTP can't find or communicate with nodes running R3.
An unfortunate side effect of that the change of port number was done in R3B, not R3A when the actual protocol changed, is that a R3A node can't communicate with a R3B node.
(*** INCOMPATIBILITY with R2 ***)
Own Id: OTP-2139R3A02
Fixed errors and malfunctions
- ets:match_object/2 sometimes exited with badarg when applied on a table with more than 1000 entries.
Own Id: OTP-2022
Aux Id: seq502, HA69908- Sending of a message that violates the port protocol, to a port puts the sending process in a strange state (a zombie process). This is now corrected and will result in a badsig exception.
Own Id: OTP-2033
Aux Id: seq530, HA70127R3A (Erts 4.6)
Fixed errors and malfunctions
- A bug involving spurious timeout traces on Beam has been fixed.
Own Id: OTP-1486- Calling trace(Pid, true, [suspend]) would not suspend the process if it was waiting (and most processes in an Erlang system are waiting). This limitation has been removed.
Own Id: OTP-1488- When (re)compiling modules in one of the kernel, stdlib, or compiler directories of OTP, or a module with the same name as a module in these directories, an infinite loop could occur.
Own Id: OTP-1647- On the BEAM system on Solaris 2, a registered message sent from another node could end up in the message queue of the wrong process.
Own Id: OTP-1659
Aux Id: HA59059- When starting erl with both -noshell and -noinput, a shell was started anyway. This has been fixed.
Own Id: OTP-1684- Invoking Erlang as 'erl -s Module Function Arguments' causes the emulator to terminate if Module:Function/X fails. The emulator used to silently ignore failed calls.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-1697- If the HOME environment variable was set on the command line to the Erlang emulator (using -env), the emulator would still use the earlier value of HOME in the environment of the parent process, and fail to start if HOME was not defined. This has been changed, so that a value of HOME on the command line always overrides the value in the parent environment.
On Windows, the same applies to the environment variables HOMEDRIVE and HOMEPATH.
Own Id: OTP-1703- The erlang:trace/3 BIF didn't report messages that a process sent to itself.
Own Id: OTP-1709- The Erlang machine could hang in accept, in case it received a signal during the connect phase when connecting to another node. That select was interrupted by a signal was not checked.
Own Id: OTP-1722- Tcp_drv.c was reusing struct timevals in select, without reinializing them.
Own Id: OTP-1723- Due to integer overrun, the statistics(wall_clock) BIF could sometimes return a negative value. It now returns a bignum when necessary.
Own Id: OTP-1726
Aux Id: HA56471, OTP-1604- Some interruptible system calls were not being checked.
Own Id: OTP-1817Improvements and new features
- It is now possible to customize the location of the
releases
directory. This makes it possible to test the release handling procedure without write access to the OTP root directory. Changes instart_erl
(UNIX),systools_make
and documentation. The filestructure is slightly changed; theSystemVsn
directory is moved fromerts-EVsn
to thereleases
directory.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-1635
Aux Id: HA54792- The heart program with limited functionality now works on Windows NT.
Own Id: OTP-1672- The heart program now reports the time when it times out.
Own Id: OTP-1806- The handling of busy ports has been changed, resulting in improved I/O performance.
Own Id: OTP-1895
Aux Id: HA55234- All linked-in drivers compiled for earlier releases of OTP must be recompiled before being linked with an R3 emulator, because more fields have been added to the DriverEntry struct. Failure to recompile will most likely result in a core dump.
(*** INCOMPATIBILITY with R2 ***)
Own Id: OTP-2120- The erl_prim_loader and erl_boot_server modules now longer supports the distributed loader method. Instead, there is a new inet loader method. As a consequence,
-loader distributed
option to erl is no longer accepted, and should be replaced with-loader inet
. Also,-nodes Nodes
should be replaced with-hosts Hosts
, where hosts is a list of IP addresses.
For further intformation, see the documentation forcerl
,erl_boot_server
, anderl_prim_loader
.
(*** INCOMPATIBILITY with R2 ***)
Own Id: OTP-2123- On Windows 95 and Windows NT, the program
werl
has been added as alternative way to start Erlang. Thewerl
program starts Erlang in its own window which has scrollbars, allows command-line editing and cut and paste.
Theerl
is retained for situations when Erlang is used in a pipeline or its standard input or output is redirected. Thewerl
cannot be used in such situations. Theerl
program can be used interactively too, but only the old shell is provided (no line-editing) and on Windows 95 there is no way to scroll back to see text which has scrolled off.
Own Id: OTP-2127- Executing a send operation like
{Name, Node} ! Msg
, where Node is the current node and Name is an unregistered name, will now fail silently. In 4.5.3 and earlier releases, this used to failed with abadarg
reason.
Note that the new behaviour is consistent with the behaviour that has always been when Node is a remote node.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-2129Known problems
os:cmd on WIN32 does not always catch the output from the executed program correctly. There is also a problem with executing programs with space in the path.
Own Id: OTP-2371
Aux Id: seq8131 ERTS 4.5.3
1.1 Incompatibilities with ERTS 4.5.2
Because of several bug-fixes in
erl_interface
we were forced to introduce a minor incompatibility concerning the representation of an empty list in the C-code. Previously it was allowed to represent the empty list in two alternative ways of which one alternative was a NULL (0) pointer. This alternative is no longer allowed. If old code containing this representation of empty lists is rebuilt with this version oferl_interface
they will crash at runtime.
erl_interface
does no longer try to convert Erlang lists to C strings (this could cause troubles ). New functions which let the user convert an Erlang list to a C-string are added.1.2 Fixed bugs and malfunctions
- The limitation of max 32 simultaneously open ports or connections to other Erlang nodes in the Windows NT version is removed.
Own Id:OTP-1296
erl_print_term
inerl_interface
returned the wrong number of characters when the escape character '\' was present in the print-string.
Own Id:OTP-1474
erl_interface
: Error when encoding a negative ERL_SMALL_BIG (integer). Resulted in that e.g -2e9 became -1999999999 in the resulting Erlang external format.
Own Id:OTP-1314, OTP-1442, OTP-1443
erl_interface
:erl_match
sometimes gives wrong result.
Own Id:OTP-1386
erl_interface
: Problems with memory management caused by inconsistent handling of empty lists (two alternative representations). NULL (0) pointer removed as valid representation.
Own Id:OTP-1401
- The
ets:match/2
function could fail to return all matches on Beam if the pattern contained a constant key (for instance, {directory, '$1'}) and a garbage collection occurred inside theerlang:db_match/2
BIF.
Own Id: OTP-1483
- The documentation for the
suspend
flagtrace/3
BIF has been corrected. It used to say that a suspended process would be scheduled on normal events such as message passing; this is no longer the case.
Own Id: OTP-1487
1.3 Known bugs and limitations
- If trace on receive is enabled in Beam with the trace/3 BIF, an timeout trace will be generated every time the process executes a receive statement and there is no messages.
Own Id: OTP-1486
1.4 Improvements and new features
- The following improvements regarding
erl_interface
are done:
- Macros to retrieve the fields of
ETERM
is added.
Own Id: OTP-1473
- There is now *one* representation for an empty list, not two as is used to be. An empty list is represented by the
Erl_EmptyList
structure. There is a new macro,ERL_IS_EMPTY_LIST(ep)
, to test for an empty list.
- None of the type checking macros (
ERL_IS_LIST(ep)
,ERL_IS_TUPLE(ep)
, etc), accept NULL pointers any longer. Make sure to only pass valid ETERM pointers.
erl_cons(head, tail)
now requires tail to be a non-NULL pointer. To represent the end of a list, use the return value from erl_mk_empty_list().
erl_length()
now only works for a proper list; i.e. for the the term [a|b], erl_length() returns -1.
erl_tl()
,erl_hd()
is now silent if given a bad list (but still returns NULL).
Own Id:
2 ERTS 4.5.2
2.1 Incompatibilities with ERTS 4.5.1
Due to changes in code generation for BEAM, all BEAM code must be recompiled.
2.2 Fixed bugs and malfunctions
- Order of messages received could be wrong for a suspended process waiting for a busy port.
Own Id:OTP-1421
3 ERTS 4.5.1
3.1 Incompatibilities with ERTS 4.5
Due to changes in code generation for BEAM, all BEAM code must be recompiled.
3.2 Fixed bugs and malfunctions
- The include file
decl.h
was missing in the distribution.
Own Id:OTP-1395
Aux Id:HA48525
- Exit process when the process is in the timeout queue crashes emulator (BEAM only).
Own Id:OTP-1396
- Error in send primitive in BEAM, which cause the Table Visualizer to crash GS. (BEAM only).
Own Id:OTP-1399
- Error in distributed Erlang, where simultaneous connects between two nodes could crash the emulator (bus error), has been corrected.
Own Id:OTP-1403
4 ERTS 4.5
4.1 Improvements and new features
- The Erlang emulator now produces "crash-dumps" if it detects some internal error and terminates it self in a controlled way. The "crash-dump" is written to a file named
erl_crash.dump
or fetches the name from the environment variableERL_CRASH_DUMP
if it is defined.
Owd Id: OTP-1215
- The previous solution with different binaries for DNS and NO_DNS is changed to a solution with only one binary wich can adjust it's behaviour in run time.
Where it is possible to choose between two different methods of name resolution, e.g. Solaris 2, theemulator
,erl_interface
,erl_call
andepmd
check the environment variableERL_RESOLV
to determine if the DNS resolver should be used or not. IfERL_RESOLV
has the valuenodns
the regular name resolution methodgethostby{name|addr}
will be used, ifERL_RESOLV
has the valuedns
the Domain Name Serviceres_gethostby{name|addr}
will be used.
- Dynamic Driver Loading and Linking
If the underlying operating system support dynamic loading and linking of shared objects, drivers can be loaded into a running emulator. After loading the driver can be used exactly like a linked-in driver. See the manual page forerl_ddll
for details.
- The file-driver is enhanced to support the revised
file
module instdlib
.
Own Id:OTP-1075
- The internal representation of string constants in BEAM is significantly improved which result in decreased code size for BEAM compiled modules.
- The port program
authchk
is removed and replaced by code in the erlang moduleauth
.
4.2 Incompatibilities with ERTS 4.4.2
- In order to run the BEAM-emulator 4.4.1 all Erlang modules must be recompiled.
- The possibility to start as an old fashioned Erlang system with
start_old.boot
is no longer supported.
Own Id:OTP-1335
4.3 Fixed bugs and malfunctions
erl_print_term
inerl_interface
now return the number of chars written.
Own Id:OTP-1092
- A new BIF match_object is introduced for internal use by the
ets
module andmnesia
.
A match operation on a huge table is divided into several blocks, otherwise the Erlang system might be blocked for a too long time. This new function is required by Mnesia.
Own Id:OTP-1325
- The Erlang system now returns error codes when the system is terminated. These error codes is used e.g to interrupt Make when a syntax fault is encountered when compiling an Erlang program with
erl -compile
. A new utilityerlc
which is a front-end for compilation of Erlang programs (and many other things) is also added.
Own Id:OTP-1201,OTP-1326
Aux Id:HA41029
- The ERL_TICK protocol towards a HIDDEN node (a c-node) is corrected. An ERL_TICK is now sent if the Erlang node has not received anything from the HIDDEN node within the TICK interval.
Own Id:OTP-1254,OTP-1322
- The handling of timers in the new timing wheel algorithm is corrected. Timeouts was too short or too long during certain circumstances.
Own Id:OTP-1270
- Long timeouts is corrected (was too long e.g 900 sec became 912 sec).
Own Id:OTP-1273
- Corrected communication problems between Erlang nodes (caused segmentation fault).
Own Id:OTP-1345
5 ERTS 4.4.2
5.1 Improvements and new features
The handling of timeouts in the emulator (both jam and beam) is implemented with a new algorithm (Timing Wheel) which will execute a system which uses many timeouts ("receive ... after") more efficiently.
The detection of absent Erlang nodes in a distributed configuration is enhanced. I.e a node that does not respond is detected earlier.
5.2 Incompatibilities with ERTS 4.4.1
In order to run the BEAM-emulator 4.4.2 all Erlang modules must be recompiled.
5.3 Fixed bugs and malfunctions
erl_interface.h
file no longer contains invalid characters.
Own Id:OTP-1176
Aux Id:HA39735
6 ERTS 4.4.1
6.1 Improvements and new features
Added unlimited number of variables in
ets:match/2
.6.2 Incompatibilities with ERTS 4.4
6.3 Fixed bugs and malfunctions
open_port({spawn,10},[])
caused the emulator to crash.
Own Id:OTP-1011
binary_to_term
caused the emulator to crash if the binary contained data which was not a valid format to create a term from.
Own Id:OTP-1013
- The emulator could be hanging when pinging other node which is in CTRL-c mode.
Own Id:OTP-1068
- Correction of documentation of erlang:hash/2.
Own Id:OTP-1016
- Documentation of time-stamped traces.
Own Id:OTP-1031
- CTRL-break handler error on SunOS5.
Own Id:OTP-1071
universaltime_to_localtime
did compute the wrong date (sometimes).
Own Id:OTP-1081
- Lack of memory crash. The error was caused by incorrect flow- control between distributed Erlang nodes which caused the sending node to buffer up far to much when the receiving node wasn't ready to receive the data.
Own Id:OTP-1082
Aux Id:HA35160
- During certain circumstances a dead-lock between a port program (e.g. esock) and the Erlang emulator could occur. This is solved by adding non-blocking I/O to the Erlang run-time I/O system for spawned port programs (spawn driver).
Own Id:OTP-1085
Aux Id:HA35005
- Limit on number of variables in ets table queries removed. Caused Mnemosyne queries to fail.
Own Id:OTP-1016, OTP-1124
Aux Id: HA36605
- Emulator bug: TCP buffers to much. Related to OTP-1082 above.
Own Id:OTP-1108
- Communication problems between Erlang nodes. A node which made a re-connection attempt to another node, before the other node had recognised (by timeout or otherwise) that the first node had gone down, would be rejected. Now new connection attempts are always recognised.
Own Id: OTP-1110
Aux Id: HA36954
7 ERTS 4.4
7.1 Improvements and new features
- New BIF:s for handling of local and universal time:
erlang:localtime/0
erlang:localtime_to_universaltime/1
erlang:universaltime/0
erlang:universaltime_to_localtime/1
- A new information item
message_queue_len
which returns the nubmer of messages currently in a process message queue is added , and can be fetched withprocess_info/1
andprocess_info/2
.
- The internal implementation of
ets
-tables is improved, which results in faster access to the data. This is an improvement which the DBMS Mnesia benefits from since it usesets
- tables as base for it's implementation.
erl_call
is a new utility which is now supported. It was previously delivered as an example of how to use theerl_interface
library.
- A new process priority
high
is added. The scheduling between processes with priorityhigh
works like normal but processes with prioritieslow
andnormal
will not get any time slice.
- The start command
otp
is changed back toerl
.
time_stamp
added as a new flag to the BIFerlang:trace/3
. Whentime_stamp
is on the trace messages which are tuples will have an additional last element which is the time_stamp in the same format as returned byerlang:now/0
.
7.2 Incompatibilities with ERTS in OTP P1H
There are no incompatibilities in this step.
7.3 Fixed bugs and malfunctions
The priority returned from the BIF
process_info(Pid)
was the priority of the calling process and not as it should be the priority of the process denoted byPid
.