Age | Commit message (Collapse) | Author |
|
into sverker/maint/ets-no-mbuf-trapping/OTP-15660
|
|
Many heap fragments do no longer make the GC slow.
Even worse, we are not guaranteed that a yield will provoke a GC
removing the fragments, which might lead to a one-yield-per-bucket
scenario if the heap fragment(s) still remains after each yield.
|
|
|
|
If the main lock is not taken then any process running
on a dirty scheduler may cause all kinds of problems.
|
|
This flag allows logger and other components to set the
process which log messages from ERTS are to be sent.
|
|
which only existed in a patched version of valgrind (by pan)
no longer used.
Instead we use standard VALGRIND_PRINTF which will end up like this
if valgrind log format is XML and valgrind version >= 3.9:
<clientmsg>
<tid>7</tid>
<threadname>3_scheduler</threadname>
<text>Test case #20 ei_encode_SUITE:test_ei_encode_long/1
</text>
</clientmsg>
Note the extra trailing whitespace that may occure before </text>.
|
|
Two of them only affect valgrind builds
and the one for ERL_CRASH_DUMP_NICE seems benign.
Return value changed in c2d70945dce9cb09d5d7120d6e9ddf7faac8d230
old -> new
-1 -> 0 not found
0 -> 1 found ok
1 -> -1 found but too big
|
|
|
|
* sverker/ets-delete_all_objects-trap/OTP-15078:
erts: Rename untrapping db_free_*empty*_table
erts: Make ets:delete_all_objects yield on fixed table
erts: Optimize ets delete all in fixed table
erts: Refactor ets select iteration code
erts: Cleanup ets code
erts: Optimize ets hash object deallocactions
erts: Refactor pseudo deleted ets objects
erts: Make atomic ets:delete_all_objects yield
erts: Fix reduction bump for ets:delete/1
|
|
|
|
|
|
by using a cooperative strategy that will make
any process accessing the table execute delelete_all_objects_continue
until the table is empty.
This is not an optimal solution as concurrent threads will still
block on the table lock, but at least thread progress is made.
|
|
* rickard/process_info/OTP-14966:
Fix scheduled process_info() 'status' request
Fix handling of process-info requests in receive
|
|
|
|
Improve memory instrumentation
OTP-15024
OTP-14961
|
|
This commit replaces the old memory instrumentation with a new
implementation that scans carriers instead of wrapping
erts_alloc/erts_free. The old implementation could not extract
information without halting the emulator, had considerable runtime
overhead, and the memory maps it produced were noisy and lacked
critical information.
Since the new implementation walks through existing data structures
there's no longer a need to start the emulator with special flags to
get information about carrier utilization/fragmentation. Memory
fragmentation is also easier to diagnose as it's presented on a
per-carrier basis which eliminates the need to account for "holes"
between mmap segments.
To help track allocations, each allocation can now be tagged with
what it is and who allocated it at the cost of one extra word per
allocation. This is controlled on a per-allocator basis with the
+M<S>atags option, and is enabled by default for binary_alloc and
driver_alloc (which is also used by NIFs).
|
|
|
|
Run debug VM or config with --enable-lock-checking.
Exercise VM and then run
erts_debug:lc_graph().
to create a file "lc_graph.<pid>" in current working directory.
|
|
|
|
* rickard/signals/OTP-14589:
Fix VM probes compilation
Fix lock counting
Fix signal order for is_process_alive
Fix signal handling priority elevation
|
|
|
|
Implementation of true asynchronous signaling between processes
|
|
Communication between Erlang processes has conceptually always been
performed through asynchronous signaling. The runtime system
implementation has however previously preformed most operation
synchronously. In a system with only one true thread of execution, this
is not problematic (often the opposite). In a system with multiple threads
of execution (as current runtime system implementation with SMP support)
it becomes problematic. This since it often involves locking of structures
when updating them which in turn cause resource contention. Utilizing
true asynchronous communication often avoids these resource contention
issues.
The case that triggered this change was contention on the link lock due
to frequent updates of the monitor trees during communication with a
frequently used server. The signal order delivery guarantees of the
language makes it hard to change the implementation of only some signals
to use true asynchronous signaling. Therefore the implementations
of (almost) all signals have been changed.
Currently the following signals have been implemented as true
asynchronous signals:
- Message signals
- Exit signals
- Monitor signals
- Demonitor signals
- Monitor triggered signals (DOWN, CHANGE, etc)
- Link signals
- Unlink signals
- Group leader signals
All of the above already defined as asynchronous signals in the
language. The implementation of messages signals was quite
asynchronous to begin with, but had quite strict delivery constraints
due to the ordering guarantees of signals between a pair of processes.
The previously used message queue partitioned into two halves has been
replaced by a more general signal queue partitioned into three parts
that service all kinds of signals. More details regarding the signal
queue can be found in comments in the erl_proc_sig_queue.h file.
The monitor and link implementations have also been completely replaced
in order to fit the new asynchronous signaling implementation as good
as possible. More details regarding the new monitor and link
implementations can be found in the erl_monitor_link.h file.
|
|
make erlang:process_info/1 not retrieve messages
|
|
process_info/1 retrieves a number of properties related to a process,
including the list of messages in its mailbox. This is potentially
unsafe if the target process has a large number of queued messages:
- there is no a priori upper bound on the amount of memory being
allocated to hold that list, and
- the loop to retrieve the messages is uninterruptible, so the
Erlang scheduler where this executes blocks for the duration
We've seen process_info/1 bring down heavily loaded nodes on more
than one occasion. At least once it appeared to have blocked the
Erlang heart process from executing, causing the external heart to
kill the VM.
Consequently this removes 'messages' from the list of process_info
tags to retrieve for process_info/1. Note that process_info/1 still
retrieves 'message_queue_len', and process_info/2 can still retrieve
'messages' when asked to.
A few places in the OTP libraries need minor adjustments, since they
want 'message_queue_len' but compute it from the length of the list
of messages.
|
|
|
|
|
|
|
|
|
|
putenv(3) and friends aren't thread-safe regardless of how you slice
it; a global lock around all environment operations (like before)
keeps things safe as far as our own operations go, but we have
absolutely no control over what libc or a library dragged in by a
driver/NIF does -- they're free to call getenv(3) or putenv(3)
without honoring our lock.
This commit solves this by setting up an "emulated" environment which
can't be touched without going through our interfaces. Third-party
libraries can still shoot themselves in the foot but benign uses of
os:putenv/2 will no longer risk crashing the emulator.
|
|
* dgud/kernel/refc_sched_wall_time/OTP-11694:
test: spawn scheduler_wall_time flag holder
Turn on scheduler_wall_time in an alive process
Redirect system_flag(scheduler_wall_time,_) to kernel_refc
kernel: add a resource reference counter
|
|
|
|
|
|
|
|
and remove ugly encoding fallback as {fun, ...}
DFLAGS_NEW_FUN_TAGS has been supported by vm/erl_interface/jinterface
since R13 or even older.
Renamed test case obsolete_funs to term2bin_tuple_fallbacks
and removed test for {fun,...} fallback
and added missing test for bitstring fallback {Binary, Bits}.
|
|
* lukas/erts/use_SIGRTMIN_for_sys_suspend/OTP-14682:
erts: Use SIGRTMIN on linux for sys_suspend
|
|
The Linux real-time signal is better used on Linux
for suspending schedulers during shutdown as it doesn't
collide with SIGUSR2 usage of other applications.
|
|
It is not longer relevant when using the poll thread
|
|
|
|
|
|
|
|
# Conflicts:
# erts/emulator/beam/erl_process.c
# erts/emulator/beam/sys.h
# erts/emulator/sys/common/erl_check_io.c
# erts/emulator/sys/common/erl_check_io.h
# erts/emulator/sys/unix/sys.c
|
|
|
|
* maint:
Bug fixes of statistics(wall_clock) and statistics(runtime)
Conflicts:
erts/emulator/beam/erl_time_sup.c
|
|
* rickard/statistics-time-fixes/OTP-14597/ERL-465:
Bug fixes of statistics(wall_clock) and statistics(runtime)
Conflicts:
erts/emulator/beam/erl_time_sup.c
|
|
|
|
Conflicts:
erts/emulator/beam/bif.c
erts/emulator/beam/dist.c
erts/emulator/beam/dist.h
erts/emulator/beam/erl_bif_info.c
erts/emulator/beam/erl_node_tables.c
erts/emulator/beam/erl_node_tables.h
erts/emulator/beam/external.c
|
|
|
|
|
|
|