mariadb/storage
Marko Mäkelä 0d175968d1 MDEV-31354 SIGSEGV in log_sort_flush_list() in InnoDB crash recovery
log_sort_flush_list(): Wait for any pending page writes to cease
before sorting the buf_pool.flush_list. Starting with
commit 22b62edaed (MDEV-25113),
it is possible that some buf_page_t::oldest_modification_
that we will be comparing in std::sort() will be updated from
some value >2 to 1 while we are holding buf_pool.flush_list_mutex.

To catch this type of trouble better in the future, we will clean
garbage (pages that have been written out) from buf_pool.flush_list
while constructing the array for sorting, and check with debug
assertions that all blocks that we are copying from the array to the
list will be dirty (requiring a writeback) while we sort and copy
the array back to buf_pool.flush_list.

This failure was observed by chance exactly once when running the test
innodb.recovery_memory. It was never reproduced in the same form
afterwards. Unrelated to this change, the test does occasionally
reproduce a failure to start up InnoDB due to a corrupted page
being read in recovery. The ticket MDEV-31791 was filed for that.

Tested by: Matthias Leich
2023-07-28 12:36:45 +03:00
..
archive Merge 10.4 into 10.5 2023-02-10 12:02:11 +02:00
blackhole Merge 10.4 into 10.5 2023-02-10 12:02:11 +02:00
columnstore Merge branch '10.5' into 10.6 2023-01-31 09:31:42 +01:00
connect Merge 10.5 into 10.6 2023-04-25 13:10:33 +03:00
csv Merge branch 'bb-10.4-release' into bb-10.5-release 2021-02-15 16:43:15 +01:00
example Merge 10.4 into 10.5 2023-02-10 12:02:11 +02:00
federated Merge 10.5 into 10.6 2023-02-10 13:03:01 +02:00
federatedx Merge 10.5 into 10.6 2023-02-10 13:03:01 +02:00
heap Merge 10.5 into 10.6 2023-02-10 13:03:01 +02:00
innobase MDEV-31354 SIGSEGV in log_sort_flush_list() in InnoDB crash recovery 2023-07-28 12:36:45 +03:00
maria Fix use of uninitialized variable 2023-06-25 16:15:08 +03:00
mroonga Merge 10.5 into 10.6 2023-02-10 13:03:01 +02:00
myisam Merge 10.5 into 10.6 2023-05-23 12:25:39 +03:00
myisammrg Merge 10.5 into 10.6 2023-05-23 12:25:39 +03:00
oqgraph Merge 10.5 into 10.6 2022-01-18 12:59:50 +02:00
perfschema Merge branch '10.5' into 10.6 2023-05-03 09:51:25 +02:00
rocksdb Merge branch '10.5' into 10.6 2023-05-04 18:47:11 +02:00
sequence Merge 10.4 into 10.5 2023-02-10 12:02:11 +02:00
sphinx Merge branch '10.5' into 10.6 2022-11-02 14:33:20 +01:00
spider Merge 10.5 into 10.6 2023-07-05 16:40:22 +03:00
test_sql_discovery Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00