Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
10.4(EOL) , 10.5 , 10.6 , 10.11 , 11.0(EOL) , 11.1(EOL) , 11.2(EOL) , 11.3(EOL) , 11.4
mleich provided two rr replay traces where mariadb-backup --backup would fail as follows:
10.6 ec7db2bdf849fc1a5bad906764920edda4121bd6
2024-04-22 12:33:25 0 [ERROR] InnoDB: Checksum mismatch in the first page of file .//undo001
2024-04-22 12:33:25 0 [ERROR] InnoDB: Unable to read first page of file .//undo001
[00] 2024-04-22 12:33:25 merror: xb_load_tablespaces() failed with error Data structure corruption.
It is obvious that the copy of the page that was read is a mix of two versions, because the least significant 32 bits of log sequence numbers at the start and the end of the page differ:
0x000055cee647bbe4 595 if (crc32 != ut_crc32(read_buf,
(rr) display/i $pc
1: x/i $pc
=> 0x55cee647bbe4 <_Z21buf_page_is_corruptedbPKhm+620>: cmp %eax,%r13d
(rr) i reg eax
eax 0x3dc71f83 1036459907
(rr) i reg r13d
r13d 0xece2f286 -320671098
(rr) p/x read_buf[16]@8
$1 = {0x0, 0x0, 0x0, 0x0, 0x1, 0x29, 0xb3, 0x19}
(rr) p/x read_buf[srv_page_size-8]@8
$2 = {0x1, 0x1, 0x3, 0x2c, 0xec, 0xe2, 0xf2, 0x86}
(rr) bt
#0 0x000055cee647bbe4 in buf_page_is_corrupted (check_lsn=check_lsn@entry=false, read_buf=read_buf@entry=0x5c352ffe0000 "", fsp_flags=fsp_flags@entry=23)
at /data/Server/10.6B/storage/innobase/buf/buf0buf.cc:595
#1 0x000055cee672e0a4 in srv_undo_tablespace_open (create=create@entry=false, name=<optimized out>, name@entry=0x7fff9fd92ea0 ".//undo001", i=i@entry=0)
at /data/Server/10.6B/storage/innobase/srv/srv0start.cc:537
#2 0x000055cee6730322 in srv_all_undo_tablespaces_open (create_new_db=create_new_db@entry=false, n_undo=16) at /data/Server/10.6B/storage/innobase/srv/srv0start.cc:654
#3 0x000055cee6730c7e in srv_undo_tablespaces_init (create_new_db=create_new_db@entry=false) at /data/Server/10.6B/storage/innobase/srv/srv0start.cc:739
#4 0x000055cee5cf6f7f in xb_load_tablespaces () at /data/Server/10.6B/extra/mariabackup/xtrabackup.cc:4081
#5 0x000055cee5d030a7 in xtrabackup_backup_func () at /data/Server/10.6B/extra/mariabackup/xtrabackup.cc:4861
#6 0x000055cee5d03df5 in main_low (argv=0x55cee86d7650) at /data/Server/10.6B/extra/mariabackup/xtrabackup.cc:7156
We do have retry logic for most other page reads; see the calls to buf_page_is_corrupted in fil_cur.cc . For the TRX_SYS page in xb_assign_undo_space_start() there is special handling of 5 reread attempts.
Having to re-read pages in case they were concurrently written by the server that is being backed up is needed by the current design. A better design would be to have the server responsible for making backups (MDEV-14992 ). But, we need to fix this bug in GA releases, especially given that MDEV-29986 made multiple undo tablespaces the default.
relates to
MDEV-14992
BACKUP: in-server backup
Open
{"report":{"fcp":982.1000000238419,"ttfb":232.29999995231628,"pageVisibility":"visible","entityId":128882,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"d9d60b61-d608-46f7-b3b0-c8aafc74a9f0","navigationType":0,"readyForUser":1124.5,"redirectCount":0,"resourceLoadedEnd":661.5,"resourceLoadedStart":237.89999997615814,"resourceTiming":[{"duration":82.39999997615814,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":237.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":237.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":320.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":83,"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":238.10000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":238.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":321.10000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":291.10000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":238.39999997615814,"connectEnd":238.39999997615814,"connectStart":238.39999997615814,"domainLookupEnd":238.39999997615814,"domainLookupStart":238.39999997615814,"fetchStart":238.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":326.7000000476837,"responseEnd":529.5,"responseStart":345.2999999523163,"secureConnectionStart":238.39999997615814},{"duration":423.10000002384186,"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":238.39999997615814,"connectEnd":238.39999997615814,"connectStart":238.39999997615814,"domainLookupEnd":238.39999997615814,"domainLookupStart":238.39999997615814,"fetchStart":238.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":326.10000002384186,"responseEnd":661.5,"responseStart":344.7999999523163,"secureConnectionStart":238.39999997615814},{"duration":109.89999997615814,"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":238.70000004768372,"connectEnd":238.70000004768372,"connectStart":238.70000004768372,"domainLookupEnd":238.70000004768372,"domainLookupStart":238.70000004768372,"fetchStart":238.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":326.89999997615814,"responseEnd":348.60000002384186,"responseStart":346.89999997615814,"secureConnectionStart":238.70000004768372},{"duration":111.30000007152557,"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":238.79999995231628,"connectEnd":238.79999995231628,"connectStart":238.79999995231628,"domainLookupEnd":238.79999995231628,"domainLookupStart":238.79999995231628,"fetchStart":238.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":328,"responseEnd":350.10000002384186,"responseStart":348.89999997615814,"secureConnectionStart":238.79999995231628},{"duration":124.89999997615814,"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":239,"connectEnd":239,"connectStart":239,"domainLookupEnd":239,"domainLookupStart":239,"fetchStart":239,"redirectEnd":0,"redirectStart":0,"requestStart":334,"responseEnd":363.89999997615814,"responseStart":362.10000002384186,"secureConnectionStart":239},{"duration":92,"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":239.20000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":239.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":331.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":124.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":239.39999997615814,"connectEnd":239.39999997615814,"connectStart":239.39999997615814,"domainLookupEnd":239.39999997615814,"domainLookupStart":239.39999997615814,"fetchStart":239.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":334.10000002384186,"responseEnd":363.7999999523163,"responseStart":361.39999997615814,"secureConnectionStart":239.39999997615814},{"duration":92.89999997615814,"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":239.60000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":239.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":332.5,"responseStart":0,"secureConnectionStart":0},{"duration":117.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":239.79999995231628,"connectEnd":239.79999995231628,"connectStart":239.79999995231628,"domainLookupEnd":239.79999995231628,"domainLookupStart":239.79999995231628,"fetchStart":239.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":335.7999999523163,"responseEnd":357.2999999523163,"responseStart":356.2000000476837,"secureConnectionStart":239.79999995231628},{"duration":414,"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":245.29999995231628,"connectEnd":245.29999995231628,"connectStart":245.29999995231628,"domainLookupEnd":245.29999995231628,"domainLookupStart":245.29999995231628,"fetchStart":245.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":520.5,"responseEnd":659.2999999523163,"responseStart":651.7999999523163,"secureConnectionStart":245.29999995231628},{"duration":414.2000000476837,"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":245.39999997615814,"connectEnd":245.39999997615814,"connectStart":245.39999997615814,"domainLookupEnd":245.39999997615814,"domainLookupStart":245.39999997615814,"fetchStart":245.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":529.2000000476837,"responseEnd":659.6000000238419,"responseStart":652.5,"secureConnectionStart":245.39999997615814},{"duration":185.20000004768372,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":686.8999999761581,"connectEnd":686.8999999761581,"connectStart":686.8999999761581,"domainLookupEnd":686.8999999761581,"domainLookupStart":686.8999999761581,"fetchStart":686.8999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":821.5,"responseEnd":872.1000000238419,"responseStart":854.5,"secureConnectionStart":686.8999999761581}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":39,"responseStart":233,"responseEnd":242,"domLoading":236,"domInteractive":1300,"domContentLoadedEventStart":1300,"domContentLoadedEventEnd":1347,"domComplete":2186,"loadEventStart":2186,"loadEventEnd":2186,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1272.2000000476837},{"name":"bigPipe.sidebar-id.end","time":1272.8999999761581},{"name":"bigPipe.activity-panel-pipe-id.start","time":1273.1000000238419},{"name":"bigPipe.activity-panel-pipe-id.end","time":1273.8999999761581},{"name":"activityTabFullyLoaded","time":1359.1000000238419}],"measures":[],"correlationId":"bfb9da50b1820d","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":101,"dbReadsTimeInMs":17,"dbConnsTimeInMs":26,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
https://github.com/MariaDB/server/pull/3233