Age | Commit message (Collapse) | Author |
|
|
|
|
|
* saleyn/uds/PR-612/OTP-13572:
AF_UNIX is more portable
|
|
Fix dialyzer warning for improper list in prim_inet
by not using an improper list.
|
|
* saleyn/uds/PR-612/OTP-13572:
Rewrite inet* for address family 'local'
Rewrite inet_drv for AF_LOCAL
Assign externally open fd to gen_tcp (UDS support)
Conflicts:
erts/preloaded/ebin/prim_inet.beam
lib/kernel/doc/src/gen_tcp.xml
lib/kernel/doc/src/gen_udp.xml
lib/kernel/src/inet6_sctp.erl
lib/kernel/test/inet_SUITE.erl
|
|
|
|
* henrik/update-copyrightyear:
update copyright-year
|
|
* bjorn/erts/huge-file-fix/OTP-13461:
Handle multi-giga byte writes to files
|
|
Test cases that write 4Gb to a file at once would fail on
OS X and FreeBSD.
By running a simple test program on OS X (El Capitan 10.11.4/Darwin
15.4.0), I found that writev() can handle more than 4Gb of data, while
write() only can handle less than 2Gb. (Note that efile_drv.c will use
write() if there is only one element in the io vector, and writev() if
there is more than one.)
It is tempting to attempt to piggy-back on the existing mechanism
for segmenting write operations in efile_drv.c, but because of the
complex code I find it too dangerous, both from a correctness and
performance perspective.
Instead do the change in unix_efile.c, which is considerably
simpler.
|
|
|
|
Bug introduced on master in a31eab5469b7740d.
|
|
|
|
|
|
* egil/fix-fdatasync-mac/OTP-13411:
erts: Use fcntl(fd, F_FULLFSYNC) instead of fdatasync on Mac OSX
|
|
The syscall fdatasync does not work as intended on Mac OSX.
Both the function fsync and fdatasync now uses fcntl(fd, F_FULLFSYNC) on Mac OSX.
|
|
|
|
|
|
This is mostly a pure refactoring.
Except for the buggy cases when calling erlang:halt() with a positive
integer in the range -(INT_MIN+2) to -INT_MIN that got confused with
ERTS_ABORT_EXIT, ERTS_DUMP_EXIT and ERTS_INTR_EXIT.
Outcome OLD erl_exit(n, ) NEW erts_exit(n, )
------- ------------------- -------------------------------------------
exit(Status) n = -Status <= 0 n = Status >= 0
crashdump+abort n > 0, ignore n n = ERTS_ERROR_EXIT < 0
The outcome of the old ERTS_ABORT_EXIT, ERTS_INTR_EXIT and
ERTS_DUMP_EXIT are the same as before (even though their values have
changed).
|
|
* maint:
Fix inet driver multi timers using new time API
|
|
* rickard/tcp-accept-tmo-bug/OTP-13254:
Fix inet driver multi timers using new time API
|
|
* maint:
erts: Fix sendfile:ing of large files on FreeBSD
|
|
* theom/freebsd-sendfile-patch-2/OTP-13271:
erts: Fix sendfile:ing of large files on FreeBSD
|
|
If the file was larger than the OS send buffer the call
would fail before this patch.
|
|
* maint:
efile_drv: logic error in compressed file write
|
|
|
|
When a AF_LOCAL file descriptor is created externally (e.g. Unix
Domain Socket) and passed to `gen_tcp:listen(0, [{fd, FD}])`, the
implementation incorrectly assigned the address family to be equal
to `inet`, which in the inet_drv driver translated to AF_INET instead
of AF_LOCAL (or AF_UNIX), and an `einval` error code was returned.
This patch fixes this problem such that the file descriptors of the
`local` address family are supported in the inet:fdopen/5,
gen_tcp:connect/3, gen_tcp:listen/2, gen_udp:open/2 calls
|
|
Compiling OTP 18.2.1 with gcc-5.3 shows the following warning:
drivers/common/efile_drv.c:1538:23: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
The code in question is:
if (! (status =
erts_gzwrite((ErtsGzFile)d->fd,
iov[i].iov_base,
iov[i].iov_len)) == iov[i].iov_len) {
d->errInfo.posix_errno =
d->errInfo.os_errno = errno; /* XXX Correct? */
break;
}
If we hoist the assignment out of the if for clarity, it becomes:
status = erts_gzwrite(..., iov[i].iov_len);
if (! status == iov[i].iov_len) { ...; break; }
iov_len is > 0 here, and status will equal iov_len if erts_gzwrite
succeeded, but will be less than iov_len if an error occurred.
"! status" is 0 or 1, which can only equal iov_len if iov_len is 1 and
erts_gzwrite detected an error and returned 0.
The effect of this mistake is that any error when iov_len >= 2 will
skip the conditional code and break statement. In particular, partial
writes (0 < status && status < iov_len) will not be flagged as errors.
All releases since OTP R8B-0 are affected.
The variable "status" is really a boolean, which is to be set to zero
on error. The fix is to set status to 1 if erts_gzwrite() returned iov_len
and 0 otherwise, and to change the condition to "if (! status) ...".
I'm also hoisting the assignment out of the condition since it obscures
the code while providing not benefit (the condition in a while or for
loop would be a different matter).
|
|
|
|
Conflicts:
OTP_VERSION
erts/doc/src/notes.xml
erts/vsn.mk
lib/kernel/doc/src/notes.xml
lib/kernel/src/kernel.appup.src
lib/kernel/vsn.mk
lib/ssl/doc/src/notes.xml
lib/ssl/src/ssl.appup.src
lib/ssl/src/ssl_cipher.erl
lib/ssl/vsn.mk
otp_versions.table
|
|
|
|
OTP-13147
* sverk/cpool_fetch-dc_list-fix:
erts: Reduce alloc_SUITE:rbtree runtime for valgrind
erts: Remove double free in efile_drv
erts: Improve alloc_SUITE:migration test
erts: Pass free mem and build type to alloc_SUITE tests
erts: Fix snprintf in alloc_SUITE for windows
erts: Workaround for strange crash on win64 in alloc_SUITE test code
erts: Refactor alloc_SUITE to use NIFs instead of drivers
erts: Add enif_getenv
erts: Make key argument constant for erl_drv_{get|put}env
erts: Add alloc_SUITE:migration
erts: Add TEST allocator
erts: Fix confusion of callbacks destroying_mbc() vs remove_mbc()
erts: Fix resurrection of carriers from dc_list
|
|
That double free is probably very seldom invoked as the port is already
gone leading to free_data being called instead of file_async_ready.
|
|
|
|
A new {line_delimiter, byte()} option allows line-oriented TCP-based
protocols to use a custom line delimiting character. It is to be
used in conjunction with {packet, line}.
This option also works with erlang:decode_packet/3 when its first argument
is 'line'.
|
|
|
|
A new {line_delimiter, byte()} option allows line-oriented TCP-based protocols
to use a custom line delimiting character. It is to be used in conjunction
with {packet, line}.
This option also works with erlang:decode_packet/3 when its first argument
is 'line'.
|
|
* maint:
erts: Make sure to deal with EINTR write failures
|
|
* lukas/erts/ttsl_eintr/OTP-12987:
erts: Make sure to deal with EINTR write failures
|
|
|
|
|
|
* sverk/inet-packet-ssl_tls-passive:
erts: Fix inet packet mode ssl_tls for passive mode
|
|
* maint:
Add configure switch --disable-saved-compile-time
Fix ethread events with timeout
Improve choice of clock sources at build time
|
|
Caused stack corruption leading to VM crash on windows.
{packet,ssl_tls} is undocumented by the way.
|
|
Lots of pthread platforms unnecessarily falled back on the pipe/select
solution. This since we tried to use the same monotonic clock source
for pthread_cond_timedwait() as used by OS monotonic time. This has
been fixed on most platforms by using another clock source.
Darwin can however not use pthread_cond_timedwait() with monotonic
clock source and has to use the pipe/select solution. On darwin we
now use select with _DARWIN_UNLIMITED_SELECT in order to be able to
handle a large amount of file descriptors.
|
|
Conflicts:
OTP_VERSION
erts/vsn.mk
|
|
|
|
The OSE port is no longer supported and this commit removed it
and any changes related to it. The things that were general
improvements have been left in the code.
|
|
|
|
|
|
* nybek/fix_so_linger_zero__simple:
Update prim_inet.beam
Fix socket option {linger, {true, 0}} to abort TCP connections
Apply 'show_econnreset' socket option to send errors as well
Add 'show_econnreset' TCP socket option
|