Skip to content

Commit 74bd368

Browse files
committed
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
1 parent a441b06 commit 74bd368

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

storage/innobase/ibuf/ibuf0ibuf.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4472,7 +4472,10 @@ ibuf_merge_or_delete_for_page(
44724472

44734473
fil_space_release(space);
44744474
if (UNIV_UNLIKELY(srv_shutdown_state)
4475-
&& !srv_fast_shutdown) {
4475+
&& !srv_fast_shutdown
4476+
&& (!block
4477+
|| btr_page_get_index_id(block->frame)
4478+
!= DICT_IBUF_ID_MIN + IBUF_SPACE_ID)) {
44764479
/* Prevent an infinite loop on slow
44774480
shutdown, in case the bitmap bits are
44784481
wrongly clear even though buffered

0 commit comments

Comments
 (0)