These release notes describe the Erlang Runtime System, i.e the emulator, the builtin drivers,
erl_call
utility, and the theerl_interface
library.R3B02 (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
.