Age | Commit message (Collapse) | Author |
|
|
|
|
|
Almost all uses of the 'long' datatype is removed from VM and tests
Emulator test now runs w/o drivers crashing
Nasty abs bug fixed in VM as well as type errors in allocator debug functions
Still one allocator test that fails, domain knowledge is needed to fix that.
Fix type inconsistency in beam_load causing crashes
|
|
Can still not setup -a, but cerl works.
|
|
Still does not run, just compiles.
|
|
* ta/sendfile/OTP-9240: (31 commits)
Add sendfile server printouts
Skip recv/send during tests for fallback platforms
Remove header/trailer support
Remove windows implementation
Expand sendfile documentation
Only allow tcp sockets as target for sendfile
Move sendfile api to file module
Preliminary work on header/trailer
Use free_sendfile explicitly for non-async
Remove debug printouts
Add tests for send/recv/sendfile interactions
Remove tests for file_server sendfile
sendfile caller now has to be the controlling_process
Remove support for file_server, sendfile has to be raw
Set chunk size to 3 GB
Change type of fd to be ErlDrvEvent
Add ifdef's for HAVE_SENDFILE
Fix freebsd support for sendfile
Change nbytes to 64 bit
Implement ignorefd for TCP
...
|
|
Since the API for headers/trailers seem to be very awkward to
work with when using non-blocking io the feature is dropped
for now. See unix_efile.c for more details.
|
|
|
|
Have to figure out how to represent progress in header writing when
using non-blocking, not sure how to do this.
|
|
This is needed because aync job will not call free_sendfile
if there is an async_ready callback.
|
|
|
|
It is not possible to use the maximum size_t/off_t for the chunks
as that causes sendfile to return einval. 3GB seems to work on all
*nix platforms.
|
|
|
|
|
|
|
|
|
|
Ignore fd is a feature used by sendfile to temporarily remove
all driver_select calls on that fd so that another driver can
select on it. It also delays all actions which sends or receives
data in that fd until in the fd is no longer ignored.
Only the controlling_process should use the feature as it is otherwise
possible that the ignore will never be cleaned up and hence create
a memory leak in the driver.
An ignored driver will not detect that an fd has been closed until
it is unignored.
|
|
|
|
|
|
|
|
|
|
When there are no async threads sendfile will use the
ready_output select on the socket fd to know when to send
data.
The file_desc will also be put in the sending sendfile_state
which buffers all other commands to that file until the
sendfile is done.
|
|
Move sendfile data to invoke data instead of file_descr.
Remove usage of ready_output when doing a send.
If told to send 0 bytes, file_sendfile now sends the entire file
for linux.
|
|
outputv will always be used so removed output to decrease
confusion.
|
|
Move the command handling to outputv in preparation for
header and trailer inclusion in the sendfile api.
Use the standard efile communication functions for sendfile.
|
|
* tn/inet_drv-fix:
Cleanup - remove unnecesary bracket level and configure for ifreq.ifr_enaddr
Work around gcc linking with own view of default libs on Solaris
Use libdlpi to get physical address
|
|
Allow Erlang code to use sendfile() where available by wrapping it as
file:sendfile/4 and file:sendfile/2.
sendfile(2) - Linux man page:
"sendfile() copies data between one file descriptor and another.
Because this copying is done within the kernel, sendfile() is more
efficient than the combination of read(2) and write(2), which would
require transferring data to and from user space."
|
|
|
|
Also use 64-bit lib when necessary, specify runtime lib path
for secondary dependency libs, and better check before using
SIOCGIFHWADDR.
|
|
Caused core dump with gen_udp_SUITE on halfword vm.
|
|
|
|
* pan/binary_match_scope/OTP-9701:
Remove remaining gcc 4.6 assigned-but-not-used warnings from erts
Remove GCC 4.6 set-but-not-used warning from erl_bif_binary
Make binary:match with scope return correct values
|
|
* raimo/sctp-dev/OTP-9239: (21 commits)
erts: Possible bugfix for error chunk on old Solaris 10
kernel: Documented gen_sctp:peeloff/2
kernel: Adjust SCTP test to SuSE quirk
erts: Fixes for SCTP on old Solaris 10
Update preloaded files
erts,kernel: Return eprotonosupport when SCTP is not supported
kernel: Adjust SCTP tests to Solaris quirks
erts: Fix SCTP decoding byteorder bug for adaptation_ind
kernel: Rewrite SCTP test socket handler
kernel: Fix SCTP tests for the FreeBSD protocol stack
kernel: Bugfix - SCTP connect with sndrcvinfo in assoc_change event
erts: Default enable SCTP in configure
Update primary bootstrap and preloaded files
erts: Use SCTP functions in default libs
erts: Improve SCTP message defragmenting
erts,kernel: Bugfix - collect fragmented SCTP messages on recv
kernel: Add tests for gen_sctp:peeloff/2
erts,kernel: Implement gen_sctp:peeloff/2
kernel: Add tests for SCTP stream sockets
erts,kernel: Add type stream sockets to SCTP
...
|
|
|
|
* sverker/valgrind-fixing:
erts: valgrind suppressions for prebuilt terms in os_info_init
Fix dlopen-leak of drivers with incorrect version
erts: Add valgrind suppression files
erts: Remove valgrind limit for erts_alloc_permanent_cache_aligned
erts: Fix write-after-free bug in inet driver
ETS: Fix faulty size calculation SIZEOF_EXTSEG
ETS: Fix valgrind PossiblyLost in ETS hash tables
|
|
|
|
|
|
On e.g FreeBSD the functions sctp_bindx() and sctp_peeloff() do not require
any extra linkage library flags and there is no dynamic lib to load
for them; use configure to find them.
|
|
Receive several fragments within the same receive loop if possible.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* bjorn/some-configure-clean-ups:
erts/configure.in: Remove test for reversed setvbuf() arguments
erts/configure.in: Remove broken support for System V
erts/configure.in: Don't check for the presence of mach-o/dyld.h
erts/configure.in: Remove useless --disable-fixalloc option
|
|
Bug caught by valgrind but never confirmed as cause of a real problem.
Triggered by emulator_test/distribution_SUITE:bad_dist_structure
when bad data is received to a distribution port. Port is closed by
erts_net_message() and the freed port data is then later used when returning
to inet_drv. Everything happens in the same call to tcp_inet_input().
==32592== Invalid read of size 8
==32592== at 0x5B6D8C: tcp_deliver (inet_drv.c:8536)
==32592== by 0x5B720E: tcp_recv (inet_drv.c:8652)
==32592== by 0x5B7753: tcp_inet_input (inet_drv.c:8990)
==32592== by 0x5B7FA5: tcp_inet_drv_input (inet_drv.c:9257)
==32592== by 0x4B900C: erts_port_task_execute (erl_port_task.c:856)
==32592== by 0x4AC873: schedule (erl_process.c:5511)
==32592== by 0x5527CA: process_main (beam_emu.c:1225)
==32592== by 0x4A9958: sched_thread_func (erl_process.c:3789)
==32592== by 0x5E2971: thr_wrapper (ethread.c:106)
==32592== by 0x4FEA142: start_thread (in /lib64/libpthread-2.4.so)
==32592== by 0x52C374C: clone (in /lib64/libc-2.4.so)
==32592== Address 0x9b13ea8 is 440 bytes inside a block of size 488 free'd
==32592== at 0x4A1FE94: free (vg_replace_malloc.c:366)
==32592== by 0x58AE69: erts_sys_free (sys.c:2588)
==32592== by 0x48E54F: erts_free (erl_alloc.h:218)
==32592== by 0x497390: driver_free (io.c:3527)
==32592== by 0x5B2E77: inet_stop (inet_drv.c:7152)
==32592== by 0x5B502F: tcp_inet_stop (inet_drv.c:7855)
==32592== by 0x492E60: terminate_port (io.c:1849)
==32592== by 0x493971: erts_do_exit_port (io.c:2059)
==32592== by 0x4CEE01: erts_net_message (dist.c:1508)
==32592== by 0x496AC1: driver_output2 (io.c:3294)
==32592== by 0x5AAA69: inet_port_data (inet_drv.c:1894)
==32592== by 0x5AD57E: tcp_reply_data (inet_drv.c:3181)
==32592== by 0x5B6D84: tcp_deliver (inet_drv.c:8533)
==32592== by 0x5B720E: tcp_recv (inet_drv.c:8652)
==32592== by 0x5B7753: tcp_inet_input (inet_drv.c:8990)
Fixed by checking the negative return code earlier in tcp_deliver().
|
|
|