The log resizing test occasionally fails like this:
10.8 972b45642afee364cd140f17ae46c00cd0af6e11
|
innodb.log_file_size '4k,innodb' w5 [ fail ]
|
…
|
2022-02-14 17:45:38 0 [Note] InnoDB: Starting final batch to recover 4 pages from redo log.
|
2022-02-14 17:45:38 0 [Note] InnoDB: Resizing redo log from 12.000MiB to 5.000MiB; LSN=24674766
|
mariadbd: /home/buildbot/maria-slave/fulltest-debug-big-only/build/storage/innobase/srv/srv0start.cc:852: lsn_t srv_prepare_to_delete_redo_log_file(): Assertion `!buf_pool.any_io_pending()' failed.
|
I was able to reproduce this failure locally by running this test 120 times in parallel with itself (3 times the number of hardware threads reported by nproc).
In the core dump, the assertion would have held. Therefore, it looks like we must actually protect the reads in this debug assertion with buf_pool.mutex in order to avoid false alarms. With the following patch, I am not able to reproduce any crash. The function is only being called by debug assertions (which are not present in release builds).
diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h
|
index 89987b05fdb..fec8dcb4e2a 100644
|
--- a/storage/innobase/include/buf0buf.h
|
+++ b/storage/innobase/include/buf0buf.h
|
@@ -2042,9 +2042,14 @@ class buf_pool_t
|
buf_tmp_buffer_t *io_buf_reserve() { return io_buf.reserve(); }
|
|
/** @return whether any I/O is pending */
|
- bool any_io_pending() const
|
+ bool any_io_pending()
|
{
|
- return n_pend_reads || n_flush_LRU() || n_flush_list();
|
+ if (n_pend_reads)
|
+ return true;
|
+ mysql_mutex_lock(&mutex);
|
+ const bool any_pending{n_flush_LRU_ || n_flush_list_};
|
+ mysql_mutex_unlock(&mutex);
|
+ return any_pending;
|
}
|
/** @return total amount of pending I/O */
|
ulint io_pending() const
|
{"report":{"fcp":959.5,"ttfb":180.19999998807907,"pageVisibility":"visible","entityId":108445,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"5ce008d1-7197-4721-9581-151b1189a3c8","navigationType":0,"readyForUser":1037.0999999940395,"redirectCount":0,"resourceLoadedEnd":916.5,"resourceLoadedStart":185.39999997615814,"resourceTiming":[{"duration":313.30000001192093,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":185.39999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":185.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":498.69999998807907,"responseStart":0,"secureConnectionStart":0},{"duration":313.40000000596046,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":185.69999998807907,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":185.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":499.09999999403954,"responseStart":0,"secureConnectionStart":0},{"duration":322.2000000178814,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":185.89999997615814,"connectEnd":185.89999997615814,"connectStart":185.89999997615814,"domainLookupEnd":185.89999997615814,"domainLookupStart":185.89999997615814,"fetchStart":185.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":185.89999997615814,"responseEnd":508.09999999403954,"responseStart":508.09999999403954,"secureConnectionStart":185.89999997615814},{"duration":353.09999999403954,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":186.09999999403954,"connectEnd":186.09999999403954,"connectStart":186.09999999403954,"domainLookupEnd":186.09999999403954,"domainLookupStart":186.09999999403954,"fetchStart":186.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":186.09999999403954,"responseEnd":539.1999999880791,"responseStart":539.1999999880791,"secureConnectionStart":186.09999999403954},{"duration":356.40000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":186.39999997615814,"connectEnd":186.39999997615814,"connectStart":186.39999997615814,"domainLookupEnd":186.39999997615814,"domainLookupStart":186.39999997615814,"fetchStart":186.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":186.39999997615814,"responseEnd":542.7999999821186,"responseStart":542.7999999821186,"secureConnectionStart":186.39999997615814},{"duration":356.7999999821186,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":186.5,"connectEnd":186.5,"connectStart":186.5,"domainLookupEnd":186.5,"domainLookupStart":186.5,"fetchStart":186.5,"redirectEnd":0,"redirectStart":0,"requestStart":186.5,"responseEnd":543.2999999821186,"responseStart":543.2999999821186,"secureConnectionStart":186.5},{"duration":356.90000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":186.69999998807907,"connectEnd":186.69999998807907,"connectStart":186.69999998807907,"domainLookupEnd":186.69999998807907,"domainLookupStart":186.69999998807907,"fetchStart":186.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":186.69999998807907,"responseEnd":543.5999999940395,"responseStart":543.5999999940395,"secureConnectionStart":186.69999998807907},{"duration":463.7000000178814,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":186.7999999821186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":186.7999999821186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":650.5,"responseStart":0,"secureConnectionStart":0},{"duration":357.09999999403954,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":187,"connectEnd":187,"connectStart":187,"domainLookupEnd":187,"domainLookupStart":187,"fetchStart":187,"redirectEnd":0,"redirectStart":0,"requestStart":187,"responseEnd":544.0999999940395,"responseStart":544.0999999940395,"secureConnectionStart":187},{"duration":463.40000000596046,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/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":187.19999998807907,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":187.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":650.5999999940395,"responseStart":0,"secureConnectionStart":0},{"duration":357.40000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/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":187.2999999821186,"connectEnd":187.2999999821186,"connectStart":187.2999999821186,"domainLookupEnd":187.2999999821186,"domainLookupStart":187.2999999821186,"fetchStart":187.2999999821186,"redirectEnd":0,"redirectStart":0,"requestStart":187.2999999821186,"responseEnd":544.6999999880791,"responseStart":544.6999999880791,"secureConnectionStart":187.2999999821186},{"duration":515.9000000059605,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":188.09999999403954,"connectEnd":188.09999999403954,"connectStart":188.09999999403954,"domainLookupEnd":188.09999999403954,"domainLookupStart":188.09999999403954,"fetchStart":188.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":188.09999999403954,"responseEnd":704,"responseStart":704,"secureConnectionStart":188.09999999403954},{"duration":571.1999999880791,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":188.09999999403954,"connectEnd":188.09999999403954,"connectStart":188.09999999403954,"domainLookupEnd":188.09999999403954,"domainLookupStart":188.09999999403954,"fetchStart":188.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":188.09999999403954,"responseEnd":759.2999999821186,"responseStart":759.2999999821186,"secureConnectionStart":188.09999999403954},{"duration":43.099999994039536,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":662,"connectEnd":662,"connectStart":662,"domainLookupEnd":662,"domainLookupStart":662,"fetchStart":662,"redirectEnd":0,"redirectStart":0,"requestStart":662,"responseEnd":705.0999999940395,"responseStart":705.0999999940395,"secureConnectionStart":662},{"duration":208.2000000178814,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bv2/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":708.2999999821186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":708.2999999821186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":916.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":3,"responseStart":180,"responseEnd":181,"domLoading":183,"domInteractive":1091,"domContentLoadedEventStart":1091,"domContentLoadedEventEnd":1135,"domComplete":1648,"loadEventStart":1649,"loadEventEnd":1649,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1072.5},{"name":"bigPipe.sidebar-id.end","time":1073.199999988079},{"name":"bigPipe.activity-panel-pipe-id.start","time":1073.3999999761581},{"name":"bigPipe.activity-panel-pipe-id.end","time":1074.699999988079},{"name":"activityTabFullyLoaded","time":1186.5999999940395}],"measures":[],"correlationId":"cd07aa20026155","effectiveType":"4g","downlink":9,"rtt":0,"serverDuration":110,"dbReadsTimeInMs":11,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Here is the result of my local testing:
10.5 a710016d578dc1165c511db19a5d4a094e736012
…
innodb.log_file_size '4k,innodb' w15 [ 100 pass ] 31791
innodb.log_file_size '4k,innodb' w37 [ 100 pass ] 31869
innodb.log_file_size '4k,innodb' w59 [ 100 pass ] 32189
--------------------------------------------------------------------------
The servers were restarted 0 times
Spent 409184.409 of 3497 seconds executing testcases
Completed: All 12000 tests were successful.