mariadb/storage/innobase/include
mariadb-DebarunBanerjee 77bebe9eb0 MDEV-36226 Stall and crash when page cleaner fails to generate free pages during Async flush
During regular iteration the page cleaner does flush from flush list
with some flush target and then goes for generating free pages from LRU
tail. When asynchronous flush is triggered i.e. when 7/8 th of the LSN
margin is filled in the redo log, the flush target for flush list is
set to innodb_io_capacity_max. If it could flush all, the flush
bandwidth for LRU flush is currently set to zero. If the LRU tail has
dirty pages, page cleaner ends up freeing no pages in one iteration.
The scenario could repeat across multiple iterations till async flush
target is reached. During this time the DB system is starved of free
pages resulting in apparent stall and in some cases dict_sys latch
fatal error.

Fix: In page cleaner iteration, before LRU flush, ensure we provide
enough flush limit so that freeing pages is no blocked by dirty pages
in LRU tail. Log IO and flush state if double write flush wait is long.

Reviewed by: Marko Mäkelä
2025-03-31 19:09:23 +05:30
..
btr0btr.h MDEV-32175: Reduce page_align(), page_offset() calls 2024-11-21 11:01:30 +02:00
btr0btr.inl MDEV-29603 btr_cur_open_at_index_side() is missing some consistency checks 2022-11-17 08:19:01 +02:00
btr0bulk.h MDEV-13542: Crashing on corrupted page is unhelpful 2022-06-06 14:03:22 +03:00
btr0cur.h MDEV-35457 Remove btr_cur_t::path_arr 2024-11-20 17:43:04 +03:00
btr0cur.inl MDEV-34515: Contention between purge and workload 2024-08-26 12:23:06 +03:00
btr0defragment.h MDEV-25791: Remove UNIV_INTERN 2021-05-27 13:28:08 +03:00
btr0pcur.h Merge 10.5 into 10.6 2024-04-19 16:01:26 +03:00
btr0pcur.inl MDEV-30400 Assertion height == btr_page_get_level(...) on INSERT 2023-01-24 14:09:21 +02:00
btr0sea.h MDEV-31559 btr_search_hash_table_validate() does not check if CHECK TABLE is killed 2023-06-30 17:07:21 +03:00
btr0sea.inl MDEV-27700 ASAN: Heap_use_after_free in btr_search_drop_page_hash_index() 2022-08-22 16:29:46 +05:30
btr0types.h MDEV-29835 InnoDB hang on B-tree split or merge 2023-03-16 15:52:42 +02:00
buf0buddy.h Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
buf0buf.h MDEV-36226 Stall and crash when page cleaner fails to generate free pages during Async flush 2025-03-31 19:09:23 +05:30
buf0buf.inl Cleanup: Remove duplicated code 2024-11-29 14:16:34 +02:00
buf0checksum.h MDEV-25105 Remove innodb_checksum_algorithm values none,innodb,... 2021-03-11 12:46:18 +02:00
buf0dblwr.h MDEV-36226 Stall and crash when page cleaner fails to generate free pages during Async flush 2025-03-31 19:09:23 +05:30
buf0dump.h Make .clang-format work with clang-8 2019-11-15 18:09:30 +01:00
buf0flu.h MDEV-35438 Annotate InnoDB I/O functions with noexcept 2025-01-09 07:43:24 +02:00
buf0lru.h Cleanup: Remove duplicated code 2024-11-29 14:16:34 +02:00
buf0rea.h MDEV-35438 Annotate InnoDB I/O functions with noexcept 2025-01-09 07:43:24 +02:00
buf0types.h MDEV-35438 Annotate InnoDB I/O functions with noexcept 2025-01-09 07:43:24 +02:00
data0data.h Merge 10.5 into 10.6 2024-04-17 14:14:58 +03:00
data0data.inl Merge branch '10.4' into 10.5 2024-04-16 11:04:14 +02:00
data0type.h MDEV-26294 Duplicate entries in unique index not detected when changing collation 2022-07-04 16:13:04 +03:00
data0type.inl cleanup: un-inline dtype_get_mblen() 2022-04-13 17:50:00 +02:00
data0types.h Update FSF Address 2019-05-11 21:29:06 +03:00
db0err.h MDEV-24035 Failing assertion: UT_LIST_GET_LEN(lock.trx_locks) == 0 causing disruption and replication failure 2024-12-12 18:02:00 +02:00
dict0boot.h MDEV-35190 HASH_SEARCH duplicates effort before HASH_INSERT or HASH_DELETE 2024-11-21 08:59:02 +02:00
dict0crea.h MDEV-34823 Invalid arguments in ib_push_warning() 2024-09-06 14:29:09 +03:00
dict0crea.inl MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
dict0defrag_bg.h MDEV-25919 fixup: Acquire MDL also in defragmentation 2021-09-18 14:39:32 +03:00
dict0dict.h MDEV-36122: Protect table references with a lock 2025-03-26 14:22:58 +02:00
dict0dict.inl MDEV-32176 Contention in ha_innobase::info_low() 2024-06-28 15:57:07 +03:00
dict0load.h MDEV-32027 Opening all .ibd files on InnoDB startup can be slow 2023-11-17 15:07:51 +02:00
dict0mem.h MDEV-35854: Simplify dict_get_referenced_table() 2025-01-23 14:38:08 +02:00
dict0mem.inl Merge 10.5 into 10.6 2024-04-17 14:14:58 +03:00
dict0pagecompress.h MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
dict0pagecompress.inl MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
dict0stats.h Merge 10.5 into 10.6 2023-12-19 18:41:42 +02:00
dict0stats.inl Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
dict0stats_bg.h Merge 10.5 into 10.6 2022-04-26 15:21:20 +03:00
dict0types.h MDEV-35854: Simplify dict_get_referenced_table() 2025-01-23 14:38:08 +02:00
dyn0buf.h Merge 10.5 into 10.6 2024-04-17 14:14:58 +03:00
dyn0types.h Merge from 10.4 to 10.5 2024-04-15 17:46:49 +02:00
eval0eval.h MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
eval0eval.inl Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
eval0proc.h MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
eval0proc.inl MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
fil0crypt.h Merge branch '10.5' into 10.6 2024-08-03 09:04:24 +02:00
fil0crypt.inl MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
fil0fil.h MDEV-35438 Annotate InnoDB I/O functions with noexcept 2025-01-09 07:43:24 +02:00
fil0pagecompress.h Merge 10.4 into 10.5 2021-08-18 18:22:35 +03:00
fsp0file.h MDEV-34830: LSN in the future is not being treated as serious corruption 2024-10-17 17:24:20 +03:00
fsp0fsp.h MDEV-32175: Reduce page_align(), page_offset() calls 2024-11-21 11:01:30 +02:00
fsp0space.h MDEV-25312 Replace fil_space_t::name with fil_space_t::name() 2021-04-07 18:01:13 +03:00
fsp0sysspace.h Cleanup: Make InnoDB page numbers uint32_t 2020-10-15 17:06:17 +03:00
fsp0types.h MDEV-13542: Crashing on corrupted page is unhelpful 2022-06-06 14:03:22 +03:00
fts0ast.h Merge 10.4 to 10.5 2020-10-22 17:08:49 +03:00
fts0blex.h Merge 10.1 into 10.2 2019-04-02 09:14:15 +03:00
fts0fts.h MDEV-24035 Failing assertion: UT_LIST_GET_LEN(lock.trx_locks) == 0 causing disruption and replication failure 2024-12-12 18:02:00 +02:00
fts0opt.h Merge 10.1 to 10.2 2019-10-25 17:33:39 +03:00
fts0pars.h
fts0plugin.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
fts0priv.h Merge 10.5 into 10.6 2024-02-13 20:42:59 +02:00
fts0priv.inl MDEV-33383: Corrupted red-black tree due to incorrect comparison 2024-02-12 17:01:45 +02:00
fts0tlex.h Merge 10.1 into 10.2 2019-04-02 09:14:15 +03:00
fts0tokenize.h MDEV-21581 Helper functions and methods for CHARSET_INFO 2020-01-28 12:29:23 +04:00
fts0types.h Merge 10.5 into 10.6 2024-02-13 20:42:59 +02:00
fts0types.inl MDEV-33383: Corrupted red-black tree due to incorrect comparison 2024-02-12 17:01:45 +02:00
fts0vlc.h MDEV-19522 InnoDB commit fails when FTS_DOC_ID value is greater than 4294967295 2021-10-21 12:56:59 +03:00
fut0lst.h MDEV-33325 Crash in flst_read_addr on corrupted data 2024-04-11 09:58:53 +03:00
gis0geo.h MDEV-21924 Clean up InnoDB GIS record comparison 2020-03-12 18:13:53 +02:00
gis0rtree.h MDEV-30400 Assertion height == btr_page_get_level(...) on INSERT 2023-01-24 14:09:21 +02:00
gis0rtree.inl MDEV-21098: Assertion failure in rec_get_offsets_func() 2022-08-01 11:25:50 +03:00
gis0type.h Merge 10.5 into 10.6 2024-04-17 14:14:58 +03:00
ha0ha.h Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
ha0ha.inl Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
ha0storage.h MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
ha0storage.inl Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
ha_prototypes.h MDEV-35854: Simplify dict_get_referenced_table() 2025-01-23 14:38:08 +02:00
handler0alter.h Merge branch '10.2' into 10.3 2020-05-04 16:47:11 +02:00
hash0hash.h MDEV-35247: ut_hash_ulint() is a waste 2024-11-21 08:59:31 +02:00
ibuf0ibuf.h MDEV-32489 Change buffer index fails to delete the records 2024-04-18 08:30:21 +05:30
ibuf0ibuf.inl MDEV-30400 Assertion height == btr_page_get_level(...) on INSERT 2023-01-24 14:09:21 +02:00
lock0iter.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
lock0lock.h Minor lock_sys cleanup 2025-01-15 16:55:29 +02:00
lock0lock.inl MDEV-13542: Crashing on corrupted page is unhelpful 2022-06-06 14:03:22 +03:00
lock0prdt.h MDEV-20612: Partition lock_sys.latch 2021-02-12 17:44:32 +02:00
lock0priv.h MDEV-34690 lock_rec_unlock_unmodified() causes deadlock 2024-10-23 12:36:17 +03:00
lock0priv.inl MDEV-35190 HASH_SEARCH duplicates effort before HASH_INSERT or HASH_DELETE 2024-11-21 08:59:02 +02:00
lock0types.h Merge 10.5 into 10.6. 2023-09-22 15:21:15 +03:00
log0crypt.h MDEV-25791: Remove UNIV_INTERN 2021-05-27 13:28:08 +03:00
log0log.h Merge 10.5 into 10.6 2024-06-24 13:09:47 +03:00
log0log.inl Merge 10.5 into 10.6 2024-03-12 09:19:57 +02:00
log0recv.h MDEV-36180 Doublewrite recovery of innodb_checksum_algorithm=full_crc32 page_compressed pages does not work 2025-03-26 12:03:44 +01:00
log0types.h Remove bogus references to replaced Google contributions 2023-08-21 15:51:16 +03:00
mach0data.h Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
mach0data.inl Merge branch '10.5' into 10.6 2024-08-03 09:04:24 +02:00
mariadb_stats.h MDEV-34190: r_engine_stats.pages_read_count is unrealistically low 2024-07-04 15:24:49 +03:00
mem0mem.h Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
mem0mem.inl Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
mtr0log.h MDEV-32175: Reduce page_align(), page_offset() calls 2024-11-21 11:01:30 +02:00
mtr0mtr.h MDEV-33112 innodb_undo_log_truncate=ON is blocking page write 2024-01-10 11:53:00 +02:00
mtr0types.h MDEV-30638 Deadlock between INSERT and InnoDB non-persistent statistics update 2023-02-16 08:30:20 +02:00
os0file.h MDEV-36226 Stall and crash when page cleaner fails to generate free pages during Async flush 2025-03-31 19:09:23 +05:30
os0file.inl MDEV-35171 OS_FILE_NORMAL and OS_FILE_AIO are misleading 2024-10-21 15:31:32 +02:00
page0cur.h MDEV-34515: Contention between purge and workload 2024-08-26 12:23:06 +03:00
page0cur.inl MDEV-34515: Contention between purge and workload 2024-08-26 12:23:06 +03:00
page0page.h MDEV-32175: Reduce page_align(), page_offset() calls 2024-11-21 11:01:30 +02:00
page0page.inl MDEV-32175: Reduce page_align(), page_offset() calls 2024-11-21 11:01:30 +02:00
page0types.h MDEV-27924 page_zip_copy_recs() corrupts ROW_FORMAT=COMPRESSED block descriptor 2022-02-23 11:34:52 +02:00
page0zip.h MDEV-13542: Crashing on corrupted page is unhelpful 2022-06-06 14:03:22 +03:00
page0zip.inl Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
pars0grm.h Cleanup: Remove pars_stored_procedure_call() 2021-07-29 15:37:35 +03:00
pars0opt.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
pars0pars.h MDEV-25919 preparation: Various cleanup 2021-08-31 13:54:20 +03:00
pars0sym.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
pars0types.h Update FSF Address 2019-05-11 21:29:06 +03:00
que0que.h MDEV-34515: Reduce context switching in purge 2024-08-26 12:23:17 +03:00
que0que.inl Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
que0types.h MDEV-23379 Deprecate&ignore InnoDB concurrency throttling parameters 2020-08-04 06:59:29 +03:00
read0types.h MDEV-24402: InnoDB CHECK TABLE ... EXTENDED 2022-10-21 10:02:54 +03:00
rem0cmp.h Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
rem0cmp.inl Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
rem0rec.h Merge 10.5 into 10.6 2023-02-10 13:03:01 +02:00
rem0rec.inl MDEV-21098: Assertion failure in rec_get_offsets_func() 2022-08-01 11:25:50 +03:00
rem0types.h Merge 10.4 into 10.5 2020-05-05 21:16:22 +03:00
row0ext.h Merge branch '10.3' into 10.4 2022-01-30 09:46:52 +01:00
row0ext.inl MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
row0ftsort.h Merge branch '10.5' into 10.6 2023-11-08 15:57:05 +01:00
row0import.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
row0ins.h Merge 10.5 into 10.6 2023-03-28 15:25:52 +03:00
row0log.h MDEV-15250 UPSERT during ALTER TABLE results in 'Duplicate entry' error for alter 2022-04-26 16:22:56 +05:30
row0merge.h MDEV-26294 Duplicate entries in unique index not detected when changing collation 2022-07-04 16:13:04 +03:00
row0mysql.h MDEV-35854: Clarify row_rename_table_for_mysql() 2025-01-23 14:38:35 +02:00
row0purge.h MDEV-34515: Contention between purge and workload 2024-08-26 12:23:06 +03:00
row0quiesce.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
row0row.h MDEV-36015: unrepresentable value in row_parse_int() 2025-02-13 15:10:53 +01:00
row0row.inl MDEV-36015: unrepresentable value in row_parse_int() 2025-02-13 15:10:53 +01:00
row0sel.h MDEV-36015: unrepresentable value in row_parse_int() 2025-02-13 15:10:53 +01:00
row0types.h Merge 10.4 into 10.5 2020-03-30 19:07:25 +03:00
row0uins.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
row0umod.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
row0undo.h MDEV-32050: Clean up log parsing 2023-10-25 08:27:08 +03:00
row0upd.h Merge 10.5 into 10.6 2023-01-03 18:13:11 +02:00
row0upd.inl Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
row0vers.h MDEV-34515: Contention between purge and workload 2024-08-26 12:23:06 +03:00
rw_lock.h MDEV-34983: Remove x86 asm from InnoDB 2024-09-23 12:51:27 +03:00
small_vector.h MDEV-35701 trx_t::autoinc_locks causes unnecessary dynamic memory allocation 2025-01-15 16:55:01 +02:00
srv0mon.h MDEV-33613 InnoDB may still hang when temporarily running out of buffer pool 2024-03-22 14:17:39 +02:00
srv0mon.inl MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
srv0srv.h MDEV-33978 P_S.THREADS is not showing all server threads 2025-01-27 12:08:30 +02:00
srv0start.h Merge 10.5 into 10.6 2022-09-26 14:34:43 +03:00
srw_lock.h MDEV-34973: innobase/lock0lock: add noexcept 2024-10-01 09:53:16 +03:00
sux_lock.h Use assert() on RMW arguments 2025-01-09 14:27:13 +02:00
transactional_lock_guard.h MDEV-34973 fixup for POWER,s390x 2024-10-01 13:29:59 +03:00
trx0i_s.h MDEV-35189: Updating cache for INNODB_LOCKS et al is suboptimal 2024-11-12 12:17:34 +02:00
trx0purge.h MDEV-35174 Possible hang in trx_undo_prev_version() 2024-10-16 14:37:44 +03:00
trx0rec.h MDEV-34515: Contention between purge and workload 2024-08-26 12:23:06 +03:00
trx0roll.h MDEV-24035 Failing assertion: UT_LIST_GET_LEN(lock.trx_locks) == 0 causing disruption and replication failure 2024-12-12 18:02:00 +02:00
trx0rseg.h MDEV-34983: Remove x86 asm from InnoDB 2024-09-23 12:51:27 +03:00
trx0sys.h MDEV-35619 Assertion failure in row_purge_del_mark_error 2024-12-13 11:41:47 +02:00
trx0trx.h MDEV-35701 trx_t::autoinc_locks causes unnecessary dynamic memory allocation 2025-01-15 16:55:01 +02:00
trx0trx.inl MDEV-24035 Failing assertion: UT_LIST_GET_LEN(lock.trx_locks) == 0 causing disruption and replication failure 2024-12-12 18:02:00 +02:00
trx0types.h MDEV-24035 Failing assertion: UT_LIST_GET_LEN(lock.trx_locks) == 0 causing disruption and replication failure 2024-12-12 18:02:00 +02:00
trx0undo.h MDEV-32175: Reduce page_align(), page_offset() calls 2024-11-21 11:01:30 +02:00
trx0undo.inl MDEV-33819 The purge of committed history is mis-parsing some log 2024-04-08 11:48:46 +03:00
trx0xa.h Update FSF Address 2019-05-11 21:29:06 +03:00
univ.i MDEV-35190 HASH_SEARCH duplicates effort before HASH_INSERT or HASH_DELETE 2024-11-21 08:59:02 +02:00
ut0byte.h MDEV-21174 fixup: Remove unused ut_bit_set_nth() 2023-09-19 18:02:56 +03:00
ut0byte.inl MDEV-21174 fixup: Remove unused ut_bit_set_nth() 2023-09-19 18:02:56 +03:00
ut0counter.h Merge 10.5 into 10.6 2024-06-17 08:40:07 +03:00
ut0crc32.h MDEV-19935 Create unified CRC-32 interface 2020-09-17 16:07:37 +02:00
ut0dbg.h Merge 10.2 into 10.3 2019-05-29 11:32:46 +03:00
ut0list.h MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
ut0list.inl MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
ut0lst.h Do not use C++11 before MariaDB 10.4 2022-10-14 11:54:05 +03:00
ut0mem.h Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
ut0mem.inl Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
ut0new.h Merge 10.5 into 10.6 2024-03-27 15:00:56 +02:00
ut0pool.h MDEV-35508 Race condition between purge and secondary index INSERT or UPDATE 2024-11-29 10:44:38 +02:00
ut0rbt.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
ut0rnd.h MDEV-35247: ut_hash_ulint() is a waste 2024-11-21 08:59:31 +02:00
ut0rnd.inl MDEV-35247: ut_hash_ulint() is a waste 2024-11-21 08:59:31 +02:00
ut0sort.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
ut0stage.h MDEV-21907: Fix most clang -Wconversion in InnoDB 2020-03-11 08:29:48 +02:00
ut0ut.h Cleanup: Remove ut_format_name() 2024-02-07 13:56:31 +02:00
ut0ut.inl MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
ut0vec.h MDEV-33383: Replace fts_doc_id_cmp, ib_vector_sort 2024-02-12 17:01:17 +02:00
ut0vec.inl MDEV-33383: Replace fts_doc_id_cmp, ib_vector_sort 2024-02-12 17:01:17 +02:00
ut0wqueue.h Merge 10.5 into 10.6 2021-10-21 16:06:34 +03:00