Age | Commit message (Collapse) | Author |
|
* sverker/doc-fixes/OTP-8880:
Documentation update to ETS and drivers
|
|
* sf/erts_de_busy_limit:
Add flag-based setting for the distribution buffer busy limit
|
|
Id: OTP-8912
This patch creates a new family of flags with the "+z" prefix. It
further creates a new configuration option called "dbbl" (which is the
first letter of the name dist_buf_busy_limit). Example usage of this
flag would be "+zdbbl 1048576".
This patch creates an adjustable buffer limit for the amount of data
that may be buffered by the erlang distribution code (in dist.c
specifically). Before this patch, this hard-coded constant was used:
#define ERTS_DE_BUSY_LIMIT (128*1024)
When large binaries are transmitted between nodes (or simply a lot of
medium-sized binaries), it is very easy to hit the old 128KB limit.
Processes that use the erlang:system_monitor() BIF to monitor system
events can be spammed by {monitor, busy_dist_port, ...} message tuples
at rates of tens to even hundreds of messages/second.
A larger buffer limit will allow processes to buffer more outgoing
messages over the distribution. When the buffer limit has been
reached, sending processes will be suspended until the buffer size has
shrunk. The buffer limit is per distribution channel. A higher limit
will give lower latency and higher throughput at the expense of
higher memory usage.
A variation of this patch has been in commercial production use in at
least two companies that the author is aware of. Larger buffer values
can reduce the number of {monitor, busy_dist_port, ...} system
messages drastically, lower overall messaging latencies, and prevent
false timeouts and 'nodedown' messages in extremely busy Mnesia systems.
Test suite: there are two tests:
a. In erlexec_SUITE.erl to test basic set & get of the value
b. In distribution_SUITE.erl, to verify that setting +zdbbl very
low will actually change behavior.
|
|
* maint-r14:
Prepare release
Fix that the documentation top index generator can handle an Ericsson internal application group
Teach -init_debug to print info about on_load handlers begin run
Fix hang in on_load handlers in embedded mode
Conflicts:
erts/vsn.mk
lib/kernel/vsn.mk
|
|
|
|
|
|
In embedded mode, all on_load handlers will be called after
loading all modules but before starting any servers. Therefore,
if an on_load handler calls any function in the code module that
calls the code server (such as code:priv_dir/1), there will be a
deadlock because the code server has not yet been started.
Fix this problem by invoking the on_load handlers after
having started most servers in the kernel application.
|
|
* ms/security-fixes:
erlc: remove unused variable
typer: prevent buffer overflows
run_test: prevent buffer overflow
heart: prevent buffer overflow
escript: prevent buffer overflows
erlexec: prevent buffer overflows
erlc: prevent buffer overflows
dialyzer: prevent buffer overflows
OTP-8892
|
|
With newer releases erts/emulator/internal_doc/erl_ext_dist.txt just
forwards the reader to the ERTS User's Guide. Adjust the comment in
epmd_srv.c to point to this location too.
Signed-off-by: Ralf Doering <[email protected]>
|
|
* pan/cerl-gdb-emacs/OTP-8882:
Incorporate Michael Santos patch for cerl and gdb via emacs
|
|
* rickard/halfword-bug:
Fix newly introduced halfword emulator bugs
|
|
Conflicts:
erts/vsn.mk
|
|
Michael Santos supplied a very nice patch that did set the annotation level
correctly for gdb when run from cerl in emacs.
The patch adds --annotate=3 to the gdb command line, which makes emacs
parse the gdb output correctly, making the right source code be loaded in
the emacs buffer.
While integrating it, I removed my faulty code trying to do the same with hacky
elisp commands. Michaels way is the right way to do it.
Thanks!
|
|
|
|
State more clearly that ETS functions will throw badarg if calling
process lacks access right. And that driver stop callback should free
memory allocted by start.
|
|
|
|
* rt/solaris-pty-handling-fixes:
Add corrected support for Solaris PTYs to run_erl
Fix a typo that leads to syntax errors with DEBUG defined in run_erl
OTP-8878
|
|
* mp/fix-hipe-write:
fix 64-bit writes to 32-bit struct field in HiPE runtime
OTP-8877
|
|
|
|
|
|
Truncate buffers used to hold command line arguments.
|
|
|
|
Check buffer operations on input from escripts, the command line and
environment variables.
|
|
Truncate buffer operations on environment variables.
|
|
Check buffer operations and increase the size of the buffer used for
holding command line arguments, since the "-D" switch will be expanded
into 3 arguments when passed to erl.
|
|
Check length of buffers used with environment variables and debug
messages.
|
|
|
|
Make sure that an update to erts/emulator/tools/make_tables will
force all generated files to be re-generated.
|
|
It seems to work (at least on a little-endian architecture)
by sheer luck.
|
|
In the HiPE part of the runtime system's Process struct
there is a state field which is 32 bits wide even on 64-bit
machines.
There is a single instruction in the HiPE AMD64 runtime
where this field is incorrectly written with a 64-bit store.
Luckily the extraneous 32 bits are written as zeros to 4
bytes of tail-padding at the end of the struct, so nothing
should have broken because of this.
The same bug exists in the HiPE PowerPC64 runtime (in
development), but on the big-endian PPC64 the effect is
to write the actual value to the tail-padding and zero
to the struct field, which potentially breaks TRAPs from
BIFs (depending on BIF arities and how many parameter
registers the runtime has been configured to use).
Thanks to Paul Guyot for noticing the oversized write on AMD64.
|
|
Two related but slightly separate issues: run_erl doesn't support Solaris's
/dev/ptmx device and run_erl didn't load the necessary STREAMS modules so that
to_erl can provide terminal echo of keyboard input. This patch adds ifdef'd
support for Solaris and derivatives to open /dev/ptmx directly since adding
the C99 defines to CFLAGS breaks all kinds of other things in the build. It
also adds ifdef'd ioctl calls to load the necessary STREAMS modules to permit
termios to work.
|
|
While attempting to debug odd terminal echo issues on Solaris, I noticed that
run_erl.c will fail to compile due to a typo causing a syntax error.
|
|
In a70159b33f20a26b2674d7cf777617c5f0261a5c, the _VOID_ macro
was eliminated, but one use of it inside an "#ifdef DEBUG"
was forgotten.
|
|
Remove cleartool invocation and adapt docs to reflect git transition.
|
|
|
|
|
|
|
|
* pan/epmd-vulnerabilities/OTP-8780:
Teach testcases to survive TIME_WAIT overload
Update erl_interface doc and testsuite for epmd changes
Restore null termination of input buffer
Teach testcase epmd_SUITE:too_large to accept econnaborted
Teach epmd_cli.c to not respond 'Killed' when killing denied
Calculate minimal packet size for ALIVE2 requests correctly
Document epmd and it's options properly and fixup help text
Fix anomalies in epmd not yet reported as security issues
Remove two buffer overflow vulnerabilities in EPMD
Remove all support for ancient EPMD protocol
Remove very old protocol from EPMD
Conflicts:
lib/erl_interface/src/epmd/epmd_port.c
|
|
* rickard/timer-wheel/OTP-8835:
Use mutex instead of rwlock
|
|
|
|
* pan/binary-bif-valgrind-leak/OTP-8823:
Teach erl_bif_binary not leak memory by doing malloc(0)
|
|
|
|
Use mutex instead of rwlock since the read lock is more or less
unused and it can be quite contended.
|
|
|
|
|
|
* bjorn/http-packet-error/OTP-8831:
Make gen_tcp:recv/2 consistent with ssl:recv/2
|
|
* sv/ethread-atomic-mips:
add MIPS architecture to GCC ethread atomics support
|
|
* rickard/rwmtx-spin/OTP-8819:
Fix deadlock in reader optimized rwlock implementation
Remove unused variables
Increase spincount with many schedulers
Re-enable spin wait on ethreads rwlocks
|
|
When the HTTP packet mode has been enabled for a socket,
the ssl and gen_tcp modules have different error indications
when there is an error while parsing the HTTP header:
ssl:recv(SSLSocket, 0) -> {ok, {http_error, _Str}}
gen_tcp:recv(Socket, 0) -> {error, {http_error, _Str}}
We have decided to change gen_tcp:recv/2 to behave the same
way as ssl:recv/2. That means that there will be always be
an ok tuple if data could be succefully read from the socket,
and an error tuple if there was a read error at the socket level.
|
|
A bug causing a deadlock in the reader optimized rwlock
implementation has been fixed. This bug appeared in
commit 59ee2a593090e7d53c97ceba63cbd300d1b9657e, i.e.,
it has not been seen in any released versions.
|