summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorSachin Agarwal <sachin.z.agarwal@oracle.com>2018-02-14 12:51:05 +0530
committerMarko Mäkelä <marko.makela@mariadb.com>2018-05-11 19:10:32 +0300
commit0da98472b70d869c719e62a281a89da5d9700178 (patch)
tree2376c497f5ba2d8f9e0e6edbb9a49559499e5e66 /storage
parent4c7ea34ef691e1a2ed243959de016abb3df32611 (diff)
downloadmariadb-git-0da98472b70d869c719e62a281a89da5d9700178.tar.gz
Bug #23593654 CRASH IN BUF_BLOCK_FROM_AHI WHEN LARGE PAGES AND AHI ARE ENABLED
Problem: Fix for Bug #21348684 (#Rb9581) introduced a conditional debug execute 'buf_pool_resize_chunk_null', which causes new chunks memory for 2nd buffer pool instance is freed. Buffer pool resize function removes all old chunks entry from 'buf_chunk_map_reg' and add new chunks entry into it. But when 'buf_pool_resize_chunk_null' is set true, 2nd buffer pool instance's chunk entries are not added into 'buf_chunk_map_reg'. When purge thread tries to access that buffer chunk, it leads to debug assertion. Fix: Added old chunk entries into 'buf_chunk_map_reg' for 2nd buffer pool instance when 'buf_pool_resize_chunk_null' debug condition is set to true. Reviewed by: Jimmy <Jimmy.Yang@oracle.com> RB: 18664
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/buf/buf0buf.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index 3aa99dfd7d2..2f385b6f8e6 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2018, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Copyright (c) 2013, 2018, MariaDB Corporation.
@@ -2869,6 +2869,9 @@ withdraw_retry:
= buf_pool->n_chunks;
warning = true;
buf_pool->chunks_old = NULL;
+ for (ulint j = 0; j < buf_pool->n_chunks_new; j++) {
+ buf_pool_register_chunk(&(buf_pool->chunks[j]));
+ }
goto calc_buf_pool_size;
}