summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-09-29 11:04:12 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-09-29 11:04:12 +0300
commit74bd3683ca8da4084e664f4f417b95fd74a5b319 (patch)
tree50d60a7be6bd37d7bebe4f268ab313885a78d5ed
parenta441b064897866d42317f61b9338ad9201575f24 (diff)
downloadmariadb-git-74bd3683ca8da4084e664f4f417b95fd74a5b319.tar.gz
MDEV-23839 innodb_fast_shutdown=0 hang on change buffer merge
ibuf_merge_or_delete_for_page(): Do not attempt to invoke ibuf_delete_recs() on a page of the change buffer itself. The caller could already be holding ibuf->index->lock, and an attempt to acquire it in S mode would hang the release server or cause an assertion failure in rw_lock_s_lock_func() in a debug server. This problem was reproducible on 1 out of 2 runs of the following: ./mtr --no-reorder \ innodb.innodb-page_compression_default \ innodb.innodb-page_compression_snappy \ innodb.innodb-page_compression_zip \ innodb.innodb_wl6326_big innodb.xa_recovery
-rw-r--r--storage/innobase/ibuf/ibuf0ibuf.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/storage/innobase/ibuf/ibuf0ibuf.cc b/storage/innobase/ibuf/ibuf0ibuf.cc
index 7e01c864a50..7068dab77a4 100644
--- a/storage/innobase/ibuf/ibuf0ibuf.cc
+++ b/storage/innobase/ibuf/ibuf0ibuf.cc
@@ -4472,7 +4472,10 @@ ibuf_merge_or_delete_for_page(
fil_space_release(space);
if (UNIV_UNLIKELY(srv_shutdown_state)
- && !srv_fast_shutdown) {
+ && !srv_fast_shutdown
+ && (!block
+ || btr_page_get_index_id(block->frame)
+ != DICT_IBUF_ID_MIN + IBUF_SPACE_ID)) {
/* Prevent an infinite loop on slow
shutdown, in case the bitmap bits are
wrongly clear even though buffered