Skip to content

Commit 147a317

Browse files
committed
MDEV-25072: Livelock due to innodb_change_buffering_debug
buf_page_get_low(): Do not try to re-evict the page if it is multiply buffer-fixed. In commit 7cffb5f (MDEV-23399) a livelock was introduced. If multiple threads are concurrently requesting the same secondary index leaf page in buf_page_get_low() and innodb_change_buffering_debug is set, all threads would try to evict the page in a busy loop, never succeeding because the block is buffer-fixed by other threads. Thanks to Roel Van de Paar for reporting the original failure and Elena Stepanova for producing an "rr replay" trace.
1 parent 5eae8c2 commit 147a317

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

storage/innobase/buf/buf0buf.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3324,7 +3324,8 @@ buf_page_get_low(
33243324
buf_flush_lists(ULINT_UNDEFINED, LSN_MAX);
33253325
buf_flush_wait_batch_end_acquiring_mutex(false);
33263326

3327-
if (!fix_block->page.oldest_modification()) {
3327+
if (fix_block->page.buf_fix_count() == 1
3328+
&& !fix_block->page.oldest_modification()) {
33283329
goto re_evict;
33293330
}
33303331

0 commit comments

Comments
 (0)