aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2018-06-29Update release notesErlang/OTP
2018-06-29Update version numbersErlang/OTP
2018-06-29Merge branch 'john/erts/inet-drv-race/OTP-15158/ERL-654' into maint-21Erlang/OTP
* john/erts/inet-drv-race/OTP-15158/ERL-654: Fix a race condition when generating async operation ids
2018-06-29Merge branch 'john/erts/merge-OTP-15067' into maint-21Erlang/OTP
* john/erts/merge-OTP-15067: Don't enqueue system tasks if target process is in fail_state Fix erroneous schedule of freed/exiting processes Fix deadlock in run queue evacuation Fix memory leak of processes that died in the run queue
2018-06-28Merge PR-1844 from arcz/ets_count OTP-15163Sverker Eriksson
Use erlang:system_info(ets_count) and improve docs
2018-06-28Merge branch 'sverker/cerl-fixing' into maintSverker Eriksson
* sverker/cerl-fixing: erts: Remove "-pz $PRELOADED" arguments added by cerl erts: Remove dead code in cerl script
2018-06-28Prepare releaseErlang/OTP
2018-06-28Merge branch 'john/erts/fix-process-schedule-after-free/OTP-15067/ERL-573' ↵Erlang/OTP
into maint-20 * john/erts/fix-process-schedule-after-free/OTP-15067/ERL-573: Don't enqueue system tasks if target process is in fail_state Fix erroneous schedule of freed/exiting processes Fix deadlock in run queue evacuation Fix memory leak of processes that died in the run queue
2018-06-28Merge pull request #1848 from christhekeele/patch-1Hans Bolinder
Add missing bracket to erlang:spawn_opt/4 docs priority tuple option
2018-06-28Fix a race condition when generating async operation idsJohn Högberg
The counter used for generating async operation ids was a plain int shared between all ports, which was incorrect but mostly worked fine since the ids only had to be unique on a per-port basis. However, some compilers (notably GCC 8.1.1) generated code that assumed that this value didn't change between reads. Using a shortened version of enq_async_w_tmo as an example: int id = async_ref++; op->id = id; //A return id; //B In GCC 7 and earlier, `async_ref` would be read once and assigned to `id` before being incremented, which kept the values at A and B consistent. In GCC 8, `async_ref` was read when assigned at A and read again at B, and then incremented, which made them inconsistent if we raced with another port. This commit fixes the issue by removing `async_ref` altogether and replacing it with a per-port counter which makes it impossible to race with someone else.
2018-06-27Move to a dirty scheduler even when we have pending system tasksJohn Högberg
When a system task was enqueued on a process between being scheduled and the check altered in this commit, we'd run dirty code on a normal scheduler as the RUNNING_SYS flag wasn't set and we wouldn't migrate back. This change migrates us to a dirty scheduler instead, which will immediately bounce us back to a normal scheduler where RUNNING_SYS will be set appropriately. This is caught fairly reliably by process_SUITE:system_task_failed_enqueue on machines with a lot of cores.
2018-06-26Merge branch 'maint-21' into maintJohn Högberg
* maint-21: Updated OTP version Prepare release Fix unsafe optimization when running beam_block the second time Fix environment case sensitivity issues on Windows
2018-06-25Merge branch 'john/erts/merge-OTP-15067' into maintJohn Högberg
* john/erts/merge-OTP-15067: Don't enqueue system tasks if target process is in fail_state Fix erroneous schedule of freed/exiting processes Fix deadlock in run queue evacuation Fix memory leak of processes that died in the run queue
2018-06-25Prepare releaseErlang/OTP
2018-06-24Add missing bracket to erlang:spawn_opt/4 priority option docsChristopher Keele
2018-06-21Fix environment case sensitivity issues on WindowsJohn Högberg
2018-06-20Update system_info doc to include ets_countArtur Cygan
2018-06-20Merge branch 'lukas/erts/etp-aux-work-fixes' into maintLukas Larsson
* lukas/erts/etp-aux-work-fixes: erts: Update etp-commands with correct aux_flags
2018-06-19Prepare releaseErlang/OTP
2018-06-18erts: Update etp-commands with correct aux_flagsLukas Larsson
2018-06-18Merge remote-tracking branch 'origin/henrik/Update-copyright'Henrik Nord
* origin/henrik/Update-copyright: Update copyright year
2018-06-18Update copyright yearHenrik Nord
2018-06-18Merge branch 'lukas/erts/fix_vxworks_configure'Lukas Larsson
* lukas/erts/fix_vxworks_configure: erts: Fix vxworks configure broken by corba removal
2018-06-18erts: Fix vxworks configure broken by corba removalLukas Larsson
2018-06-18Update preloaded modulesHenrik Nord
2018-06-15Merge branch 'sverker/macos-select-fd-bug'Sverker Eriksson
* sverker/macos-select-fd-bug: erts: Fix MacOS pollset bug
2018-06-14Merge branch 'maint'John Högberg
* maint: Updated OTP version Prepare release Add test case Parse #mc_new_type{}s before definitions_loop/2 erts: Fix race between ets table deletion and auto-unfix
2018-06-14Merge branch 'john/erts/fix-process-schedule-after-free/OTP-15067/ERL-573' ↵John Högberg
into john/erts/merge-OTP-15067
2018-06-14Don't enqueue system tasks if target process is in fail_stateJohn Högberg
The fail state wasn't re-checked in the state change loop; only the FREE state was checked. In addition to that, we would leave the task in the queue when bailing out which could lead to a double-free. This commit backports active_sys_enqueue from master to make it easier to merge onwards.
2018-06-14Fix erroneous schedule of freed/exiting processesJohn Högberg
When scheduled out, the process was never checked for the FREE state before rescheduling, which meant that a system task could sneak in and cause a double-free later on.
2018-06-13erts: Fix MacOS pollset bugSverker Eriksson
that could cause clearing of fd-bits past allocated bit-vectors. Bug introduced on master by 988f5f5e8061ce2e135a314ca782788eda478a06
2018-06-13Merge branch 'sverker/remote-remove-monitor-test'Sverker Eriksson
2018-06-13Explain why the AM becomes group leaderXavier Noria
2018-06-13Prepare releaseErlang/OTP
2018-06-13Merge branch 'sverker/ets-auto-unfix-delete-race/OTP-15109' into maint-20Erlang/OTP
* sverker/ets-auto-unfix-delete-race/OTP-15109: erts: Fix race between ets table deletion and auto-unfix
2018-06-12Merge pull request #1835 from sirihansen/siri/logger-fixSiri Hansen
2018-06-12erts: Fix monitor_SUITE:remote_remove_monitorSverker Eriksson
to actually run remote on the slave node that it starts.
2018-06-11Merge branch 'sverker/process-info-exiting'Sverker Eriksson
* sverker/process-info-exiting: erts: Fix incoming signal handling for exiting process
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-11filmor/use-after-free-escript-win32/PR-1826/OTP-15119Lukas Larsson
Fix use-after-free on Windows in escript
2018-06-11[logger] Update documentationSiri Hansen
2018-06-11Merge branch 'lukas/kernel/logger-config/OTP-13295'Lukas Larsson
* lukas/kernel/logger-config/OTP-13295: erts: Fix emulator log messages to use erlang:system_time kernel: Add LOGGER_SERVER_TAG to logger_server
2018-06-08erts: Remove "-pz $PRELOADED" arguments added by cerlSverker Eriksson
It caused problems when starting with -rr and other arguments. Not sure what purpose it served as -pz $PRELOADED is not passed by default by "erl".
2018-06-08erts: Remove dead code in cerl scriptSverker Eriksson
2018-06-07Merge branch 'sverker/ets-auto-unfix-delete-race/OTP-15109'Sverker Eriksson
* sverker/ets-auto-unfix-delete-race/OTP-15109: erts: Fix race between ets table deletion and auto-unfix
2018-06-07erts: Fix race between ets table deletion and auto-unfixSverker Eriksson
Bug exists since ets-refs were introduced in 20.0 0d6dc895744c34c9c52fd42f4801a8a941864ae3. Problem: 1. Process A fixates table T. 2. Process B starts deleting table T (either by ets:delete or exit) and does tid_clear(). 3. Process A exits and does proc_cleanup_fixed_table() and get NULL from btid2tab() and deallocates DbFixation. 4. Process B continues deleting table in free_fixations_locked() and finds the deallocated DbFixation in the fixing_procs tree. Solution: Wait with tid_clear() until after free_fixations_locked() has traversed the fixing_procs tree.
2018-06-05Merge branch 'sverker/broken-sig-queue'Sverker Eriksson
* sverker/broken-sig-queue: erts: Cleanup in proc_queue_signal erts: Fix broken signal queue
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-06-05Merge branch 'maint'John Högberg
* maint: Updated OTP version Prepare release inets: Gracefully handle bad headers