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":966.5,"ttfb":196.09999999403954,"pageVisibility":"visible","entityId":108445,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"0d59ca8c-5488-4a33-a59c-5797e656f9c7","navigationType":0,"readyForUser":1040,"redirectCount":0,"resourceLoadedEnd":839.9000000059605,"resourceLoadedStart":200.59999999403954,"resourceTiming":[{"duration":308.6000000089407,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":200.59999999403954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":200.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":509.20000000298023,"responseStart":0,"secureConnectionStart":0},{"duration":308.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":201,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":201,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":509.40000000596046,"responseStart":0,"secureConnectionStart":0},{"duration":318.40000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":201.09999999403954,"connectEnd":201.09999999403954,"connectStart":201.09999999403954,"domainLookupEnd":201.09999999403954,"domainLookupStart":201.09999999403954,"fetchStart":201.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":201.09999999403954,"responseEnd":519.5,"responseStart":519.5,"secureConnectionStart":201.09999999403954},{"duration":377.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":201.20000000298023,"connectEnd":201.20000000298023,"connectStart":201.20000000298023,"domainLookupEnd":201.20000000298023,"domainLookupStart":201.20000000298023,"fetchStart":201.20000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":201.20000000298023,"responseEnd":578.2999999970198,"responseStart":578.2999999970198,"secureConnectionStart":201.20000000298023},{"duration":380.59999999403954,"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":201.40000000596046,"connectEnd":201.40000000596046,"connectStart":201.40000000596046,"domainLookupEnd":201.40000000596046,"domainLookupStart":201.40000000596046,"fetchStart":201.40000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":201.40000000596046,"responseEnd":582,"responseStart":582,"secureConnectionStart":201.40000000596046},{"duration":381,"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":201.59999999403954,"connectEnd":201.59999999403954,"connectStart":201.59999999403954,"domainLookupEnd":201.59999999403954,"domainLookupStart":201.59999999403954,"fetchStart":201.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":201.59999999403954,"responseEnd":582.5999999940395,"responseStart":582.5999999940395,"secureConnectionStart":201.59999999403954},{"duration":381.1000000089407,"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":201.79999999701977,"connectEnd":201.79999999701977,"connectStart":201.79999999701977,"domainLookupEnd":201.79999999701977,"domainLookupStart":201.79999999701977,"fetchStart":201.79999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":201.79999999701977,"responseEnd":582.9000000059605,"responseStart":582.9000000059605,"secureConnectionStart":201.79999999701977},{"duration":457.5,"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":202,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":202,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":659.5,"responseStart":0,"secureConnectionStart":0},{"duration":381.20000000298023,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":202.20000000298023,"connectEnd":202.20000000298023,"connectStart":202.20000000298023,"domainLookupEnd":202.20000000298023,"domainLookupStart":202.20000000298023,"fetchStart":202.20000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":202.20000000298023,"responseEnd":583.4000000059605,"responseStart":583.4000000059605,"secureConnectionStart":202.20000000298023},{"duration":457.19999998807907,"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":202.40000000596046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":202.40000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":659.5999999940395,"responseStart":0,"secureConnectionStart":0},{"duration":381.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":202.5,"connectEnd":202.5,"connectStart":202.5,"domainLookupEnd":202.5,"domainLookupStart":202.5,"fetchStart":202.5,"redirectEnd":0,"redirectStart":0,"requestStart":202.5,"responseEnd":583.9000000059605,"responseStart":583.9000000059605,"secureConnectionStart":202.5},{"duration":514.2000000029802,"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":207.79999999701977,"connectEnd":207.79999999701977,"connectStart":207.79999999701977,"domainLookupEnd":207.79999999701977,"domainLookupStart":207.79999999701977,"fetchStart":207.79999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":207.79999999701977,"responseEnd":722,"responseStart":722,"secureConnectionStart":207.79999999701977},{"duration":632,"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":207.90000000596046,"connectEnd":207.90000000596046,"connectStart":207.90000000596046,"domainLookupEnd":207.90000000596046,"domainLookupStart":207.90000000596046,"fetchStart":207.90000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":207.90000000596046,"responseEnd":839.9000000059605,"responseStart":839.9000000059605,"secureConnectionStart":207.90000000596046},{"duration":50.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":685.7000000029802,"connectEnd":685.7000000029802,"connectStart":685.7000000029802,"domainLookupEnd":685.7000000029802,"domainLookupStart":685.7000000029802,"fetchStart":685.7000000029802,"redirectEnd":0,"redirectStart":0,"requestStart":685.7000000029802,"responseEnd":736.2000000029802,"responseStart":736.2000000029802,"secureConnectionStart":685.7000000029802}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":18,"responseStart":196,"responseEnd":205,"domLoading":199,"domInteractive":1125,"domContentLoadedEventStart":1125,"domContentLoadedEventEnd":1166,"domComplete":2033,"loadEventStart":2033,"loadEventEnd":2034,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1108},{"name":"bigPipe.sidebar-id.end","time":1108.7999999970198},{"name":"bigPipe.activity-panel-pipe-id.start","time":1108.9000000059605},{"name":"bigPipe.activity-panel-pipe-id.end","time":1111.0999999940395},{"name":"activityTabFullyLoaded","time":1175.5}],"measures":[],"correlationId":"f83b9adf1fbd80","effectiveType":"4g","downlink":9.1,"rtt":0,"serverDuration":107,"dbReadsTimeInMs":9,"dbConnsTimeInMs":17,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}