Age | Commit message (Collapse) | Author |
|
|
|
|
|
This fixes a bug where a send/shutdown error on an active-mode socket results
in the port never being properly closed.
|
|
|
|
(First attempt to fix in 23f132d9ab776a.)
If an synchronous GC was requested by calling:
erlang:garbage_collect(Pid, [{async,Ref}])
the reply message could in certain circumstances be
lost.
The problem is that cleanup_sys_tasks() is never called
if there are dirty tasks, but no other active system tasks.
Also shorten the long waiting times in the test case
binary_SUITE:trapping/1 to make it much more likely that
the GC have not already finished when the process is killed.
|
|
The garbage_collect message could be received while waiting for trace messages,
causing the test to crash erroneously.
|
|
OTP-14438
* rickard/sys-proc-off-heap-msgq:
Enable off-heap message queue for code purger, et. al.
|
|
|
|
* bjorn/erts/fix-sys-task-cleanup:
erl_process.c: Add more assertions in process termination
Make sure that asynchronous replies are not lost
|
|
The fix avoids registering the main thread as an emulator thread
on MacOSX. This since WX steals the main thread for its own usage
on MacOSX, and use the thread as an ordinary driver thread.
|
|
If a link dependency is added in LDFLAGS it should be resolved
in LIBS, so we have to use LIBS and not TYPE_LIBS.
|
|
Before terminating a process, add assertions to make sure that
all queues for system tasks have been emptied.
|
|
If an synchronous GC was requested by calling:
erlang:garbage_collect(Pid, [{async,Ref}])
the reply message could in certain circumstances be
lost.
The problem is in cleanup_sys_tasks() in erl_process.c.
If there were at least one dirty task, only the first
dirty task would be cleaned up. All other systems tasks
would not be cleaned up (that is, no replies would be
sent to other processes waiting for the tasks to finish).
|
|
* bjorn/cuddle-with-tests:
bs_construct_SUITE: Correct calculation of free memory
|
|
|
|
free_mem/0 returned the number of free Kb, but the caller
assumed that it was in Mb.
Also add another clause to further scale down the size of
the binaries created.
|
|
and base allowed hash deviation on nr of standard deviations
to make it easier to fiddle with the work load.
|
|
* sverker/enif_select-testing:
erts: Fix nif_SUITE:monitor_frenzy for threadless
erts: Improve message flush in nif_SUITE
erts: Test monitor resource destructor from thread
|
|
|
|
Pass number of expected messages in order to
wait longer for messages (for slow machines)
while not wasting test time waiting for nothing.
|
|
which is scheduled on non-smp VM.
|
|
#### Why do we need this new feature?
There are cases when a NIF needs to send a message, using `enif_send()`, to a long-lived process with a registered name.
A common use-case is logging, where asynchronous fire-and-forget messages are the norm.
There can also be cases where a yielding or dirty NIF or background thread may request a callback from a service with additional information it needs to complete its operation, yielding or waiting (with suitable timeouts, etc) until its state has been updated through the NIF module's API.
NIFs can only send messages to pids, and the lack of name resolution leaves a complicated dance between separate monitoring processes and the NIF as the only way to keep a NIF informed of the whereabouts of such long-lived processes.
Providing a reliable, built-in facility for NIFs to resolve process (or port) names simplifies these use cases considerably.
#### Risks or uncertain artifacts?
Testing has not exposed any significant risk.
The implementation behaves as expected on regular and dirty scheduler threads as well as non-scheduler threads.
By constraining the `enif_whereis_...()` functions to their minimal scopes and using patterns consistent with related functions, the implementation, testing, and maintenance burden is low.
The API and behavior of existing functions is unchanged.
#### How did you solve it?
While extending `enif_send()` to operate on a pid or an atom (as `erlang:send/2` does) was attractive, it would have entailed changing the type of its `to_pid` parameter and thereby breaking backward compatibility.
The same consideration applies to `enif_port_command()`.
That leaves a choice between 1, 2, or 3 new functions:
1. `enif_whereis()`
2. `enif_whereis_pid()` and `enif_whereis_port()`
3. All of the above.
While option (1), directly mimicking the behavior of `erlang:whereis/1`, is appealing, it poses potential problems if `pid()` or `port()` are subsequently implemented as non-integral types that must be bound to an owning `ErlNifEnv` instance.
Therefore, option (2) has been chosen to use `ErlNifPid`/`ErlNifPort` structures in the API to maintain proper term ownership semantics.
|
|
|
|
|
|
|
|
|
|
OTP-14152
* rickard/ds-runqs:
Make statistics/1 aware of dirty run-queues and tasks
|
|
|
|
* raimo/erts/use-all-bytes-in-abstract-addresses/OTP-14305:
Do not zero terminate Linux abstract addresses
|
|
|
|
|
|
* bjorn/erts/refactor-beam_makeops:
Allow multiple types per argument for specific instructions
Modernize subroutine calls by removing '&'
Eliminate the -gen_dest macro flag
|
|
* bjorn/cuddle-with-tests:
code_SUITE: Remove unused functions
Eliminate warning for variable 'Config' being unused
compile_SUITE: Don't create a directory called 'core'
Don't crash in end_per_testcase/2 in code_SUITE:on_load_embedded/1
|
|
This is a stopgap measure before the release of OTP-20 where
that makes it possible for the user to make the vm not do
anything with SIGTERM and instead rely on the OS default.
To enable this behaviour the user should set the environment
variable ERL_ZZ_SIGTERM_KILL="true".
|
|
Inroduce syntactic sugar so that we can write:
get_list xy xy xy
instead of:
get_list x x x
get_list x x y
get_list x y x
get_list x y y
get_list y x x
get_list y x y
get_list y y x
get_list y y y
|
|
In Perl 5, '&' on direct subroutine calls are optional.
|
|
Instructions that take a 'd' argument needs a -gen_dest flag in their
macros. For example:
%macro:put_list PutList -pack -gen_dest
put_list s s d
-gen_dest was needed when x(0) was stored in a register, since it is
not possible to take the address of a register. Now that x(0) is stored
in memory and we can take the address, we can eliminate gen_dest.
|
|
|
|
|
|
* lukas/erts/trace_recv_esdp_bug/OTP-14411:
erts: the esdp is not always available in matchspec
|
|
enif_monitor_process() typo
|
|
erts: Remove old unused functions
|
|
The functions have been found using: https://github.com/caolanm/callcatcher
|
|
erts: Make erts_schedule_proc2port_signal static
|
|
|
|
* sverker/fix-lc-with-lcnt:
erts: Add minor lock optimization for lcnt
erts: Unbreak --enable-lock-checking --enable-lock-counter
|
|
* sverker/ets-select-replace-const:
stdlib: Add examples for ets:select_replace docs
erts: Fix ets:select_replace with {const, NewTuple}
|
|
Enable ets:select_replace to do a generic single object
compare-and-swap operation of any ets-tuple using
a matchspec like this:
[{Old, [], [{const, New}]}]
The only exception when this does not work is if the key
contains maps or atoms looking like variables (like '$1').
|
|
* sverker/is_module_native-trace-bug/OTP-14390:
erts: Fix code:is_module_native for local trace
erts: Move and rename erts_is_native_break()
|
|
|