Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
10.6 , 10.7(EOL) , 10.8(EOL) , 10.9(EOL) , 10.10(EOL) , 10.11 , 11.0(EOL) , 11.1(EOL)
While repeatedly running the test innodb.alter_copy to test MDEV-29911 , I reproduced an assertion failure in fil_validate() . To make it more likely, apply this patch:
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc
index 365bb11c38f..a00709dab01 100644
--- a/storage/innobase/fil/fil0fil.cc
+++ b/storage/innobase/fil/fil0fil.cc
@@ -200,6 +200,8 @@ fil_system_t fil_system;
extern uint srv_fil_crypt_rotate_key_age;
#ifdef UNIV_DEBUG
+#define fil_validate_skip fil_validate
+#if 0
/** Try fil_validate() every this many times */
# define FIL_VALIDATE_SKIP 17
@@ -218,6 +220,7 @@ fil_validate_skip(void)
check in debug builds. */
return (fil_validate_count++ % FIL_VALIDATE_SKIP) || fil_validate();
}
+#endif
#endif /* UNIV_DEBUG */
/** Look up a tablespace.
I reproduced two rr replay traces that would be fixed by the following:
@@ -1140,8 +1144,10 @@ fil_space_t *recv_sys_t::recover_deferred(const recv_sys_t::map::iterator &p,
uint32_t(file_size / fil_space_t::physical_size(flags));
if (n_pages > size)
{
+ mysql_mutex_lock(&fil_system.mutex);
space->size= node->size= n_pages;
space->set_committed_size();
+ mysql_mutex_unlock(&fil_system.mutex);
goto size_set;
}
}
But, there is more to it. I think that it is best to continuously hold fil_system.mutex around the deferred tablespace creation, or in general, around the creation of a tablespace and adding the first (only) data file to it. With these fixes, the test innodb.alter_copy is stable in the 10.8 branch also after applying the MDEV-29911 changes.
I suspect that these changes should also fix the ut_a(fil_system.n_open == n_open) assertion failures in fil_validate() that have been observed starting with 10.6, occasionally when running the test innodb.table_definition_cache_debug .
blocks
MDEV-29911
InnoDB recovery and mariadb-backup --prepare fail to report detailed progress
Closed
{"report":{"fcp":1798.0999999046326,"ttfb":235.89999997615814,"pageVisibility":"visible","entityId":121194,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"34ec472d-f3d9-4d54-8b0d-c859185e9778","navigationType":0,"readyForUser":1882.3999999761581,"redirectCount":0,"resourceLoadedEnd":2466.7999999523163,"resourceLoadedStart":268.7999999523163,"resourceTiming":[{"duration":617.2999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":268.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":268.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":886.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":617.3999999761581,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":269,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":269,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":886.3999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":679.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":269.1999999284744,"connectEnd":269.1999999284744,"connectStart":269.1999999284744,"domainLookupEnd":269.1999999284744,"domainLookupStart":269.1999999284744,"fetchStart":269.1999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":269.1999999284744,"responseEnd":948.3999999761581,"responseStart":948.3999999761581,"secureConnectionStart":269.1999999284744},{"duration":781.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":269.39999997615814,"connectEnd":269.39999997615814,"connectStart":269.39999997615814,"domainLookupEnd":269.39999997615814,"domainLookupStart":269.39999997615814,"fetchStart":269.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":269.39999997615814,"responseEnd":1050.8999999761581,"responseStart":1050.8999999761581,"secureConnectionStart":269.39999997615814},{"duration":792.4000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":269.59999990463257,"connectEnd":269.59999990463257,"connectStart":269.59999990463257,"domainLookupEnd":269.59999990463257,"domainLookupStart":269.59999990463257,"fetchStart":269.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":269.59999990463257,"responseEnd":1062,"responseStart":1062,"secureConnectionStart":269.59999990463257},{"duration":792.6000000238419,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":269.7999999523163,"connectEnd":269.7999999523163,"connectStart":269.7999999523163,"domainLookupEnd":269.7999999523163,"domainLookupStart":269.7999999523163,"fetchStart":269.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":269.7999999523163,"responseEnd":1062.3999999761581,"responseStart":1062.3999999761581,"secureConnectionStart":269.7999999523163},{"duration":793.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":270,"connectEnd":270,"connectStart":270,"domainLookupEnd":270,"domainLookupStart":270,"fetchStart":270,"redirectEnd":0,"redirectStart":0,"requestStart":270,"responseEnd":1063.0999999046326,"responseStart":1063.0999999046326,"secureConnectionStart":270},{"duration":1154.8000000715256,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":270.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":270.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1424.8999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":793.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":270.2999999523163,"connectEnd":270.2999999523163,"connectStart":270.2999999523163,"domainLookupEnd":270.2999999523163,"domainLookupStart":270.2999999523163,"fetchStart":270.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":270.2999999523163,"responseEnd":1063.5999999046326,"responseStart":1063.5999999046326,"secureConnectionStart":270.2999999523163},{"duration":1154.6999999284744,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/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":270.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":270.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1425.1999999284744,"responseStart":0,"secureConnectionStart":0},{"duration":793.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/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":270.6999999284744,"connectEnd":270.6999999284744,"connectStart":270.6999999284744,"domainLookupEnd":270.6999999284744,"domainLookupStart":270.6999999284744,"fetchStart":270.6999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":270.6999999284744,"responseEnd":1064.1999999284744,"responseStart":1064.1999999284744,"secureConnectionStart":270.6999999284744},{"duration":1822.6999999284744,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":274,"connectEnd":274,"connectStart":274,"domainLookupEnd":274,"domainLookupStart":274,"fetchStart":274,"redirectEnd":0,"redirectStart":0,"requestStart":274,"responseEnd":2096.6999999284744,"responseStart":2096.6999999284744,"secureConnectionStart":274},{"duration":2192.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":274,"connectEnd":274,"connectStart":274,"domainLookupEnd":274,"domainLookupStart":274,"fetchStart":274,"redirectEnd":0,"redirectStart":0,"requestStart":274,"responseEnd":2466.7999999523163,"responseStart":2466.7999999523163,"secureConnectionStart":274},{"duration":791.3000000715256,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1458.6999999284744,"connectEnd":1458.6999999284744,"connectStart":1458.6999999284744,"domainLookupEnd":1458.6999999284744,"domainLookupStart":1458.6999999284744,"fetchStart":1458.6999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":1458.6999999284744,"responseEnd":2250,"responseStart":2250,"secureConnectionStart":1458.6999999284744},{"duration":743,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1791.6999999284744,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1791.6999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2534.6999999284744,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":69,"responseStart":236,"responseEnd":264,"domLoading":267,"domInteractive":2488,"domContentLoadedEventStart":2488,"domContentLoadedEventEnd":2535,"domComplete":5091,"loadEventStart":5091,"loadEventEnd":5094,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2468.899999976158},{"name":"bigPipe.sidebar-id.end","time":2469.6999999284744},{"name":"bigPipe.activity-panel-pipe-id.start","time":2469.7999999523163},{"name":"bigPipe.activity-panel-pipe-id.end","time":2472.2999999523163},{"name":"activityTabFullyLoaded","time":2542.2999999523163}],"measures":[],"correlationId":"3e7b0775a12a59","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":95,"dbReadsTimeInMs":12,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}