aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/dist.h
AgeCommit message (Collapse)Author
2019-07-22Fix node refc test of external dataRickard Green
2019-04-09Revert "erts: Make DFLAG_BIG_CREATION mandatory"Sverker Eriksson
This reverts commit 321dc6ee0241f802c940def174c0a77262e11f21.
2019-03-25erts: Add crash dumping of EXITING and FREE processesLukas Larsson
2019-03-22Merge branch 'sverker/enable-big-creation/OTP-15603'Sverker Eriksson
* sverker/enable-big-creation/OTP-15603: epmd: Support 32-bit creation values in local node erts: Robustify epmd reply function erts: Reject decoded local refs with too large first word erts: Fix bug in list_to_ref erl_interface: Remove old encoding of pid,port,refs erts: Remove old encoding of pids, ports and refs erts: Make DFLAG_BIG_CREATION mandatory
2019-03-21erts: Make DFLAG_BIG_CREATION mandatorySverker Eriksson
2019-03-19Add possibility to also get size of data from erlang:dist_ctrl_get_data()Rickard Green
2019-02-22erts: Refactor ErtsSendContext to be ErtsDSigSendContextLukas Larsson
This commit removed the general send context (which was used very little anyways) and only uses the distributed send context. This will make it easier to use the dist API at the cost of a little bit more code for the local send.
2019-02-22erts: Make remote send of exit/2 trapLukas Larsson
OTP-15612
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-09-18Merge branch 'maint'Sverker Eriksson
2018-09-18Merge 'sverker/erts/fix-aborted-pending-connection-race/OTP-15296'Sverker Eriksson
2018-09-18erts: Refactor port dist_entry & conn_id into PRTSDSverker Eriksson
spelled out as "port specific data".
2018-09-18Consolidate distribution entry state transitionsSverker Eriksson
* Make connection_id part of the distribution handle as {ConnId, DistEntry} in order for BIFs to verify correct connection. * Make distribution handle opaque to net_kernel. * Remove some unsafe lockless reads of DistEntry.flags * Change state ERTS_DE_STATE_EXITING to be more of an internal state that prevents erts from enqueue, encode or schedule new data to be sent. Otherwise it should behave like ERTS_DE_STATE_CONNECTED.
2018-09-12Merge branch 'maint'Rickard Green
* maint: Updated OTP version Update release notes Update version numbers erts: Fix "Prevent inconsistent node lists" fix Fix include-path regression caused by dd0a39c Restore default SIGTERM behaviour for port programs
2018-09-11erts: Fix "Prevent inconsistent node lists" fixSverker Eriksson
done in a31216200bdee2c04b3fb3ae5e26607674715c8a that could cause a new pending connection to be incorrectly aborted.
2018-09-06Merge branch 'maint'Rickard Green
* maint: Updated OTP version Update release notes Update version numbers kernel: Fix missing abort_connection in net_kernel Prevent inconsistent node lists Fix an endless rescheduling loop when a process is executing process_info(self(), ...)
2018-09-05Prevent inconsistent node listsRickard Green
If net_kernel "forgets" to abort a connection (as it currently might), the garbage collection of a distribution entry could cause node lists to enter an inconsistent state.
2018-05-15Throw 'system_limit' when distribution message size exceed INT_MAX instead ↵Maxim Fedorov
of crashing emulator with 'Absurdly large distribution data buffer' Exception must be thrown when buffer has been created and it's size is known. The actual buffer size is not known until the message has been encoded in ERTS_DSIG_SEND_PHASE_FIN. It would have been nice to abort before allocating and encoding, but in order to do that in a safe way the size calculation would need improvements. It is good enough to abort in the ERTS_DSIG_SEND_PHASE_FIN while we wait for the "fragmented distribution message" feature.
2018-03-23Lift the type restrictions on seq_trace token labelsJohn Högberg
OTP-14899
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.
2018-03-02erts: Refactor DistEntry.status flags into a stateSverker Eriksson
Just to simplify and get 4 distinctive states IDLE, PENDING, CONNECTED and EXITING. The old possible flag combos were: 0 PENDING CONNECTED CONNECTED|EXITING EXITING The two EXITING states did not serve any purpose other then as a slight optimization in monitor_node(_,false,_) to shortcut EXITING when there can be no monitors.
2018-03-02erts: Optimize dist transcoding toward erl_/jinterfaceSverker Eriksson
to only transcode if output buffer actually contains unsupported BIT_BINARY_EXT or EXPORT_EXT.
2018-03-02erts,kernel: Add dist_util:strict_order_flags/0Sverker Eriksson
to replace DFLAGS_STRICT_ORDER_DELIVERY and remove that compile time dependency.
2018-03-02erts,kernel: Add erts_internal:get_dflags/0Sverker Eriksson
for kernel to ask erts about distribution flags and keep this info in one place.
2017-11-23erts: Fix erlang:monitor toward c-nodesSverker Eriksson
by suppressing DOP_MONITOR_P, DOP_MONITOR_P_EXIT and DOP_DEMONITOR_P if not supported by the remote node. In 17e198d6ee60f7dec9abfed272cf4226aea44535 I changed the behavior of erlang:monitor to not raise badarg for c-nodes but instead create a monitor to only supervise the connection. But I forgot to prevent DOP_MONITOR_P and friends from being sent to the node that does not expect them. Note: We test both DFLAG_DIST_MONITOR and DFLAG_DIST_MONITOR_NAME for the node to support process monitoring. This is because erl_interface is buggy as it sets DFLAG_DIST_MONITOR without really supporting it. ToDo: Should erl_interface stop setting DFLAG_DIST_MONITOR or should we change the meaning of these flags?
2017-11-15Refactor erts_dsig_prepare argument dep(p)Sverker Eriksson
Don't need to be pointer-pointer
2017-11-15Improve connection abortingSverker Eriksson
2017-11-15Refactor auto_connect into an outline functionSverker Eriksson
and abort_pending_connection into own utility function.
2017-11-15Remove unused ERTS_DSP_RWLOCKSverker Eriksson
2017-11-15erts: Keep magic ref to DistEntry in net_kernelSverker Eriksson
to make sure it's kept alive.
2017-11-15Add optimistic DFLAG_DIST_HOPEFULLY for pending connectionsSverker Eriksson
to avoid tuple fallbacks for export funs and bitstrings. ToDo: Re-encode if receiver turn out to be erl_interface/jinterface.
2017-11-15erts: Fix auto-connect toward erl_interface/jinterfaceSverker Eriksson
2017-11-15Remove obsolete erlang:dgroup_leaderSverker Eriksson
2017-11-15Remove obsolete erlang:dexit/2Sverker Eriksson
2017-11-15Remove obsolete erlang:dlink/1, dunlink/1 and dist_exit/3Sverker Eriksson
2017-11-15Remove obsolete erlang:dsendSverker Eriksson
2017-11-15erts: Introduce asynchronous auto-connectSverker Eriksson
2017-08-28Merge branch 'rickard/dist/OTP-14459' into rickard/dist/master/OTP-14459Rickard Green
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
2017-08-28Introduce sender in distributed signals and dflag configurationRickard Green
2017-07-17erts: Replace usage of all erts_smp prefixes to just ertsLukas Larsson
2017-07-04Change some dist-entry typesRickard Green
2017-06-13Revert "erts: Do not generate atoms on old latin1 external format"Rickard Green
This reverts commit 65b04e233e09e3cc2e0fda3c28e155b95c5a4baf.
2017-05-04Update copyright yearRaimo Niskanen
2017-03-08erts: Do not generate atoms on old latin1 external formatSverker Eriksson
term_to_binary will always generate utf8 atoms ATOM_UTF8_EXT and SMALL_ATOM_UTF8_EXT. Old latin1 atoms, ATOM_EXT and SMALL_ATOM_EXT, are still decoded.
2017-02-15Merge branch 'fix-source-typos'Björn Gustavsson
* fix-source-typos: (25 commits) Fixed typos in system/doc Fixed typos in lib/xmerl Fixed typos in lib/wx Fixed typos in lib/stdlib Fixed typos in lib/snmp Fixed typos in lib/ssl Fixed typos in lib/ssh Fixed typos in PKCS-8.asn1 file Fixed typos in lib/parsetools Fixed typos in lib/orber Fixed typos in lib/mnesia Fixed typos in lib/megaco Fixed typos in lib/kernel Fixed typos in lib/jinterface Fixed typos in lib/inets Fixed typos in lib/hipe Fixed typos in lib/eunit Fixed typos in lib/erl_interface Fixed typos in lib/eldap Fixed typos in lib/edoc ...
2017-02-14erts: Add deallocation veto for magic destructorsSverker Eriksson
A magic destructor can return 0 and thereby take control and prolong the lifetime of a magic binary.
2017-02-14Fixed typos in ertsAndrew Dryga
2016-04-13Merge branch 'henrik/update-copyrightyear'Henrik Nord
* henrik/update-copyrightyear: update copyright-year