diff options
author | John Högberg <[email protected]> | 2018-06-14 09:21:36 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2018-06-14 09:21:36 +0200 |
commit | 66ee6099501b44f52cb715b50d90ea64d05d70ab (patch) | |
tree | f887e93b9e54bf9667ecd14454a06fe228541008 /erts | |
parent | 5cb944bf32b7b3f4ec5500710fe10c28a643e1fd (diff) | |
parent | db6059a9217767a6e42e93cec05089c0ec977d20 (diff) | |
download | otp-66ee6099501b44f52cb715b50d90ea64d05d70ab.tar.gz otp-66ee6099501b44f52cb715b50d90ea64d05d70ab.tar.bz2 otp-66ee6099501b44f52cb715b50d90ea64d05d70ab.zip |
Merge branch 'maint-20' into maint
* maint-20:
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
Diffstat (limited to 'erts')
-rw-r--r-- | erts/doc/src/notes.xml | 20 | ||||
-rw-r--r-- | erts/emulator/beam/erl_db.c | 7 | ||||
-rw-r--r-- | erts/vsn.mk | 2 |
3 files changed, 24 insertions, 5 deletions
diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 31411cc1a2..5b414853a3 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,26 @@ </header> <p>This document describes the changes made to the ERTS application.</p> +<section><title>Erts 9.3.3</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Fixed bug in <c>ets</c> that could cause VM crash if + process A terminates after fixating a table and process B + deletes the table at "the same time". The table fixation + could be done with <c>ets:safe_fixtable</c> or if process + A terminates in the middle of a long running + <c>select</c> or <c>match</c> call.</p> + <p> + Own Id: OTP-15109</p> + </item> + </list> + </section> + +</section> + <section><title>Erts 9.3.2</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/erts/emulator/beam/erl_db.c b/erts/emulator/beam/erl_db.c index 6d4a895ef6..68d984014f 100644 --- a/erts/emulator/beam/erl_db.c +++ b/erts/emulator/beam/erl_db.c @@ -1948,8 +1948,6 @@ BIF_RETTYPE ets_delete_1(BIF_ALIST_1) save_owned_table(BIF_P, tb); } - tid_clear(BIF_P, tb); - if (is_table_named(tb)) remove_named_tab(tb, 0); @@ -1958,6 +1956,7 @@ BIF_RETTYPE ets_delete_1(BIF_ALIST_1) tb->common.heir = am_none; reds -= free_fixations_locked(BIF_P, tb); + tid_clear(BIF_P, tb); db_unlock(tb, LCK_WRITE); if (free_table_continue(BIF_P, tb, reds) < 0) { @@ -3680,7 +3679,6 @@ erts_db_process_exiting(Process *c_p, ErtsProcLocks c_p_locks) && give_away_to_heir(c_p, tb)) { break; } - tid_clear(c_p, tb); /* Clear all access bits. */ tb->common.status &= ~(DB_PROTECTED | DB_PUBLIC | DB_PRIVATE); tb->common.status |= DB_DELETE; @@ -3690,6 +3688,7 @@ erts_db_process_exiting(Process *c_p, ErtsProcLocks c_p_locks) free_heir_data(tb); reds -= free_fixations_locked(c_p, tb); + tid_clear(c_p, tb); db_unlock(tb, LCK_WRITE); state->op = FREE_OWNED_TABLE; break; @@ -3850,7 +3849,7 @@ static void free_fixations_op(DbFixation* fix, void* vctx) struct free_fixations_ctx* ctx = (struct free_fixations_ctx*) vctx; erts_aint_t diff; - ASSERT(!btid2tab(fix->tabs.btid)); + ASSERT(btid2tab(fix->tabs.btid) == ctx->tb); ASSERT(fix->counter > 0); ASSERT(ctx->tb->common.status & DB_DELETE); diff --git a/erts/vsn.mk b/erts/vsn.mk index 687c62343e..9222b74f81 100644 --- a/erts/vsn.mk +++ b/erts/vsn.mk @@ -18,7 +18,7 @@ # %CopyrightEnd% # -VSN = 9.3.2 +VSN = 9.3.3 # Port number 4365 in 4.2 # Port number 4366 in 4.3 |