This document describes the changes made to the Kernel application.
Kernel 2.1.1
Fixed errors and malfunctions
ets:file2tab
which usesdisk_log
now uses theread_only
option todisk_log:open
when it opens the file.
Own Id: OTP-1716
Aux Id: OTP-1765- All applications are now informed of all changed, new and removed configuration parameters at installation of a new release. The new call-back functions is defined as Mod:config_changed(Changed, New, Removed). Where Mod is the module defined in the .app file. Refer to the reference manual application(3).
Own Id: OTP-2012- 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-2317- The function
gen_tcp:controlling_process(S, NewOwner)
did hang the calling process if it was not the current owner ofS
. This is now corrected. If called by any other process than the current owner{error, eperm}
will be returned.
Own Id: OTP-2321
Aux Id: seq 779- When application environment variables are given on the command line, no error message was given if the variable's value was malformed; application:get_env/2 simply returned 'undefined'. Now, application:start/1 returns an error in those cases.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-2350
Aux Id: OTP-2347, OTP-2348- If a process attempts to call erl_ddll:unload_driver/1 on a driver for which it didn't previously call erl_ddll:load_driver/2, the unloading fails. In previous release, either the result 'ok' was returned, or in certain cases the erl_ddll server crashed. Now the correct error tuple is returned.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-2568- Sometimes when a R3 node and a R4 node were connected, global could crash due to not checked '{badrpc,nodedown}' messages. This is now corrected.
Own Id: OTP-2648
Aux Id: Seq 987- The processes which controls a port corresponding to a socket is now set to priority high instead of normal to assure that e.g node-ticks between distributed nodes are sent fast enough.
Own Id: OTP-2709Improvements and new features
- The documentation has been augmented with a description of the error return values from erl_ddll:load_driver/2 and erl_ddll:unload_driver/1, and the error formatting function format_error/1.
Own Id: OTP-2569- The 'backlog' option to gen_tcp:listen/2 is now documented.
Own Id: OTP-2674Kernel 2.1
Fixed errors and malfunctions
- For the arguments to the command-line option -s, the documentation was incorrect. It has been changed to reflect the actual behaviour, namely that all arguments to the function called by -s are passed as atoms.
Own Id: OTP-2087- 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- An unnecessary report to the error logger caused by a timeout from
inet:gethostbyname
andinet:gethostbyaddr
is removed.
Own Id: OTP-2478Improvements and new features
- New start type, {failover, node()}, added. Note, for compability reasons this is only valid if the new key
start_phases
is defined in the.app
-file for the application, refer toapplication (3)
. It is also possible to check the current start type byapplication:start_type()
, refer toapplication (3)
Own Id: OTP-1504
Aux Id: OTP-1979, OTP-2498- A first increment to allow several global name spaces to exist in the same system. The Global Groups are defined in the .config file by the key '{node_groups, [{GroupName, [Node]}]}. If the node_groups-key is not defined the system behaves as before; if the Global Group service is used then it is required that all nodes in a system are defined in one. and only one, Global Group. It is not possible to mix nodes belonging to a global group and nodes not belonging to a global group in the same system, if global group functionality is used.
Missing functionality: Reconfiguration, at the moment it is not possible to change the configuration without restarting all nodes.
Own Id: OTP-1559
Aux Id: OTP-2497- Better error messages for erroneous .config file.
Own Id: OTP-1983- The functions
write_file_info/2
,change_owner/2,3
, andchange_time/2,3
in thefile
module are now documented.
Own Id: OTP-2252
Aux Id: seq 710- It is now possible to synchronize the start of an application by defining a new key in the
.app
file, {start-phases, [{Phase, Args}]}. This will result that the new call back functionMod:start_phase(Phase, Args)
is called, Mod is the module defined in themod
key of the application. There is also a generic help module to syncronize the start of included applications,application_starter
. If this module is defined in themod
key for the top application, the included applications will be started in each start phase in the order of appearance in theincluded_applications
key.
Own Id: OTP-2498
Aux Id: OTP-1504- It is added to the documentation of
file:list_dir/1
that the returned filenames are not sorted.
Own Id: OTP-2508
Aux Id: seq 891- A new key,
id
, in the application resource file (.app
, ). It can be used to define the product identification of the application.
Own Id: OTP-2518- 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-2527- It is now possible to read an application's resource file (.app) keys. New functions: application:get_all_key() application:get_all_key(Application) application:get_key() application:get_key(Application, Key)
Own Id: OTP-2535R3B02 (Kernel 2.0.5)
Fixed errors and malfunctions
- The description of the options
resuaddr
andkeepalive
ininet:setopts/2
has been corrected.
Own Id: OTP-2223
Aux Id: seq 679- The reference manual for the
kernel
application is corrected regarding theboot_server_slaves
variable. The value should be a list of slave IP-addresses and not a list of nodenames as stated earlier.
Own Id: OTP-2224
Aux Id: seq 680application:permit(App, false)
may hang during certain circumstances. This is corrected.
Own Id: OTP-2231
Aux Id: seq699 HA72879- The Erlang system did always contact the DNS server (if configured) on startup and this could cause the system to hang. This is now corrected.
Own Id: OTP-2308
Aux Id: seq 765dist_ac
could hang forever if a nodedown was received at certain times.
Own Id: OTP-2368
Aux Id: seq813R3B01 (Kernel 2.0.4)
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 (Kernel 2.0.3)
Fixed errors and malfunctions
- The file:sync/1 used to crash the process for the file it was used on; this has been corrected.
Own Id: OTP-1778
Aux Id: seq379- os:cmd/1 used to hang if given a command containing a shell comment character, for example: os:cmd("ls #"). This has been corrected.
Own Id: OTP-1805
Aux Id: seq 385- The 'EXIT' reason reported from the BIF process_info/1 is corrected; it now reports 'badarg' when the argument is not a pid.
Own Id: OTP-1874- The documention for erlang:register/2 has been reworded to clarify that a registered name can be used by the send operation, rather than generally.
Own Id: OTP-1875- The call to erl_ddll:unload_driver for a statically linked in driver now returns {error,linked_in_driver}. Previously the incorrect result {error, not_loaded} was returned.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-1962- global:(un)register_name is changed to set lock only on the nodes known to the global_name_server.
Own Id: OTP-2011- When the
pg2
server is started and a new disk log is opened, the call todisk_log:open
used to crash. This has been corrected.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-2028- A more informative error messages is displayed if you try to start an Erlang node with the same name as an existing. The message in R3A was cryptic.
Own Id: OTP-2032
Aux Id: seq 534- The reference manuals for modules
gen_tcp
,gen_udp
andinet
are corrected.
Own Id: OTP-2034
Aux Id: seq 527- When loading of a module fails (for instance, because of a corrupted file), the code server will print an error report which includes the name of the file. The error messages printed by the binary loader are still printed, however. In a future version, there will be ONE message printed, and it will be more informative.
Own Id: OTP-2049
Aux Id: seq 546- In UNIX when the resolver file (typically /etc/resolv.conf) is not found, this is not treated as an error any more. A warning is issued and this type of warning is disabled as default. The warning messages can be turned on with the kernel environment variable
inet_warnings = on
.
Own Id: OTP-2053
Aux Id: seq 552- The communication between distributed Erlang nodes could hang if one of the nodes suddenly dies. The cause was incomplete error handling in the inet_* modules and the inet-driver. This is corrected.
Own Id: OTP-2055
Aux Id: seq 549- There was a problem (in R3A) on Windows NT , that it was impossible to make contact between two Erlang nodes on the same machine if the machine was not configured to use DNS and did also not have it's own hostname in a lmhosts file. This is corrected.
Own Id: OTP-2061
Aux Id: seq 572, seq 573- The documentation has been updated to cover VxWorks too.
Own Id: OTP-2157Improvements and new features
- The documentation for
erlang:process_info(Pid, status)
now lists thesuspended
state as a possible return value.
Own Id: OTP-2105
Aux Id: seq 601- The timeouts for
heart
are now configurable. The environment variable HEART_BEAT_TIMEOUT can be used to set the maximum time that heart accept without getting any heart beat message from the Erlang node. Another variable HEART_BEAT_BOOT_DELAY can be used to set the delay time before the hardware watchdog (if any) is triggered. This is used to reserve time for closing down the system in a proper way without interference from the watchdog. Both variables can have values in seconds and must be in the range 10 < x <= 65535. If the variable(s) are not set the default value is 60 seconds for both timeouts.
Own Id: OTP-2143- It is now possible to tell the Erlang node to try with
dns
even if ONLYnis
ornis+
and notdns
is specified in the/etc/nsswitch.conf
file. This can be activated with the kernel valiableinet_dns_when_nis
set totrue
. The variable can be set in the start script or on the command line like this:erl -kernel inet_dns_when_nis true
.
Own Id: OTP-2153R3A02
Fixed errors and malfunctions
- The erlang distribution did not work if the search entry in /etc/resolv.conf was missing. This is corrected.
Own Id: OTP-2036
Aux Id: seq 542- The required format of domain and hostnames is relaxed. Now the requirement is that the name only consists of visible characters (16#21..16#7E).
Own Id: OTP-2037
Aux Id: seq 543R3A (Kernel 2.0)
Fixed errors and malfunctions
- An application can be loaded even if it includes another application which is not yet loaded.
Own Id: OTP-1586- Now the tty is reset correctly when leaving Erlang.
Own Id: OTP-1654- disk_log always truncated internal wrap logs; this is corrected.
Own Id: OTP-1869- The call to pg2:get_closest_pid exited if the process group has no members. This is corrected.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-1945Improvements and new features
- Start of applications is now more asynchronous, in order to prevent deadlock if a starting application calls
application:start
andwhich_applications
.
Own Id: OTP-1629- The application_controller now uses less memory for the storage of application specifications
Own Id: OTP-1630- The documentation about how to start distributed applications is improved.
Own Id: OTP-1631- Improvements in the
disk_log
module: Log name is printed from theinfo
function. A Pid is deleted from log owners when the Pid dies or calls close. Reconfiguration of logs is now handled correctly.
Own Id: OTP-1634
Aux Id: OTP-1435- The
application_controller
is split into two processes; one that handles local applications and one that handles the distributed applications. If distributed applications are used, the configuration parameterstart_dist_ac
should be set.
Own Id: OTP-1636- The new functions pwrite and pread are added to the file module. These functions makes read and write on a specific position in a file more efficient.
Own Id: OTP-1640- The syntax of different files defined by Kernel is described in separate documents. Se the reference manual for
app(4)
andconfig(4)
.
Own Id: OTP-2149Known problems
- It is currently not possible to open a
disk_log for reading only. The same limitation applies toets:file2tab . We consider this to be a bug which will be fixed in a forthcoming version.
Own Id: OTP-17161 Kernel 1.3.2
1.1 Fixed Bugs and malfunctions
file:stop
does not hang any more.
Own Id:OTP-1404
net_kernel
could in some situations send two nodeup messages to the monitor processes (processes that have evaluatednet_kernel:monitor_nodes()
).
This problem could makeglobal
hang when several nodes connected.
Own Id:OTP-1418; OTP-1127, OTP-1412
Aux Id:tir-d-088
net_kernel
did not send nodedown messages for allowed nodes. If net_kernel:allow(Nodes) was used, no nodedown messages at all were sent to monitor processes net_kernel.
nodedown messages are now sent for allowed nodes but are ignored for connection attempts from disallowed nodes.
Own Id:OTP-1419
application_controller
had sync problems in the takeover phase when an application was remote started.
Own Id:OTP-1426
application_controller
did sometimes report{error,{not_started,App}}
even though the application in question has been started on another node.
Own Id:OTP-1454
Aux Id:HA52440
application_controller
could hang due to a deadlock situation during startup in a distributed system.
Own Id:OTP-1472
1.2 Improvements and new features
- The support for dynamic loading of drivers in module
erl_ddll
is enhanced with reference counting of loaded drivers and automatic unloading of drivers when the "owner" process terminates.
Own Id:OTP-1460
- The
os
module has got 2 new functionsgetenv/1
to read environment variables from the hos operating system andfind_executable/1,2
to find executable programs using a search path.
Own Id:OTP-1461
- A new function
application:which_application(Module)
which returns the application thatModule
belongs to.
Own Id:OTP-1008
2 Kernel 1.3.1
2.1 Fixed Bugs and malfunctions
- Malformed string/list as argument to unix:cmd/1 caused entire ERTS to crash.
Own Id: OTP-1384
- It was not possible to convert a non distributed system into a distributed system as stated in the net_kernel reference manual. Note that this is not the recommended way to start a distributed system.
Own Id: OTP-1393
net_adm:world/1
was broken on Windows NT, since it relied onunix:cmd/1
.
Own Id: OTP-1397
- The
disk_log_server
now clears it's state correctly when a disk_log process terminates.
Own Id: OTP-1402
3 Kernel 1.3
3.1 Improvements and new features
net_ticktime
is configurable through thekernel
application.net_ticktime
specifies the time within which a non responding node will be considered to be down.
-boot_var
flag read byinit
. This flag is used to set a path variable in the boot script. If applications will be placed under another directory than $ROOT/lib in an embedded system this flag can be used.
- A new function for controlling execution of applications is added;
application:permit/2
. The function controls which applications are permitted to execute on the node.
- A new configuration parameter
permissions
specifies the default permission an application has when it is loaded.
- New functions in
application
.
application:load(App, Dist)
- set (and check!) distribution configuration for an application at load time.
application:get_application/0,1
- get the application of a pid.
Own Id: OTP-1306
.config
files are now allowed to contain comments.
Own Id: OTP-1134
Aux Id: HA37561
- It is now possible to specify more than one configuration file to
erl
, by using the command line flag-config
.
- The code server (module
code
) did sometimes store relative pathnames which could cause troubles in some cases. The code server is changed to always store absolute pathnames.
Own Id: OTP-1239
Aux Id: erlang/66
- An elucidation regarding strings in the
code
module. Since the1.1
version of the kernel application thecode
module always returns directory (and file) names as strings. See thecode(3)
manual page.
It is preferable that directory names are provided as strings to all functions. The possibility to provide directory names as atoms may be removed in future releases. Module names should always be given as atoms and the possibility to provide module names as strings may be removed in future releases.
Own Id: OTP-1186
code:priv_dir/1
was very slow and is made much faster now.
Own Id: OTP-1339
- The module
disk_log
is moved fromstdlib
tokernel
, and some new functionality is added.disk_log
supports wrap and halt logs, the size of a log is configurable, it supports different file formats, and it supports replicated logs.
Own Id: OTP-1305
- The
erl_boot_server
is dynamically configurable.
Own Id: OTP-1275
- The functions
add_slave/1
,delete_slave/1
andwhich_slaves/0
are added to theerl_boot_server
.
- New option
raw
tofile:open
and also a new variant of the function which takes a list of options. The open with an optionlist is the recommended way to open a file from no on.
Own Id: OTP-1242
- New format for the
Reason
field when{error,Reason}
is returned from functions in thefile
module. There is also new documentation about this in the reference manual.
Own Id: OTP-1075
- The configuration parameter
os
is removed fromkernel.app
. The functionos:type()
is used instead.
Own Id: OTP-1277
3.2 Fixed Bugs and malfunctions
net_adm:world()
is corrected on Windows NT.
Own Id: OTP-1219
file:list_dir("c:")
returns "No such file..." on NT
Own Id:OTP-1237
- Bad call to
c:c/1
did crash the Erlang shell. Solved by addition of a better test that a module name is correct.
Own Id: OTP-1256
Aux Id: erlang/73
- The
rpc:cast
function was synchronous when casted function call was performed at the current node.
Own Id: OTP-1292
3.3 Incompatibilities with Kernel 1.1.1
- New format for the
Reason
field when{error,Reason}
is returned from functions in thefile
module. This is an interface change (the format ofReason
but it will only break a minimal amount (if any) of old code since the previous format ofReason
was more or less useless in match operations. There where also errors in the documentation and other inconsistencies with the old format.
The most likely places where old code needs to be adjusted is where the highlevel functionsconsult
,path_consult
,eval
andpath_eval
in combination with a match for the result{error,open}
is used.
Own Id: OTP-1075
3.4 Known bugs and problems
4 Kernel 1.1.1
4.1 Improvements and new feature
4.2 Fixed Bugs and malfunctions
application:get_env/1
returnedundefined
for all parameters during startup of an application.
Own Id: OTP-1079
- When synchronization of mandatory node fails using the
sync_nodes_mandatory
configuration parameter , the node should be takendown, but it wasn't.
Own Id: OTP-1083
- Manual page for file corrected.
Own Id: OTP-1102
- Attempt to start an application when already running causes error. Now
application:start/1,2
returns{error,{already_started,Name}}
if the application is running.
Own Id: OTP-1111
Aux Id: tir-f-087, tir-d-087
- Restart (
init:restart/0
) of system did not work after a software upgrade. Started using the now old version.
Own Id: OTP-1113
Aux Id: HA37170
init:stop/0
did not work after a restart (init:restart/0
).
Own Id: OTP-1117
4.3 Incompatibilities with Kernel 1.1
4.4 Known bugs and problems
5 Kernel 1.1
5.1 Improvements and new feature
- Application configuration paramaters can be given from the command line (overrides the configuration file):
erl -Appl Key Value- Load applications before start. All applications (included in the boot script) are loaded before the first application is started.
- Heart uses the hardware watchdog (Solaris), see heart(3).
- Added
error_logger:info_msg/1,2
.
- Support for distributed applications enhanced and documented.
5.2 Fixed Bugs and malfunctions
net_adm:ping(Node)
will never returnpong
if this node is not allowed (net_kernel:allow/1
) to connect toNode
.
net_kernel:allow/1
handles hidden nodes.
5.3 Incompatibilities with OTP P1G
- A configuration file must have suffix .config. (For example, to use the file sys.config, erl -config ./sys is used)
- Old boot scripts won't work - generate new with systools.
- Added the application behaviour. Change in .app file: previously,
{start, {M, F, A}}
was specified, now{mod, {M, A}}
should be specified, andM:start(Type, A)
is called.
code:root_dir/0
,code:lib_dir/0
,code:compiler_dir/0
andcode:uc_dir/0
returns a string.
- The
error_handler
is silent, e.g. it will not write** cannot autoload: Mod **
and** undefined registered name: Name **
to stdout any longer.
5.4 Known bugs and problems
-