aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_proc_sig_queue.c
AgeCommit message (Collapse)Author
2019-07-22Merge branch 'rickard/node-refc-tests-22' into maintRickard Green
* rickard/node-refc-tests-22: Fix etp-ets-tables Fix node refc test for free processes hanging around Enhanced node refc bookkeeping Fix node container refc tests of ETS Fix node refc test of external data Node container refc test for persistent terms Include persistent term storage in node/dist refc check Fix node refc test for system message queue
2019-07-22Fix node refc test of external dataRickard Green
2019-07-02Merge branch 'sverker/system_info-procs-bug/ERL-979/OTP-15909' into maint-22Erlang/OTP
* sverker/system_info-procs-bug/ERL-979/OTP-15909: Fix fatal bug in erts_proc_sig_signal_size
2019-06-27Merge branch 'lukas/erts/dist-optimize-large-data/PR-2291/OTP-15926' into maintLukas Larsson
* lukas/erts/dist-optimize-large-data/PR-2291/OTP-15926: erts: Don't copy binary data from dist data erts: Move copy of payload to receiving process
2019-06-24Merge branch 'sverker/system_info-procs-bug/ERL-979/OTP-15909' into maintSverker Eriksson
* sverker/system_info-procs-bug/ERL-979/OTP-15909: Fix fatal bug in erts_proc_sig_signal_size
2019-06-19Fix fatal bug in erts_proc_sig_signal_sizeSverker Eriksson
called by erlang:process_info(memory) erlang:system_info(procs) crash dump break menu Will crash VM if process has a pending monitor DOWN signal in its queue.
2019-06-19erts: Move copy of payload to receiving processLukas Larsson
2019-04-09erts: Fix incorrect gcc may be used init warningLukas Larsson
2019-03-27Merge branch 'john/erts/seq_trace-sigq-clearing/OTP-15704'John Högberg
* john/erts/seq_trace-sigq-clearing/OTP-15704: erts: Handle all signal types when clearing seq_trace token
2019-03-27erts: Handle all signal types when clearing seq_trace tokenJohn Högberg
We walk through all signal queues in the system when clearing seq_trace, so we must be prepared to encounter all kinds of signals.
2019-03-25erts: Pending signals can be for free processesLukas Larsson
Since we no schedule free processes multiple times, pending signals can be from free as well as current processes.
2019-03-21Merge branch 'maint'Rickard Green
* maint: Fix reception of resume signal on process executing dirty
2019-03-20Fix reception of resume signal on process executing dirtyRickard Green
If a suspend/resume signal pair was sent to a process while it was executing dirty the resume counter on the process got into an inconsistent state. This in turn could cause the process to enter a suspended state indefinitely.
2019-02-22erts: Implement trapping while sending distr exit/downLukas Larsson
The reason in EXIT and DOWN may be arbitrarily large, so we yield and allow other processes to execute while encoding and sending the signals over the distribution.
2019-02-22erts: Add ERL_NODE_BOOKKEEP to node tables refcLukas Larsson
2019-02-22erts: Implement fragmentation of distrubution messagesLukas Larsson
2019-02-21erts: Move reason in dist messages to payloadLukas Larsson
The dist messages EXIT, EXIT2 and MONITOR_DOWN have been updated with new versions that send the reason term as part of the payload of the message instead of as part of the control message. This allows the decode of the reason to be done by the receiving process instead of the dist entry which in turn makes it possible for multiple decodes to be done in parallel. This change is done in order to make it easier to fragment the potentially large payload of EXIT, EXIT2 and MONITOR_DOWN into multiple distribution messages. OTP-15611
2019-02-05erts: Refactor rbt _yielding to use reductionsLukas Larsson
All of the Red-Black Tree _yielding functions have been updated to work with reductions returned by the called function instead of yielding on each element.
2018-12-13erts: Fix seq_trace:reset_trace dirty gc bugLukas Larsson
When seq_trace:reset_trace could be called while a process was doing a dirty GC. This triggered a race where all signals was moved to the internal signal queue during the GC which in turn caused the a heap overrun problem. This fix makes it so that the main and msgq lock are taken before the clear. This will make sure that we are allowed to do the clear.
2018-08-21Merge branch 'rickard/fix-suspend-monitor-down/OTP-15237/ERL-704' into maintRickard Green
* rickard/fix-suspend-monitor-down/OTP-15237/ERL-704: Fix incoming suspend monitor down
2018-08-20Fix incoming suspend monitor downRickard Green
An incoming suspend monitor down wasn't handled correct when the local monitor half had been removed with an emulator crash as result.
2018-08-03erts: Fix seq_trace to not clear token for system messagesLukas Larsson
A lot of erts internal messages used behind APIs to create non-blocking calls, e.g. port_command, would cause the seq_trace token to be cleared from the caller when it should not. This commit fixes that and adds asserts that makes sure that all messages sent have to correct token set. Fixes: ERL-602
2018-06-11erts: Fix incoming signal handling for exiting processSverker Eriksson
Seen symptom: handle_process_info() called with is_alive=1 on exiting process, reading broken Process.u.initial.module atom overwritten by Process.u.terminate pointer. Solution: Let erts_proc_sig_handle_incoming() do nothing if process is already exiting.
2018-06-05erts: Cleanup in proc_queue_signalSverker Eriksson
* Remove 'last' arg to sig_enqueue_trace_cleanup * Only notify 'rp' if enqueue succeeded
2018-06-05erts: Fix broken signal queueSverker Eriksson
broken on master by 613cde66c25464121f2f6dace99782bad0e07d9b Scenario: proc_queue_signal() fails to send switched pending signal due to state & ERTS_PSFLG_FREE, and then calls erts_proc_sig_send_monitor_down() to enqueue to self followed by sig_enqueue_trace_cleanup() that destroyed 'next' pointer of enqueued signal. Solution: Switch order and do sig_enqueue_trace_cleanup() first.
2018-05-16Merge branch 'rickard/suspend/OTP-14964'Rickard Green
* rickard/suspend/OTP-14964: Fix erts_try_lock_sig_free_proc() Update etp Replace previous suspend in setnode/3 New process suspend implementation based on async signaling Teach HiPE to yield from receive
2018-05-16New process suspend implementation based on async signalingRickard Green
2018-05-15erts: Fix bug when scheduling monitor-msg comboSverker Eriksson
Bug introduced in master by 613cde66c25464121f2f6dace99782bad0e07d9b
2018-05-15erts: Refactor new erts_make_dirty_proc_handledSverker Eriksson
from ensure_dirty_proc_handled as an outline function callable from inline functions.
2018-04-27Merge branch 'rickard/process_info/OTP-14966'Rickard Green
* rickard/process_info/OTP-14966: Fix scheduled process_info() 'status' request Fix handling of process-info requests in receive
2018-04-27Fix scheduled process_info() 'status' requestRickard Green
2018-04-26erts: Optimize monitor signal by message piggybackSverker Eriksson
If no message/signal is sent (to same destination) then monitor signal is flushed when process is scheduled out.
2018-04-26erts: Cleanup some codeSverker Eriksson
2018-04-26Merge branch 'rickard/process_info/OTP-14966'Rickard Green
* rickard/process_info/OTP-14966: Restore merge of signal queues in queue_messages() if main lock is held Fix message tracing
2018-04-23Fix message tracingRickard Green
2018-04-13Merge branch 'rickard/process_info/OTP-14966'Rickard Green
* rickard/process_info/OTP-14966: New process_info() implementation using signals
2018-04-12New process_info() implementation using signalsRickard Green
2018-04-11Merge branch 'rickard/signals/OTP-14589'Rickard Green
* rickard/signals/OTP-14589: Fix seq trace Fix bad assert
2018-04-05Fix seq traceRickard Green
2018-03-27Merge pull request #1760 from ↵John Högberg
jhogberg/john/erts/any-term-as-seq_trace-label/OTP-14899 Lift the type restrictions on seq_trace token labels
2018-03-26Fix VM probes compilationRickard Green
2018-03-23Fix VM probes compilationJohn Högberg
2018-03-23Lift the type restrictions on seq_trace token labelsJohn Högberg
OTP-14899
2018-03-22Fix lock countingRickard Green
2018-03-22Fix signal order for is_process_aliveRickard Green
2018-03-21Implementation of true asynchronous signaling between processesRickard Green
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.