aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
AgeCommit message (Collapse)Author
2018-07-20Merge branch 'sverker/crash-dump-crash-literals/OTP-15181' into maint-20Erlang/OTP
* sverker/crash-dump-crash-literals/OTP-15181: erts: Fix bug in crash dump generation
2018-07-12erts: Fix bug in crash dump generationSverker Eriksson
Symptom: emulator core dumps during crash dump generation. Problem: erts_dump_lit_areas did not grow correctly to always be equal or larger than number of loaded modules. The comment about twice the size to include both curr and old did not seem right. The beam_ranges structure contains *all* loaded module instances until they are removed when purged.
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-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-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-05Merge branch 'sverker/system-profile-bug/OTP-15085' into maint-20Erlang/OTP
* sverker/system-profile-bug/OTP-15085: erts: Fix bug in system_profile
2018-06-05Merge branch 'sverker/enif_binary_to_term-bug/OTP-15080' into maint-20Erlang/OTP
* sverker/enif_binary_to_term-bug/OTP-15080: erts: Fix bug in enif_binary_to_term for immediates
2018-06-04erts: Fix race between ets table deletion and auto-unfixSverker Eriksson
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-05-21Fix deadlock in run queue evacuationJohn Högberg
2018-05-21Fix memory leak of processes that died in the run queueJohn Högberg
2018-05-18erts: Fix bug in system_profileSverker Eriksson
seen to cause redundant {profile,_,active,_,_} messages when process is terminating.
2018-05-16erts: Fix bug in enif_binary_to_term for immediatesSverker Eriksson
Symptom: Heap corruption Expanded test case to provoke this bug and test some more term types.
2018-02-27Merge branch 'sverker/erts/more-crash-dump-info/OTP-14820' into maintSverker Eriksson
* sverker/erts/more-crash-dump-info/OTP-14820: erts,observer: Add port-suspended pids to crash dump erts,observer: Add port states and flags to crash dump erts,observer: Add dirty schedulers to crash dump observer: Refactor get_schedulerinfo1 erts,observer: Add more port info to crash dump erts: Cleanup dump_process_info() erts: Include failing garbing process in crash dump erts: Remove unused args to collect_live_heap_frags erts: Add binary vheap sizes to crash dump
2018-02-26Merge branch 'lukas/erts/dirty_trace_clean_fix/OTP-14938' into maintLukas Larsson
* lukas/erts/dirty_trace_clean_fix/OTP-14938: erts: Delay cleanup of removed tracer on dirty scheds
2018-02-26erts: Delay cleanup of removed tracer on dirty schedsLukas Larsson
It is not simple to do the correct de-allocation on a dirty schedulers, so we just delay it until this process runs on a normal scheduler.
2018-02-22erts,observer: Add port-suspended pids to crash dumpSverker Eriksson
2018-02-22erts,observer: Add port states and flags to crash dumpSverker Eriksson
2018-02-20erts,observer: Add dirty schedulers to crash dumpSverker Eriksson
2018-02-20erts,observer: Add more port info to crash dumpSverker Eriksson
2018-02-20erts: Cleanup dump_process_info()Sverker Eriksson
by testing F_SENSITIVE only once.
2018-02-20erts: Include failing garbing process in crash dumpSverker Eriksson
Exclude garbing processes, EXCEPT if run by crash dumping thread in which case we assume the heap is healthy without any move markers yet/left. Switched order between (allocating) setup_rootset() and (move marking) collect_live_heap_frags().
2018-02-20erts: Remove unused args to collect_live_heap_fragsSverker Eriksson
2018-02-20erts: Add binary vheap sizes to crash dumpSverker Eriksson
2018-02-19Merge branch 'john/erts/fix-iolist-bitstring-badarg/OTP-14926' into maintJohn Högberg
2018-02-19Merge branch 'john/erts/fix-iovec-unaligned-binaries/OTP-14921' into maintJohn Högberg
2018-02-15badarg on iolist_to_binary(Bitstring)John Högberg
When supplied without an enclosing list, bitstrings were returned as-is instead of badarging.
2018-02-15Handle unaligned binaries in enif_inspect_iovecJohn Högberg
2018-02-15Handle unaligned binaries in erlang:iolist_to_iovec/1John Högberg
A binary is a binary as long as its size in bits is evenly divisible by 8, regardless of whether it has a bit offset or not.
2018-02-15badarg on iolist_to_iovec(Bitstring)John Högberg
When supplied without an enclosing list, bitstrings were silently truncated to [] instead of badarging.
2018-02-13Merge branch 'maint-20' into maintSverker Eriksson
* maint-20: Updated OTP version Update release notes Update version numbers erts: Add system_flags(erts_alloc,"+M?sbct *") erts: Add age order first fit allocator strategies erts: Refactor erl_ao_firstfit_alloc erts: Add migration options "acnl" and "acfml" kernel: Add os:cmd/2 with max_size option erts: Add more stats for mbcs_pool erts: Fix alloc_SUITE:migration stdlib: Make ets_SUITE memory check try again erts: Improve carrier pool search erts: Improve alloc_SUITE:migration erts: Refactor carrier dealloc migration
2018-02-12Merge 'sverker/maint-19/alloc-n-migration/ERIERL-88'Sverker Eriksson
into 'sverker/maint-20/alloc-n-migration/ERIERL-88' OTP-14915 OTP-14916 OTP-14917 OTP-14918
2018-02-12Merge 'sverker/carrier-migration-improvements'Sverker Eriksson
into 'sverker/maint-19/alloc-n-migration/ERIERL-88'
2018-02-12erts: Add system_flags(erts_alloc,"+M?sbct *")Sverker Eriksson
to change sbct limit in runtime for chosen allocator type. With great power comes great responsibility.
2018-02-12erts: Add age order first fit allocator strategiesSverker Eriksson
ageffcaoff: Age First Fit Carrier, Address Order First Fit (within carrier) ageffcbf : Age First Fit Carrier, Best Fit (within carrier) ageffcaobf: Age First Fit Carrier, Address Order Best Fit (within carrier) Prefer old carriers, the older the better.
2018-02-08erts: Refactor erl_ao_firstfit_allocSverker Eriksson
In preparation for carrier age order. Change 'flavor' to 'blk_order' and 'crr_order'.
2018-02-08erts: Add migration options "acnl" and "acfml"Sverker Eriksson
acnl: Abandon Carrier Nr Limit acfml: Abandon Carrier Free block Min Limit
2018-01-24Merge branch 'sverker/hipe-load-fixing/OTP-14891' into maintSverker Eriksson
2018-01-17Fix slow hipe executionSverker Eriksson
particularly slow erlc when compiler is hipe compiled. hipe_unified_loader:load did not patch external call sites and instead caused a double hipe mode switch per call. hipe_unified_loader:load is only used for early modules first loaded as beam and by code:atomic_load and friends.
2018-01-17Merge branch 'fhunleth/binary_to_integer_chec/PR-1671/OTP-14879' into maintLukas Larsson
* fhunleth/binary_to_integer_chec/PR-1671/OTP-14879: Fail if ':' is passed to binary_to_integer/2
2018-01-15Merge branch 'sverker/cuddle-big-bin-tests' into maintSverker Eriksson
2018-01-11Fix encoding of filenames in stacktracesRickard Green
2018-01-04erts: Add non fatal big binary creation for test purposeSverker Eriksson
2018-01-04erts: Refactor ProcBin creationSverker Eriksson
into utility functions.
2018-01-03Fail if ':' is passed to binary_to_integer/2Frank Hunleth
Before: 1> binary_to_integer(<<":">>, 16). 3 After: 1> binary_to_integer(<<":">>, 16). ** exception error: bad argument in function binary_to_integer/2 called as binary_to_integer(<<":">>,16) Prior to this change, both list_to_integer/2 and binary_to_integer/2 would convert strings with values between ASCII '9' up to '0'+base for base > 10. For example, when converting in base 16, you could pass ':', ';', '<', '=', '>', and '?' without getting an exception. This was due to a missing check in c2int_is_invalid_char(). This change adds the missing check and a regression test for passing ':'. It also simplifies the code and tightens up an out-of-bounds check to make it off-by-one rather than off-by-two.
2017-12-20erts: Add more stats for mbcs_poolSverker Eriksson
similar to the ones in OTP-19.2.3.1
2017-12-20erts: Improve carrier pool searchSverker Eriksson
* Give back carrier to owner when put in pool with use of dd-queue. * Replace pooled_list with pooled_tree for more efficient search of all owned pooled carriers. * Remove traitor_list as it does not serve much purpose anymore. * Add HOMECOMING bit flag in crr->allctr atomic to (1) avoid double enqueue into dd-enqueue. (2) trigger read barrier in get_used_allctr for newly received carriers.
2017-12-20erts: Improve alloc_SUITE:migrationSverker Eriksson
to mix it up with some realloc calls.
2017-12-20erts: Refactor carrier dealloc migrationSverker Eriksson
by adding a dedicated 'homecoming_dd_block' to use in dd-queue. + Preparation for dd-queue-migration of non-empty carriers. + Get rid of ugly hack where blk->carrier pointer is overwritten by dd-queue and then have to be restored.
2017-12-05Merge branch 'john/erts/lcnt-fix-reg-proc-names/OTP-14803' into maintJohn Högberg