Age | Commit message (Collapse) | Author |
|
to increase the probablity of a nice badarg
from erlang:port_control.
|
|
* lukas/erts/set_logger_process/OTP-15375:
erts: Fix type of system_logger variable
|
|
|
|
* lukas/erts/scheduler-pollset-fixes/OTP-15538:
erts: Fix getting of poll events on linux >= 4.15.0
erts: Use reduction based polling for starved poll-set
erts: Fix pollset test cases
|
|
When the schedulers never go to sleep (and thus never polls)
it may be that the fds in schedulers poll-sets are never polled.
Before this commit, this was solved by starting a timer when an
overload was detected. This had issues as overloads were not always
detected in time. So this commit reverts to the pre OTP-21 behaviour
so keep a global counter makes that the poll is called when it should.
|
|
* rickard/dirty_scheduler_collapse/maint-21/OTP-15509:
Fix bug causing dirty scheduler sleeper list inconsistency
|
|
|
|
If the main lock is not taken then any process running
on a dirty scheduler may cause all kinds of problems.
|
|
* lukas/erts/set_logger_process/OTP-15375:
Update preloaded modules
erts: Add erlang:system_flag(system_logger,_)
|
|
rickard/dirty_scheduler_collapse/maint-21/OTP-15509
* rickard/dirty_scheduler_collapse/OTP-15509:
Fix bug causing dirty scheduler sleeper list inconsistency
|
|
|
|
This flag allows logger and other components to set the
process which log messages from ERTS are to be sent.
|
|
I noticed this seconds after merging... :(
|
|
This makes them roughly as fast as integer_to_list/1 and
integer_to_binary/1.
|
|
|
|
* john/erts/prim_file-init-restart/OTP-15495/ERL-821:
Remove an unused variable
Spawn prim_file helper as a system process
|
|
|
|
* sverker/big-band-bug/ERL-804/OTP-15487:
erts: Fix bug in 'band' of two negative numbers, one big
|
|
* lukas/erts/fix-seq_trace-reset_trace/OTP-15490:
erts: Fix seq_trace:reset_trace dirty gc bug
erts: Use sys_memcpy in copy_one_frag
|
|
* sverker/big-band-bug/ERL-804/OTP-15487:
erts: Fix bug in 'band' of two negative numbers, one big
|
|
maint
* sverker/fix-atomics-get-large-unsigned/PR-2061/OTP-15486:
erts: Fix possible heap corruption getting atomics
|
|
Similar bug as for bxor fixed by abc4fd372d476821448dfb9
Ex:
1> io:format("~.16B\n", [-16#1110000000000000000 band (-1)]).
-1120000000000000000
Wrong result for
(-X bsl WS) band -Y.
where
X is any positive integer
WS is erlang:system_info(wordsize)*8*N where N is 1 or larger
Y is any positive integer smaller than (1 bsl WS)
Fix:
The subtraction of 1 (for 2-complement conversion)
must be carried along all the way to the last words.
|
|
* lukas/erts/fix_lit_msg_copy_in_gc:
erts: Use ptr_val for pointer in gc msg copy
|
|
Due to comparison as a signed integer, when getting an unsigned atomic
in the range 2^63-1..2^64-1 (when the most significant bit was set), the
heap could get corrupted when the integer was retrieved: hsz would get
set to zero, but the code proceeded to build a bignum.
Steps to reproduce (at least on x86_64):
$ erl
1> A = atomics:new(1,[{signed,false}]).
2> atomics:put(A,1,18446744073709551615).
3> atomics:get(A,1).
At the last step, the shell would print some garbage and hang.
|
|
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.
|
|
|
|
The multiplication of two bignums is specially optimized when the two
operands have the same address, because squaring can be done more
efficiently than multiplication of two arbitrary integers. That is,
expressions such as `I * I` will be calculated by squaring the value
of `I`.
The optimized function for squaring would read one word beyond the
end of the bignum in the last iteration of a loop. The garbage
value would never be used. In almost all circumstances that would
be harmless. Only if the read word happened to fall on the start
of an unmapped page would the runtime crash. That is unlikely
to happen because most bignums are stored on a process heap, and
since the stack is located at the other end of the block that the
heap is located in, the word beyond the end of bignum is guaranteed
to be readable.
|
|
Without this fix asserts would trigger in debug build
but nothing else would break.
|
|
* lukas/OTP-21.1.1/scheduler_pollset/OTP-15475:
erts: Move fds with active true behaviour to own pollset
erts: Fix lists_member_2 reduction count
erts: Allow code_model_small to be set in xcomp setting
erts: Implement delay_send using timer instead of poll
erts: Optimize driver_set_timer(0) to fire at once
erts: Optimize the inet driver multi timers for one timer
erts: Move all inet tcp CONNECTED timers to multi timer
erts: Add erts_io_notify_port_task_executed to check_io msacc state
erts: Add pre-alloc to ALLOC msacc state
erts: Make thr prgr wakeup current or sched 1
erts: Pass thread progress data where possible
|
|
At start of the VM a poll-set that the schedulers
will check is created where fds that have triggered
many (at the moment, many means 10) times without
being deselected inbetween. In this scheduler specific
poll-set fds do not use ONESHOT, which means that the
number of syscalls goes down dramatically for such fds.
This pollset is introduced in order to handle fds that
are used by the erlang distribution and that never
change their state from {active, true}.
This pollset only handles ready_input events,
ready_output is still handled by the poll threads.
During overload, polling the scheduler poll-set is done
on a 10ms timer.
|
|
A copy has to be made of the message as there is
a trace token. There was a bug where the actual
message was incorrectly modified even if it was a
literal.
|
|
|
|
OTP-15474
|
|
By optimizing driver_set_timer for 0 we can use it
instead of select to do a yield in the driver.
Use full for delay_send in the inet driver.
OTP-15472
|
|
OTP-15450
|
|
* lukas/erts/fix-msacc-gc-states/OTP-15450:
erts: Fix msacc GC states on dirty scheds
|
|
erts: fix attempt to start timer when executing on dirty scheduler
OTP-15446
|
|
Since OTP R20, there is a possibility for MAJOR garbage collection to
run on dirty scheduler. So DistEntry destructor is being called on
dirty scheduler as well. This, in turn, leads to an attempt to schedule
timer on a dirty scheduler too, which is impossible (and will assert
on debug build, but does succeed for release build, creating an
infinite busy loop, since aux work wakes scheduler up, but dirty
scheduler cannot execute aus work).
There is a similar method in erl_hl_timer, see erts_start_timer_callback.
|
|
* sverker/erts/atomics-counters/OTP-13468:
erts: Fix bug in counters
erts: Refactor erl_bif_counters.c
|
|
Wow, that could have been embarrassing.
|
|
with more consistent naming.
|
|
into maint
* john/erts/spectre-configure-flag-otp_20/OTP-15430/ERIERL-237:
Allow disabling retpoline in interpreter loop
Add a ./configure flag for spectre mitigation
|
|
AGAIN
* sverker/erts/atomics-counters/OTP-13468:
erts: Add counters:put/3
|
|
|
|
john/erts/spectre-configure-flag-otp_20/OTP-15430/ERIERL-237
* john/erts/spectre-configure-flag/OTP-15430/ERIERL-237:
Allow disabling retpoline in interpreter loop
Add a ./configure flag for spectre mitigation
|
|
We only do this when the user has explicitly told us it's okay to
partially disable mitigation (spectre-mitigation=incomplete). The
macro is inert if it isn't.
|
|
* john/erts/defer-orphan-file-close/OTP-15421/ERIERL-261:
Fix broken assertion on monitor release
Avoid closing files in gc/monitor callbacks
|
|
* sverker/erts/atomics-counters/OTP-13468:
erts: Add new module 'counters'
erts: Add new module 'atomics'
|
|
|
|
|