While testing innodb.recovery_memory related to MDEV-31350 and MDEV-31353, I got a surprise crash near the end of my test run of a RelWithDebInfo executable:
Based on the core dump, it looks like the comparison function may have been invoked on the first out-of-bounds element list.get() + size.
The size is equal to buf_pool.flush_list.count, and all elements in the array list.get() are nonnull. The address immediately after the last element (the second argument passed to std::sort()) contains a null pointer.
To me, this looks like a possible error in the implementation of std::sort() in this version of libstdc+. The executable had been compiled with clang-15, but the option -stdlib=libc+ was not used.
I think that more investigation will be needed on this. There is also other similar use of std::sort() in InnoDB.
Attachments
Issue Links
relates to
MDEV-25113Reduce effect of parallel background flush on select workload
Closed
MDEV-31791Crash recovery in the test innodb.recovery_memory occasionally fails
Closed
MDEV-35225Bogus debug assertion failures in innodb.innodb-32k-crash
Closed
MDEV-27022Buffer pool is being flushed during recovery
Closed
MDEV-31350test innodb.recovery_memory failed on '21 failed attempts to flush a page'
Closed
MDEV-31353InnoDB recovery hangs after reporting corruption
Closed
MDEV-32029Assertion failures in log_sort_flush_list upon crash recovery
2023-07-27 12:34:36 0 [Note] InnoDB: End of log at LSN=315636465
2023-07-27 12:34:36 0 [Note] InnoDB: To recover: 279 pages
2023-07-27 12:34:36 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=239, page number=110]
2023-07-27 12:34:36 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
Hopefully this revised wait loop does the trick and ensures that no page writes are in progress while we sort the buf_pool.flush_list:
for (;;)
{
os_aio_wait_until_no_pending_writes(false);
mysql_mutex_lock(&buf_pool.flush_list_mutex);
if (buf_pool.flush_list_active())
my_cond_wait(&buf_pool.done_flush_list,
&buf_pool.flush_list_mutex.m_mutex);
elseif (!os_aio_pending_writes())
break;
mysql_mutex_unlock(&buf_pool.flush_list_mutex);
}
Marko Mäkelä
added a comment - Another failure with the above buggy patch:
CURRENT_TEST: innodb.recovery_memory
mysqltest: At line 50: query 'SHOW CREATE TABLE t1' failed: ER_UNKNOWN_STORAGE_ENGINE (1286): Unknown storage engine 'InnoDB'
…
2023-07-27 12:34:36 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=311491401
2023-07-27 12:34:36 0 [Note] InnoDB: End of log at LSN=315636465
2023-07-27 12:34:36 0 [Note] InnoDB: To recover: 279 pages
2023-07-27 12:34:36 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=239, page number=110]
2023-07-27 12:34:36 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
Hopefully this revised wait loop does the trick and ensures that no page writes are in progress while we sort the buf_pool.flush_list :
for (;;)
{
os_aio_wait_until_no_pending_writes( false );
mysql_mutex_lock(&buf_pool.flush_list_mutex);
if (buf_pool.flush_list_active())
my_cond_wait(&buf_pool.done_flush_list,
&buf_pool.flush_list_mutex.m_mutex);
else if (!os_aio_pending_writes())
break ;
mysql_mutex_unlock(&buf_pool.flush_list_mutex);
}
2023-07-27 12:51:59 0 [Note] InnoDB: End of log at LSN=284055215
2023-07-27 12:51:59 0 [Note] InnoDB: To recover: 198 pages
2023-07-27 12:51:59 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=218, page number=113]
2023-07-27 12:51:59 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-07-27 12:51:59 0 [Note] InnoDB: Set innodb_force_recovery=1 to ignore corrupted pages.
2023-07-27 12:51:59 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=218, page number=113]
2023-07-27 12:51:59 0 [Note] sorting 194,194
The kill+restart before this failure processed much fewer pages in the last batch:
2023-07-27 12:51:55 0 [Note] sorting 11,11
This means that the test is reproducing two independent bugs. I started one more campaign, hoping to produce an rr replay trace:
while ./mtr --rr=-h --parallel=60 innodb.recovery_memory{,,,,,,,,,}{,,,,,}; do :; done
Marko Mäkelä
added a comment - Unfortunately, also with the revised patch I got a failure:
innodb.recovery_memory 'innodb,release' w59 [ 53 fail ]
Test ended at 2023-07-27 12:52:00
CURRENT_TEST: innodb.recovery_memory
mysqltest: At line 50: query 'SHOW CREATE TABLE t1' failed: ER_UNKNOWN_STORAGE_ENGINE (1286): Unknown storage engine 'InnoDB'
…
2023-07-27 12:51:59 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=280364554
2023-07-27 12:51:59 0 [Note] InnoDB: End of log at LSN=284055215
2023-07-27 12:51:59 0 [Note] InnoDB: To recover: 198 pages
2023-07-27 12:51:59 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=218, page number=113]
2023-07-27 12:51:59 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-07-27 12:51:59 0 [Note] InnoDB: Set innodb_force_recovery=1 to ignore corrupted pages.
2023-07-27 12:51:59 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=218, page number=113]
2023-07-27 12:51:59 0 [Note] sorting 194,194
The kill+restart before this failure processed much fewer pages in the last batch:
2023-07-27 12:51:55 0 [Note] sorting 11,11
This means that the test is reproducing two independent bugs. I started one more campaign, hoping to produce an rr replay trace:
while . /mtr --rr=-h --parallel=60 innodb.recovery_memory{,,,,,,,,,}{,,,,,}; do :; done
2023-07-27 17:32:06 0 [ERROR] InnoDB: Space id and page no stored in the page, read in are [page id: space=2398, page number=729743360], should be [page id: space=1, page number=556]
Marko Mäkelä
added a comment - I failed to reproduce this with rr so far. I got the idea to test with simulated asynchronous I/O:
. /mtr --parallel=100 --repeat=100 --mysqld=--innodb-use-native-aio=0 innodb.recovery_memory{,,,,,,,,,}{,,,,,,,,,}
This did fail as well, so a bug like MDEV-29610 should not play a role.
innodb.recovery_memory 'innodb,release' w87 [ 62 fail ]
Test ended at 2023-07-27 17:32:06
CURRENT_TEST: innodb.recovery_memory
mysqltest: At line 42: query 'CREATE TABLE t1(f1 INT NOT NULL)ENGINE=InnoDB' failed: ER_UNKNOWN_STORAGE_ENGINE (1286): Unknown storage engine 'InnoDB'
…
2023-07-27 17:32:05 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=324014657
2023-07-27 17:32:05 0 [Note] InnoDB: Multi-batch recovery needed at LSN 324529178
2023-07-27 17:32:05 0 [Note] InnoDB: End of log at LSN=325255352
2023-07-27 17:32:05 0 [Note] InnoDB: To recover: LSN 324637270/325255352; 287 pages
2023-07-27 17:32:06 0 [Note] InnoDB: To recover: LSN 325135744/325255352; 383 pages
2023-07-27 17:32:06 0 [ERROR] InnoDB: Space id and page no stored in the page, read in are [page id: space=2398, page number=729743360], should be [page id: space=1, page number=556]
I pushed a fix for the SIGSEGV issue (likely due to a data race with std::sort). The remaining failures will be addressed in MDEV-31791.
Marko Mäkelä
added a comment - I pushed a fix for the SIGSEGV issue (likely due to a data race with std::sort ). The remaining failures will be addressed in MDEV-31791 .
1 breakpoint keep y 0x00005581006f4a55 in std::sort<buf_page_t**, log_sort_flush_list()::<lambda(const buf_page_t*, const buf_page_t*)> > at /usr/include/c++/9/bits/stl_algo.h:1962
breakpoint already hit 1 time
2 breakpoint keep y <MULTIPLE>
breakpoint already hit 22 times
ignore next 9978 hits
2.1 y 0x00005581000b83d1 in buf_page_write_complete(IORequest const&) at /data/Server/bb-11.2-MDEV-14795_1E/storage/innobase/buf/buf0flu.cc:337
2.2 y 0x00005581007cf270 in buf_page_write_complete(IORequest const&) at /data/Server/bb-11.2-MDEV-14795_1E/storage/innobase/buf/buf0flu.cc:321
I observed one page for which oldest_modification_ was modified from 56630890 to 1 while the std::sort() was in progress.
Marko Mäkelä
added a comment - mleich was able to reproduce this in a branch where the fix had not been merged yet:
ssh pluto
rr replay /data/results/1690831257/TBR-2024/1/rr/latest-trace/
break std::sort<buf_page_t**, log_sort_flush_list()::<lambda(const buf_page_t*, const buf_page_t*)> >
continue
break buf_page_write_complete
ignore 2 1000
continue
info breakpoints
Thread 1 hit Breakpoint 1, std::sort<buf_page_t**, log_sort_flush_list()::<lambda(const buf_page_t*, const buf_page_t*)> > (__last=0x5581033f8720, __first=0x5581033f8670, __comp=...)
at /usr/include/c++/9/bits/stl_algo.h:4899
4899 std::__sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp));
(rr) break buf_page_write_complete
Breakpoint 2 at 0x5581000b83d1: buf_page_write_complete. (2 locations)
(rr) ign 2 10000
Will ignore next 10000 crossings of breakpoint 2.
(rr) continue
Continuing.
Thread 1 received signal SIGSEGV, Segmentation fault.
0x00005581006f1b82 in std::__atomic_base<unsigned long>::load (__m=std::memory_order_seq_cst, this=0xd1) at /usr/include/c++/9/bits/atomic_base.h:413
413 load(memory_order __m = memory_order_seq_cst) const noexcept
(rr) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x00005581006f4a55 in std::sort<buf_page_t**, log_sort_flush_list()::<lambda(const buf_page_t*, const buf_page_t*)> > at /usr/include/c++/9/bits/stl_algo.h:1962
breakpoint already hit 1 time
2 breakpoint keep y <MULTIPLE>
breakpoint already hit 22 times
ignore next 9978 hits
2.1 y 0x00005581000b83d1 in buf_page_write_complete(IORequest const&) at /data/Server/bb-11.2-MDEV-14795_1E/storage/innobase/buf/buf0flu.cc:337
2.2 y 0x00005581007cf270 in buf_page_write_complete(IORequest const&) at /data/Server/bb-11.2-MDEV-14795_1E/storage/innobase/buf/buf0flu.cc:321
I observed one page for which oldest_modification_ was modified from 56630890 to 1 while the std::sort() was in progress.
People
Marko Mäkelä
Marko Mäkelä
Votes:
1Vote for this issue
Watchers:
2Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":1163.3999999761581,"ttfb":260.6999999284744,"pageVisibility":"visible","entityId":122294,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"ea0c42bb-6acf-4a12-b17a-f6145339f8d6","navigationType":0,"readyForUser":1255.8999999761581,"redirectCount":0,"resourceLoadedEnd":1397.2999999523163,"resourceLoadedStart":301.1999999284744,"resourceTiming":[{"duration":387.7000000476837,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":301.1999999284744,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":301.1999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":688.8999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":386.39999997615814,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":302.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":302.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":689.1999999284744,"responseStart":0,"secureConnectionStart":0},{"duration":394.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":303,"connectEnd":303,"connectStart":303,"domainLookupEnd":303,"domainLookupStart":303,"fetchStart":303,"redirectEnd":0,"redirectStart":0,"requestStart":303,"responseEnd":697.5,"responseStart":697.5,"secureConnectionStart":303},{"duration":431.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":303.7999999523163,"connectEnd":303.7999999523163,"connectStart":303.7999999523163,"domainLookupEnd":303.7999999523163,"domainLookupStart":303.7999999523163,"fetchStart":303.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":303.7999999523163,"responseEnd":735.0999999046326,"responseStart":735.0999999046326,"secureConnectionStart":303.7999999523163},{"duration":434.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":304,"connectEnd":304,"connectStart":304,"domainLookupEnd":304,"domainLookupStart":304,"fetchStart":304,"redirectEnd":0,"redirectStart":0,"requestStart":304,"responseEnd":738.8999999761581,"responseStart":738.8999999761581,"secureConnectionStart":304},{"duration":435.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":304.09999990463257,"connectEnd":304.09999990463257,"connectStart":304.09999990463257,"domainLookupEnd":304.09999990463257,"domainLookupStart":304.09999990463257,"fetchStart":304.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":304.09999990463257,"responseEnd":739.7999999523163,"responseStart":739.7999999523163,"secureConnectionStart":304.09999990463257},{"duration":436.1999999284744,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":304.39999997615814,"connectEnd":304.39999997615814,"connectStart":304.39999997615814,"domainLookupEnd":304.39999997615814,"domainLookupStart":304.39999997615814,"fetchStart":304.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":304.39999997615814,"responseEnd":740.5999999046326,"responseStart":740.5999999046326,"secureConnectionStart":304.39999997615814},{"duration":533.7999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":304.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":304.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":838.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":436.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":304.6999999284744,"connectEnd":304.6999999284744,"connectStart":304.6999999284744,"domainLookupEnd":304.6999999284744,"domainLookupStart":304.6999999284744,"fetchStart":304.6999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":304.6999999284744,"responseEnd":741.3999999761581,"responseStart":741.3999999761581,"secureConnectionStart":304.6999999284744},{"duration":533.7000000476837,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":304.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":304.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":838.5,"responseStart":0,"secureConnectionStart":0},{"duration":437.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":305,"connectEnd":305,"connectStart":305,"domainLookupEnd":305,"domainLookupStart":305,"fetchStart":305,"redirectEnd":0,"redirectStart":0,"requestStart":305,"responseEnd":742.2999999523163,"responseStart":742.2999999523163,"secureConnectionStart":305},{"duration":606.5999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":384.5,"connectEnd":384.5,"connectStart":384.5,"domainLookupEnd":384.5,"domainLookupStart":384.5,"fetchStart":384.5,"redirectEnd":0,"redirectStart":0,"requestStart":384.5,"responseEnd":991.0999999046326,"responseStart":991.0999999046326,"secureConnectionStart":384.5},{"duration":918.6000000238419,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":453.89999997615814,"connectEnd":453.89999997615814,"connectStart":453.89999997615814,"domainLookupEnd":453.89999997615814,"domainLookupStart":453.89999997615814,"fetchStart":453.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":453.89999997615814,"responseEnd":1372.5,"responseStart":1372.5,"secureConnectionStart":453.89999997615814},{"duration":149,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":850,"connectEnd":850,"connectStart":850,"domainLookupEnd":850,"domainLookupStart":850,"fetchStart":850,"redirectEnd":0,"redirectStart":0,"requestStart":850,"responseEnd":999,"responseStart":999,"secureConnectionStart":850},{"duration":278.39999997615814,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bu7/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":1118.8999999761581,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1118.8999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1397.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":270.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":1119.6999999284744,"connectEnd":1119.6999999284744,"connectStart":1119.6999999284744,"domainLookupEnd":1119.6999999284744,"domainLookupStart":1119.6999999284744,"fetchStart":1119.6999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":1119.6999999284744,"responseEnd":1389.8999999761581,"responseStart":1389.7999999523163,"secureConnectionStart":1119.6999999284744},{"duration":277,"initiatorType":"script","name":"https://jira.mariadb.org/s/f51ef5507eea4c158f257c66c93b2a3f-CDN/lu2bu7/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":1120.1999999284744,"connectEnd":1120.1999999284744,"connectStart":1120.1999999284744,"domainLookupEnd":1120.1999999284744,"domainLookupStart":1120.1999999284744,"fetchStart":1120.1999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":1120.1999999284744,"responseEnd":1397.1999999284744,"responseStart":1397.1999999284744,"secureConnectionStart":1120.1999999284744},{"duration":288.2000000476837,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1157.1999999284744,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1157.1999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1445.3999999761581,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":50,"responseStart":261,"responseEnd":454,"domLoading":264,"domInteractive":1446,"domContentLoadedEventStart":1446,"domContentLoadedEventEnd":1497,"domComplete":1883,"loadEventStart":1883,"loadEventEnd":1883,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1374.3999999761581},{"name":"bigPipe.sidebar-id.end","time":1375.1999999284744},{"name":"bigPipe.activity-panel-pipe-id.start","time":1375.3999999761581},{"name":"bigPipe.activity-panel-pipe-id.end","time":1379.3999999761581},{"name":"activityTabFullyLoaded","time":1512.8999999761581}],"measures":[],"correlationId":"1ab82fb4a24773","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":129,"dbReadsTimeInMs":22,"dbConnsTimeInMs":32,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Another failure with the above buggy patch:
CURRENT_TEST: innodb.recovery_memory
mysqltest: At line 50: query 'SHOW CREATE TABLE t1' failed: ER_UNKNOWN_STORAGE_ENGINE (1286): Unknown storage engine 'InnoDB'
…
2023-07-27 12:34:36 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=311491401
2023-07-27 12:34:36 0 [Note] InnoDB: End of log at LSN=315636465
2023-07-27 12:34:36 0 [Note] InnoDB: To recover: 279 pages
2023-07-27 12:34:36 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=239, page number=110]
2023-07-27 12:34:36 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
Hopefully this revised wait loop does the trick and ensures that no page writes are in progress while we sort the buf_pool.flush_list:
{
mysql_mutex_lock(&buf_pool.flush_list_mutex);
my_cond_wait(&buf_pool.done_flush_list,
&buf_pool.flush_list_mutex.m_mutex);
mysql_mutex_unlock(&buf_pool.flush_list_mutex);
}