While executing the innodb.log_file_size_online test case, it fails with
CURRENT_TEST: innodb.log_file_size_online
mysqltest: At line 59: query 'SELECT * FROM t WHERE a<10' failed: ER_UNKNOWN_STORAGE_ENGINE (1286): Unknown storage engine 'InnoDB'
2024-12-05 16:19:56 0 [ERROR] InnoDB: OPT_PAGE_CHECKSUM mismatch on [page id: space=5, page number=345]
|
2024-12-05 16:19:56 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
|
2024-12-05 16:19:56 0 [Note] InnoDB: Set innodb_force_recovery=1 to ignore corrupted pages.
|
Debugged the test case failure, while startup fails with
Thread 2 hit Breakpoint 1, log_phys_t::page_checksum (block=...,
|
l=0x78eeebcf335f "\267H\251N")
|
at /home/thiru/source_file/server/10.11/storage/innobase/log/log0recv.cc:197
|
197 ib::error() << "OPT_PAGE_CHECKSUM mismatch on " << block.page.id();
|
(rr) f 2
|
p#2 0x000063c80564908d in recv_recover_page (block=0x78eee99011e0,
|
mtr=..., recs=..., space=0x63c807c73c68, init=0x0)
|
at /home/thiru/source_file/server/10.11/storage/innobase/log/log0recv.cc:3248
|
3248 log_phys_t::apply_status a= l->apply(*block, recs.last_offset);
|
(rr) p *l
|
$2 = {<log_rec_t> = {next = 0x78eeebcf3368, lsn = 7415422},
|
start_lsn = 7415393}
|
Checksum fails to match with page id is the following
(rr) p mach_read_from_4(l)
|
$1 = 3074992462
|
During recovery, these are the things to be noticed.
(rr) p checkpoint_lsn
|
$5 = 7294363
|
(rr) p end_lsn
|
$6 = 7415362
|
(rr) p first_lsn
|
$7 = 7292882
|
Let's visit before restart:
=====================
page_checksum calculated for page_id 21474836825 is 3074992462 during m_commit_lsn: 7323774
mtr::page_checksum calculated 7323774 for the page_id
|
(rr) p bpage.id_.m_id
|
$1 = 21474836825
|
(rr) p checksum
|
$2 = 3074992462
|
Thread 2 hit Hardware watchpoint 3: -location m_commit_lsn
|
Old value = 0
|
New value = 7323774
|
mtr_t::finish_writer<false, false> (mtr=0x7673079ff4e0, len=29)
|
at /home/thiru/source_file/server/10.11/storage/innobase/mtr/mtr0mtr.cc:1391
|
1391 return {start.first, log_close(mtr->m_commit_lsn)};
|
|
(rr) f 0
|
#0 log_t::append (
|
d=@0x7673079ff0b8: 0x76730c80348f "G\005\200ÙŽ\022\006",
|
s=0x7673079ff658, size=24)
|
at /home/thiru/source_file/server/10.11/storage/innobase/mtr/mtr0m
|
tr.cc:1308
|
(rr) x/24b d
|
0x76730c80348f: 0x47 0x05 0x80 0xd9 0x8e 0x12 0x06 0x00
|
0x76730c803497: 0xb2 0x00 0x80 0xc3 0x00 0x06 0x00 0x78
|
0x76730c80349f: 0x05 0x80 0xd9 0x00 0xb7 0x48 0xa9 0x4e
|
Above is the redo log written for checksum for the page
After that, InnoDB does flushes the log thrice. There are 3 log_t::write_buf() calls
At the end of the first log_t::write_buf()
(rr) p write_lsn
|
$2 = 7353588
|
checksum redo log was flushed to disk during first write_buf() call itself.
Note: Every write_buf() swaps resize_buf with resize_flush_buf
At the end of the 2nd log_t::write_buf():
(rr) p write_lsn
|
$4 = 7401982
|
let's have detailed look at the last log_t::write_buf():
At the start
|
|
(rr) p write_lsn
|
$16 = 7401982
|
(rr) p lsn
|
$17 = 7415393
|
Initially, length is 13455. We copy the last non-aligned
block to resize_flush_buf. Round off the length to 13824 (multiple of 512 bytes)
InnoDB writes the old resize_buffer garbage value to the log file for the remaining
349 bytes. Since InnoDb fails to mark the end of the log in resize_buf. During
recovery, InnoDB reads the old mtr record and fails.
|
(rr) x/24b resize_buf + 13455
|
0x76730420348f: 0x47 0x05 0x80 0xd9 0x8e 0x12 0x06 0x00
|
0x767304203497: 0xb2 0x00 0x80 0xc3 0x00 0x06 0x00 0x78
|
0x76730420349f: 0x05 0x80 0xd9 0x00 0xb7 0x48 0xa9 0x4e
|
|
Above bytes matches with mtr checksum value which was written during 7323774
{"report":{"fcp":787.7999999523163,"ttfb":194,"pageVisibility":"visible","entityId":131925,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"c455d67e-3bbb-4392-9dd0-29a63c2a8c15","navigationType":0,"readyForUser":867.7000000476837,"redirectCount":0,"resourceLoadedEnd":899,"resourceLoadedStart":199.59999990463257,"resourceTiming":[{"duration":123.10000014305115,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":199.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":199.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":322.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":122.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":199.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":199.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":322.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":131.89999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":200,"connectEnd":200,"connectStart":200,"domainLookupEnd":200,"domainLookupStart":200,"fetchStart":200,"redirectEnd":0,"redirectStart":0,"requestStart":200,"responseEnd":331.89999985694885,"responseStart":331.89999985694885,"secureConnectionStart":200},{"duration":208.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":200.09999990463257,"connectEnd":200.09999990463257,"connectStart":200.09999990463257,"domainLookupEnd":200.09999990463257,"domainLookupStart":200.09999990463257,"fetchStart":200.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":200.09999990463257,"responseEnd":408.59999990463257,"responseStart":408.59999990463257,"secureConnectionStart":200.09999990463257},{"duration":212,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":200.20000004768372,"connectEnd":200.20000004768372,"connectStart":200.20000004768372,"domainLookupEnd":200.20000004768372,"domainLookupStart":200.20000004768372,"fetchStart":200.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":200.20000004768372,"responseEnd":412.2000000476837,"responseStart":412.2000000476837,"secureConnectionStart":200.20000004768372},{"duration":212.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":200.29999995231628,"connectEnd":200.29999995231628,"connectStart":200.29999995231628,"domainLookupEnd":200.29999995231628,"domainLookupStart":200.29999995231628,"fetchStart":200.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":200.29999995231628,"responseEnd":412.7000000476837,"responseStart":412.59999990463257,"secureConnectionStart":200.29999995231628},{"duration":212.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":200.39999985694885,"connectEnd":200.39999985694885,"connectStart":200.39999985694885,"domainLookupEnd":200.39999985694885,"domainLookupStart":200.39999985694885,"fetchStart":200.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":200.39999985694885,"responseEnd":412.89999985694885,"responseStart":412.89999985694885,"secureConnectionStart":200.39999985694885},{"duration":212.89999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":200.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":200.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":413.39999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":212.79999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":200.59999990463257,"connectEnd":200.59999990463257,"connectStart":200.59999990463257,"domainLookupEnd":200.59999990463257,"domainLookupStart":200.59999990463257,"fetchStart":200.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":200.59999990463257,"responseEnd":413.39999985694885,"responseStart":413.39999985694885,"secureConnectionStart":200.59999990463257},{"duration":212.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":200.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":200.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":413.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":213,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":200.89999985694885,"connectEnd":200.89999985694885,"connectStart":200.89999985694885,"domainLookupEnd":200.89999985694885,"domainLookupStart":200.89999985694885,"fetchStart":200.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":200.89999985694885,"responseEnd":413.89999985694885,"responseStart":413.89999985694885,"secureConnectionStart":200.89999985694885},{"duration":479,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":201.59999990463257,"connectEnd":201.59999990463257,"connectStart":201.59999990463257,"domainLookupEnd":201.59999990463257,"domainLookupStart":201.59999990463257,"fetchStart":201.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":201.59999990463257,"responseEnd":680.5999999046326,"responseStart":680.5999999046326,"secureConnectionStart":201.59999990463257},{"duration":474.10000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":207.39999985694885,"connectEnd":207.39999985694885,"connectStart":207.39999985694885,"domainLookupEnd":207.39999985694885,"domainLookupStart":207.39999985694885,"fetchStart":207.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":207.39999985694885,"responseEnd":681.5,"responseStart":681.5,"secureConnectionStart":207.39999985694885},{"duration":116.80000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":542.3999998569489,"connectEnd":542.3999998569489,"connectStart":542.3999998569489,"domainLookupEnd":542.3999998569489,"domainLookupStart":542.3999998569489,"fetchStart":542.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":542.3999998569489,"responseEnd":659.2000000476837,"responseStart":659.2000000476837,"secureConnectionStart":542.3999998569489},{"duration":156.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bu7/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":734.0999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":734.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":890.5,"responseStart":0,"secureConnectionStart":0},{"duration":156.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/50bc9be5bfead1a25e72c1a9338c94f6-CDN/lu2bu7/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/css/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":734.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":734.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":890.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":155.89999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":735.2000000476837,"connectEnd":735.2000000476837,"connectStart":735.2000000476837,"domainLookupEnd":735.2000000476837,"domainLookupStart":735.2000000476837,"fetchStart":735.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":735.2000000476837,"responseEnd":891.0999999046326,"responseStart":891.0999999046326,"secureConnectionStart":735.2000000476837},{"duration":162.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/f51ef5507eea4c158f257c66c93b2a3f-CDN/lu2bu7/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/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.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":735.7000000476837,"connectEnd":735.7000000476837,"connectStart":735.7000000476837,"domainLookupEnd":735.7000000476837,"domainLookupStart":735.7000000476837,"fetchStart":735.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":735.7000000476837,"responseEnd":897.7999999523163,"responseStart":897.7999999523163,"secureConnectionStart":735.7000000476837},{"duration":163,"initiatorType":"script","name":"https://jira.mariadb.org/s/86ee9bbc76cd1bcd8556fcdcf46241c9-CDN/lu2bu7/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/js/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":736,"connectEnd":736,"connectStart":736,"domainLookupEnd":736,"domainLookupStart":736,"fetchStart":736,"redirectEnd":0,"redirectStart":0,"requestStart":736,"responseEnd":899,"responseStart":899,"secureConnectionStart":736},{"duration":158.39999985694885,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":766,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":766,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":924.3999998569489,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":19,"responseStart":193,"responseEnd":204,"domLoading":197,"domInteractive":979,"domContentLoadedEventStart":979,"domContentLoadedEventEnd":1027,"domComplete":1463,"loadEventStart":1463,"loadEventEnd":1465,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":914.2999999523163},{"name":"bigPipe.sidebar-id.end","time":915.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":915.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":921.5},{"name":"activityTabFullyLoaded","time":1049}],"measures":[],"correlationId":"283a277707569b","effectiveType":"4g","downlink":9.1,"rtt":0,"serverDuration":107,"dbReadsTimeInMs":22,"dbConnsTimeInMs":30,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Attached the correct iblogfile after fix will look like by doing
dd if=/dev/zero of=ib_logfile0 bs=1 count=1 conv=notrunc seek=134799