Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
10.6
An attempt to recover the attached data.tar.xz fails:
tar xJf data.tar.xz
mariadbd --innodb-page-size=32k --datadir "$(pwd)"/data
10.6 7e31a8e7fa97a87fc164381588d172bf0e76abb6
2023-04-20 16:23:44 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=14303353,21931175
2023-04-20 16:23:45 0 [ERROR] InnoDB: Recovery cannot access file ./cool_down/t5.ibd (tablespace 28)
2023-04-20 16:23:45 0 [Note] InnoDB: You may set innodb_force_recovery=1 to ignore this and possibly get a corrupted database.
2023-04-20 16:23:45 0 [ERROR] InnoDB: Plugin initialization aborted at srv0start.cc[1458] with error Generic error
2023-04-20 16:23:45 0 [Note] InnoDB: Starting shutdown...
2023-04-20 16:23:45 0 [ERROR] Plugin 'InnoDB' init function returned error.
A crude attempt at fixing this as follows caused a crash.
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc
index f79eb015673..0f614068afd 100644
--- a/storage/innobase/fil/fil0fil.cc
+++ b/storage/innobase/fil/fil0fil.cc
@@ -2496,23 +2496,16 @@ fil_ibd_load(
}
os_offset_t size;
- bool deferred_space = false;
/* Read and validate the first page of the tablespace.
Assign a tablespace name based on the tablespace type. */
switch (file.validate_for_recovery()) {
os_offset_t minimum_size;
case DB_SUCCESS:
- deferred_space = file.m_defer;
-
- if (deferred_space) {
- goto tablespace_check;
- }
-
- if (file.space_id() != space_id) {
+ if (!file.m_defer && file.space_id() != space_id) {
return(FIL_LOAD_ID_CHANGED);
}
-tablespace_check:
+
/* Get and test the file size. */
size = os_file_get_size(file.handle());
@@ -2528,9 +2521,7 @@ fil_ibd_load(
ib::error() << "Could not measure the size of"
" single-table tablespace file '"
<< file.filepath() << "'";
- } else if (deferred_space) {
- return FIL_LOAD_DEFER;
- } else if (size < minimum_size) {
+ } else if (!file.m_defer && size < minimum_size) {
ib::error() << "The size of tablespace file '"
<< file.filepath() << "' is only " << size
<< ", should be at least " << minimum_size
The problem is that the FIL_LOAD_DEFER return value causes InnoDB crash recovery to "think" that the file will be initialized by redo log records. The FIL_PAGE_LSN in page 0 of the file is 61,024,384, that is, after the checkpoint LSN 14,303,353. The first log record (a WRITE ) that recv_sys_t::recover_deferred() would see for the page carries start_lsn = 79742990 and lsn = 79743157 , which is even later. The deferred recovery fails because skip_read was not set for the recv_sys.pages entry.
In case the problem is actually on the 'write' side (which I doubt), you can access rr replay of the previously killed server as follows:
ssh sdp
rr replay /data1/results/1681982706/TBR-1080/1/rr/mysqld-1
It starts straight after bootstrap, at LSN 41114.
is caused by
MDEV-24626
Remove synchronous write of page0 and flushing file during file creation
Closed
{"report":{"fcp":1231,"ttfb":494,"pageVisibility":"visible","entityId":121248,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"487483de-13de-42fb-aa5e-06fc01b5571b","navigationType":0,"readyForUser":1321.8000001907349,"redirectCount":0,"resourceLoadedEnd":1824.6000003814697,"resourceLoadedStart":508.20000076293945,"resourceTiming":[{"duration":251.5999994277954,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":508.20000076293945,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":508.20000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":759.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":251.80000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":508.4000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":508.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":760.2000007629395,"responseStart":0,"secureConnectionStart":0},{"duration":260.6000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":508.6000003814697,"connectEnd":508.6000003814697,"connectStart":508.6000003814697,"domainLookupEnd":508.6000003814697,"domainLookupStart":508.6000003814697,"fetchStart":508.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":508.6000003814697,"responseEnd":769.2000007629395,"responseStart":769.2000007629395,"secureConnectionStart":508.6000003814697},{"duration":327.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":508.80000019073486,"connectEnd":508.80000019073486,"connectStart":508.80000019073486,"domainLookupEnd":508.80000019073486,"domainLookupStart":508.80000019073486,"fetchStart":508.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":508.80000019073486,"responseEnd":836.3000001907349,"responseStart":836.3000001907349,"secureConnectionStart":508.80000019073486},{"duration":331.30000019073486,"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":509.1000003814697,"connectEnd":509.1000003814697,"connectStart":509.1000003814697,"domainLookupEnd":509.1000003814697,"domainLookupStart":509.1000003814697,"fetchStart":509.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":509.1000003814697,"responseEnd":840.4000005722046,"responseStart":840.4000005722046,"secureConnectionStart":509.1000003814697},{"duration":331.69999980926514,"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":509.20000076293945,"connectEnd":509.20000076293945,"connectStart":509.20000076293945,"domainLookupEnd":509.20000076293945,"domainLookupStart":509.20000076293945,"fetchStart":509.20000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":509.20000076293945,"responseEnd":840.9000005722046,"responseStart":840.9000005722046,"secureConnectionStart":509.20000076293945},{"duration":331.80000019073486,"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":509.4000005722046,"connectEnd":509.4000005722046,"connectStart":509.4000005722046,"domainLookupEnd":509.4000005722046,"domainLookupStart":509.4000005722046,"fetchStart":509.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":509.4000005722046,"responseEnd":841.2000007629395,"responseStart":841.2000007629395,"secureConnectionStart":509.4000005722046},{"duration":403.5,"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":509.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":509.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":913,"responseStart":0,"secureConnectionStart":0},{"duration":332.29999923706055,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":509.70000076293945,"connectEnd":509.70000076293945,"connectStart":509.70000076293945,"domainLookupEnd":509.70000076293945,"domainLookupStart":509.70000076293945,"fetchStart":509.70000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":509.70000076293945,"responseEnd":842,"responseStart":842,"secureConnectionStart":509.70000076293945},{"duration":403.19999980926514,"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":509.9000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":509.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":913.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":332.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":510,"connectEnd":510,"connectStart":510,"domainLookupEnd":510,"domainLookupStart":510,"fetchStart":510,"redirectEnd":0,"redirectStart":0,"requestStart":510,"responseEnd":842.5,"responseStart":842.5,"secureConnectionStart":510},{"duration":1313.2000007629395,"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":511,"connectEnd":511,"connectStart":511,"domainLookupEnd":511,"domainLookupStart":511,"fetchStart":511,"redirectEnd":0,"redirectStart":0,"requestStart":511,"responseEnd":1824.2000007629395,"responseStart":1824.2000007629395,"secureConnectionStart":511},{"duration":1313.6000003814697,"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":511,"connectEnd":511,"connectStart":511,"domainLookupEnd":511,"domainLookupStart":511,"fetchStart":511,"redirectEnd":0,"redirectStart":0,"requestStart":511,"responseEnd":1824.6000003814697,"responseStart":1824.6000003814697,"secureConnectionStart":511},{"duration":445.30000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":925.6000003814697,"connectEnd":925.6000003814697,"connectStart":925.6000003814697,"domainLookupEnd":925.6000003814697,"domainLookupStart":925.6000003814697,"fetchStart":925.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":925.6000003814697,"responseEnd":1370.9000005722046,"responseStart":1370.9000005722046,"secureConnectionStart":925.6000003814697},{"duration":622.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1223.4000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1223.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1845.9000005722046,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":326,"responseStart":494,"responseEnd":496,"domLoading":497,"domInteractive":1848,"domContentLoadedEventStart":1848,"domContentLoadedEventEnd":1889,"domComplete":2840,"loadEventStart":2840,"loadEventEnd":2842,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1830.6000003814697},{"name":"bigPipe.sidebar-id.end","time":1831.4000005722046},{"name":"bigPipe.activity-panel-pipe-id.start","time":1831.6000003814697},{"name":"bigPipe.activity-panel-pipe-id.end","time":1833.9000005722046},{"name":"activityTabFullyLoaded","time":1897}],"measures":[],"correlationId":"327c2f1b1e6560","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":99,"dbReadsTimeInMs":10,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}