Age | Commit message (Collapse) | Author |
|
Of the core networking apps only net_kernel fails to have a catchall
for unknown gen_server:call messages causing it to exit and eventually
bring down kernal_sup and beam if it had not been manually started.
For stability and consistancy it has been altered to include a
catchall which does not reply.
|
|
Under certain circumstances the net kernel could hang. (Thanks to Scott
Lystig Fritchie.)
|
|
* bg/dist_utils:
dist_utils: Eliminate crash when list_to_existing_atom/1 fails
|
|
In the following scenario list_to_existing_atom/1 may crash
during handshake:
Start a node in one window:
erl -sname adam@localhost
Start another node in another window:
erl -sname bertil
In this node, ping the first node (use the actual hostname
in the command):
net:ping(adam@hostname).
There will be an error report similar to:
=ERROR REPORT==== 27-May-2010::15:03:14 ===
Error in process <0.40.0> on node 'bertil@hostname' with exit value: {badarg,[{erlang,list_to_existing_atom,
["adam@localhost"]},{dist_util,recv_challenge,1},{dist_util,handshake_we_started,1}]}
Eliminate the crash and the error report by catching the call to
list_to_existing_atom/1 and do a clean shutdown if it fails.
|
|
When exchanging groups between nodes pg2 did not remove duplicated members.
This bug was introduced in R13B03 (kernel-2.13.4).
|
|
* fm/file-operations:
Update preloaded modules
Add file:advise/4 - a wrapper to the POSIX syscall posix_fadvise
Add file:datasync/1 for syncing file contents only
sys.h: Correct the get_int64() macro
OTP-8637 fm/file-operations
The functions file:advise/4 and file:datasync/1 have been added. (Thanks to
Filipe David Manana.)
|
|
Useful for informing the Operating System about the access pattern
for a file's data, so that it can adapt the caching strategy to
maximize disk IO performance.
|
|
file:datasync/1 invokes the POSIX system call "int fdatasync(int fd)".
This system call is similar to "fsync" but, unlike fsync, it does not
update the metadata associated with the file (like the access time for
example). It's used by many DBMSs (MySQL and SQLite of example) to
increase disk IO performance, as it avoids disk seeks and disk write
operations compared to fsync.
More details on it at:
http://linux.die.net/man/2/fdatasync
An example, from the MySQL source:
http://bazaar.launchpad.net/~mysql/mysql-server/mysql-5.1-telco-6.1/annotate/head%3A/mysys/my_sync.c#L61
This new function just calls fsync on systems not implementing fdatasync.
|
|
* dp/shell-line-editing:
Readline-style line edit history
OTP-8635 dp/shell-line-editing
The shell's line editing has been improved to more resemble the behaviour
of readline and other shells. (Thanks to Dave Peticolas)
|
|
* ks/kernel:
kernel: Clean up as suggested by tidier
OTP-8606 ks/kernel
|
|
|
|
erl_prim_loader:list_dir/1 returns error on failure and not
{error,_}.
Also update tests in code_SUITE:clash/1.
Defect was introduced with fix for listing .ez archives in 49da83de4b.
Initial code:clash/0 tests added in 79194d5fa7.
Signed-off-by: Tuncer Ayaz <[email protected]>
|
|
* jb/inet6-dist:
Support IPv6 addresses in long host names
Fix implementation of IPv6 TCP distribution protocol
Fix compilation of epmd with IPv6 enabled
OTP-8575 jb/inet6-dist
|
|
When distributing over IPv4, node@<IPv4-address>
(e.g. [email protected]) works correctly.
Permit node@<IPv6-address> (e.g. node@::1) when
distributing over IPv6.
|
|
TCP distribution over IPv6 did not work. The TCP socket
was forcibly closed before any communication could take place.
The following changes resolve this:
* Make the kernel use the inet6 variant of accept.
* Use inet6 variants of TCP socket functions.
* Ensure that the inet6 address family is used in all cases.
|
|
As of this version, the global name server no longer supports nodes running
Erlang/OTP R11B.
|
|
A race condition in os:cmd/1 could cause the caller to get stuck in
os:cmd/1 forever.
|
|
Change the shell's line buffer mechanism to more
closely match readline-based shells. New behavior:
1. Blank lines are not added to the line buffer.
2. Pressing the down arrow on the last line causes no change.
The previous behavior erased the line.
3. The new line is temporarily added to the line buffer
so the user can move to previous lines with up arrows
and then back to the new line with down arrows.
The previous behavior discarded the partially written
new line.
4. Changes made to previous lines while exploring the line
buffer history are preserved.
The previous behavior discarded changes made to older lines.
|
|
* ks/types:
file.hrl: Move out type declarations
kernel: Add types and specs
OTP-8494 ks/types
|
|
Having various type declarations in the file.hrl file was once upon a time
necessary since the system could not really handle remote types. Now it can
and these declarations should not be there but appear in file.erl instead.
This means that files that need to use these types can refer to them using
a remote type reference, and not having to include file.hrl - at least not
for this reason.
|
|
|
|
|
|
prompt strings (io:get_line/{1,2}). io_lib is also updated to
format prompts with the 't' modifier (i.e. ~ts instead of ~s).
|
|
|
|
* mp/hipe_unified_loader:
hipe_unified_loader: only block SMP scheduling when necessary
|
|
* rani/inet_gethostbyname_fixes:
inet_res_SUITE: testcase fixes for legacy DNS resolver (Solaris 8)
inet_res: /etc/resolv.conf: use domain as default search list
inet: delayed/avoided read of /etc/resolv.conf and /etc/hosts
inet_gethost_native: workaround for empty result hostname on MacOS X
inet_res_SUITE: testcase fix for empty domain name
inet:gethostbyname improved to parse IP strings and look up own hostname
OTP-8426 The resolver routines failed to look up the own node name as
hostname, if the OS native resolver was erroneously configured,
bug reported by Yogish Baliga, now fixed.
The resolver routines now tries to parse the hostname as an IP
string as most OS resolvers do, unless the native resolver is
used.
The DNS resolver inet_res and file resolver inet_hosts now do not
read OS configuration files until they are needed. Since the
native resolver is default, in most cases they are never needed.
The DNS resolver's automatic updating of OS configuration file
data (/etc/resolv.conf) now uses the 'domain' keyword as default
search domain if there is no 'search' keyword.
|
|
When the search list option in /etc/resolv.conf was empty, the
domain option was not used as default search domain.
That has been fixed in this patch.
|
|
The 'file' and 'dns' lookup methods configuration files
are now read and parsed at the time of the first lookup
instead of at boot time when per default none of these
lookup methods are used.
|
|
On MacOS X the getaddrinfo function apparently can return a result
without canonical hostname e.g when looking up a IPv6 address
string as hostname. The receiving erlang code was not prepared
for that and this patch does a workaround by using the
search string as default value for canonical hostname.
|
|
Now inet:gethostbyname tries to parse the hostname as an IP string
first if the 'native' lookup method is not used. One can also
make the IP string parsing explicit using the new 'string'
lookup method, or avoid it using the new pseudo lookup
method 'nostring'.
In R13B04 a bug was introduced when the gethostbyname code
was rewritten, so if the native resolver was used and
misconfigured to not be able to look up the own hostname,
inet:gethostbyname also failed. This is now fixed.
|
|
This avoids costly scheduling changes during module loading if native
code is disabled in erts, or not present in the module being loaded.
Signed-off-by: Mikael Pettersson <[email protected]>
|
|
* sc/sctp-connect-nowait:
Implement a non-blocking SCTP connect
OTP-8414 There are new gen_sctp:connect_init/* functions that initiate an
SCTP connection without blocking for the result. The result is
delivered asynchronously as an sctp_assoc_change event. (Thanks
to Simon Cornish.)
|
|
This patch adds a new set of functions - gen_sctp:connect_init/* that initiate
an SCTP connection without blocking for the result. The result is delivered
asynchronously as an sctp_assoc_change event.
The new functions have the same API as documented for gen_sctp:connect/* with
the following exceptions:
* Timeout is only used to supervise resolving Addr (the peer address)
* The possible return values are ok | {error, posix()}
The caller application is responsible for receiving the #sctp_assoc_change{}
event and correctly determining the connect it originated from (for example,
by examining the remote host and/or port). The application should have at
least {active, once} or use gen_sctp:recv to retrieve the connect result.
The implementation of gen_sctp:connect suffers from a number of
shortcomings which the user may avoid by using gen_sctp:connect_init and
adding code to receive the connect result.
First, irrespective of the Timeout value given to gen_sctp:connect, the OS
attempts and retries the SCTP INIT according to various kernel parameters. If
the Timeout value is shorter than the entire attempt then the application will
still receive an sctp_assoc_change event after the {error, timeout} is
returned from the initial call. This could be somewhat confusing (either to
the application or the designer!) especially if the status is
comm_up. Subsequent calls to connect before the OS has finished this process
return {error, ealready} which may also be counter-intuitive.
Second, there is a race-condition (documented in comments in inet_sctp.erl)
that can cause the wrong sctp_assoc_change record to be returned to an
application calling gen_sctp:connect. The race seriously affects connection
attempts when using one-to-many sockets.
|
|
code:clash/0 did not take into account .ez files
when listing contents of code path entries.
Using erl_prim_loader:list_dir/1 instead of
file:list_dir/1 fixes the problem.
Signed-off-by: Tuncer Ayaz <[email protected]>
|
|
|
|
Loading native code is a multi-step operation that needs to be
atomic, but the HiPE loader failed to ensure that.
This caused corruption of runtime system structure in some cases.
Fix by blocking multi_scheduling around main loader entry points.
Signed-off-by: Mikael Pettersson <[email protected]>
|
|
For example, if an archive (app-vsn.ez) just contains an
app-vsn/ebin/mod.beam file, the file info for the app-vsn and
app-vsn/ebin directories are faked using the file info from the
archive file as origin. The virtual direcories can also be
listed. For short, the top directories are virtual if they does
not exist.
|
|
bug was introduced in R13B03.
|
|
An on_load function is supposed to return 'true' to indicate
that the module should be loaded, and 'false' if it should be
unloaded. But returning any other term, as well as causing an
exception, will also unload the module.
Since we don't like boolean values mixed with other values,
change the expected return value as follows:
* If 'ok' is returned, the module will remain loaded and become
callable.
* If any other value is returned (or an exception is generated),
the module will be unloaded. Also, if the returned value is
not an atom, send a warning message to the error_logger
(using error_logger:warning_msg/2).
The new interpretation of the return value means that an on_load
function can now directly return the return value from
erlang:load_nif/2.
|
|
|