While trying to reproduce another recovery issue, I found some trouble with the following:
./mtr --mysqld=--loose-innodb-undo-tablespaces=3 --rr innodb.row_format_redundant
|
rr replay var/log/mysqld.1.rr/mariadbd-2
|
break sql_print_error
|
continue
|
We can see that InnoDB is trying to write to ibdata1 that it had opened in O_RDONLY mode:
bb-11.4-release 153225d4b31dfa5ca07c6e42a713e58864de0508
|
#0 sql_print_error (format=format@entry=0x56201a2d0fd1 "InnoDB: %s")
|
at /mariadb/11/sql/log.cc:9801
|
#1 0x000056201b208387 in ib::error::~error (this=this@entry=0x7ffeb3a42550,
|
__in_chrg=<optimized out>) at /usr/include/c++/14/bits/basic_string.h:227
|
#2 0x000056201b10aea2 in os_file_write_func (
|
type=@0x56201a43f260: {bpage = 0x0, slot = 0x0, node = 0x0, type = IORequest::WRITE_SYNC}, name=<optimized out>,
|
name@entry=0x56201ccc2150 "/dev/shm/11.2/mysql-test/var/tmp/row_format_redundant/ibdata1", file=file@entry=10, buf=buf@entry=0x7f1ec5c04000,
|
offset=<optimized out>, n=<optimized out>)
|
at /mariadb/11/storage/innobase/os/os0file.cc:2667
|
#3 0x000056201afd6a48 in buf_dblwr_t::init_or_load_pages (
|
this=0x56201bdc6a20 <buf_dblwr>, file={m_file = 10},
|
path=path@entry=0x56201ccc2150 "/dev/shm/11.2/mysql-test/var/tmp/row_format_redundant/ibdata1") at /mariadb/11/storage/innobase/buf/buf0dblwr.cc:329
|
#4 0x000056201b03edee in SysTablespace::read_lsn_and_check_flags (
|
this=this@entry=0x56201bdcaf00 <srv_sys_space>)
|
at /mariadb/11/storage/innobase/fsp/fsp0sysspace.cc:594
|
#5 0x000056201b03cbc5 in SysTablespace::open_or_create (
|
this=0x56201bdcaf00 <srv_sys_space>, is_temp=is_temp@entry=false,
|
create_new_db=create_new_db@entry=false,
|
sum_new_sizes=sum_new_sizes@entry=0x7ffeb3a42a48)
|
at /mariadb/11/storage/innobase/fsp/fsp0sysspace.cc:945
|
The following crude change fixes this issue:
diff --git a/storage/innobase/fsp/fsp0sysspace.cc b/storage/innobase/fsp/fsp0sysspace.cc
|
index be52e7e4743..92d45403916 100644
|
--- a/storage/innobase/fsp/fsp0sysspace.cc
|
+++ b/storage/innobase/fsp/fsp0sysspace.cc
|
@@ -521,7 +521,7 @@ SysTablespace::open_file(
|
|
case SRV_NOT_RAW:
|
err = file.open_or_create(
|
- !m_ignore_read_only && srv_read_only_mode);
|
+ false);
|
|
if (err != DB_SUCCESS) {
|
return(err);
|
But, another issue would then occur:
bb-11.4-release 153225d4b31dfa5ca07c6e42a713e58864de0508 with the crude 'fix'
|
innodb.row_format_redundant [ fail ] Found warnings/errors in server log file!
|
Test ended at 2024-05-20 16:40:07
|
line
|
2024-05-20 16:40:06 0 [ERROR] InnoDB: Failed to open the undo tablespace undo006
|
2024-05-20 16:40:06 0 [ERROR] InnoDB: Plugin initialization aborted at srv0start.cc[1620] with error Generic error
|
2024-05-20 16:40:07 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
|
^ Found warnings in /dev/shm/11.2/mysql-test/var/log/mysqld.1.err
|
This feels a bit strange, because nobody requested innodb_undo_tablespaces=6.
{"report":{"fcp":961.8000000715256,"ttfb":278.5,"pageVisibility":"visible","entityId":129201,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"d8aa19d5-8fca-419f-9cf5-9dd6e20b6453","navigationType":0,"readyForUser":1050,"redirectCount":0,"resourceLoadedEnd":688.8000000715256,"resourceLoadedStart":289.7000000476837,"resourceTiming":[{"duration":73.39999997615814,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":289.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":289.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":363.10000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":73.10000002384186,"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":290.3000000715256,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":290.3000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":363.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":282.8000000715256,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":290.60000002384186,"connectEnd":290.60000002384186,"connectStart":290.60000002384186,"domainLookupEnd":290.60000002384186,"domainLookupStart":290.60000002384186,"fetchStart":290.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":364,"responseEnd":573.4000000953674,"responseStart":380,"secureConnectionStart":290.60000002384186},{"duration":397,"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":291.8000000715256,"connectEnd":291.8000000715256,"connectStart":291.8000000715256,"domainLookupEnd":291.8000000715256,"domainLookupStart":291.8000000715256,"fetchStart":291.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":364.2000000476837,"responseEnd":688.8000000715256,"responseStart":382.5,"secureConnectionStart":291.8000000715256},{"duration":92.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":291.90000009536743,"connectEnd":291.90000009536743,"connectStart":291.90000009536743,"domainLookupEnd":291.90000009536743,"domainLookupStart":291.90000009536743,"fetchStart":291.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":365.40000009536743,"responseEnd":384.8000000715256,"responseStart":383,"secureConnectionStart":291.90000009536743},{"duration":105.10000002384186,"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":292.2000000476837,"connectEnd":292.2000000476837,"connectStart":292.2000000476837,"domainLookupEnd":292.2000000476837,"domainLookupStart":292.2000000476837,"fetchStart":292.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":365.5,"responseEnd":397.3000000715256,"responseStart":395.8000000715256,"secureConnectionStart":292.2000000476837},{"duration":94,"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":292.3000000715256,"connectEnd":292.3000000715256,"connectStart":292.3000000715256,"domainLookupEnd":292.3000000715256,"domainLookupStart":292.3000000715256,"fetchStart":292.3000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":366,"responseEnd":386.3000000715256,"responseStart":385.2000000476837,"secureConnectionStart":292.3000000715256},{"duration":72.70000004768372,"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":292.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":292.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":365.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":139.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":292.60000002384186,"connectEnd":292.60000002384186,"connectStart":292.60000002384186,"domainLookupEnd":292.60000002384186,"domainLookupStart":292.60000002384186,"fetchStart":292.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":369.60000002384186,"responseEnd":432.3000000715256,"responseStart":431.10000002384186,"secureConnectionStart":292.60000002384186},{"duration":72.70000004768372,"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":292.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":292.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":365.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":143,"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":292.90000009536743,"connectEnd":292.90000009536743,"connectStart":292.90000009536743,"domainLookupEnd":292.90000009536743,"domainLookupStart":292.90000009536743,"fetchStart":292.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":370.5,"responseEnd":435.90000009536743,"responseStart":434.3000000715256,"secureConnectionStart":292.90000009536743},{"duration":359.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":293.90000009536743,"connectEnd":293.90000009536743,"connectStart":293.90000009536743,"domainLookupEnd":293.90000009536743,"domainLookupStart":293.90000009536743,"fetchStart":293.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":596.2000000476837,"responseEnd":653.6000000238419,"responseStart":650.1000000238419,"secureConnectionStart":293.90000009536743},{"duration":359.3000000715256,"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":294.60000002384186,"connectEnd":294.60000002384186,"connectStart":294.60000002384186,"domainLookupEnd":294.60000002384186,"domainLookupStart":294.60000002384186,"fetchStart":294.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":596.3000000715256,"responseEnd":653.9000000953674,"responseStart":651.3000000715256,"secureConnectionStart":294.60000002384186},{"duration":246,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":713.4000000953674,"connectEnd":713.4000000953674,"connectStart":713.4000000953674,"domainLookupEnd":713.4000000953674,"domainLookupStart":713.4000000953674,"fetchStart":713.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":923.3000000715256,"responseEnd":959.4000000953674,"responseStart":958.4000000953674,"secureConnectionStart":713.4000000953674},{"duration":192.70000004768372,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":955.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":955.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1147.9000000953674,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":92,"responseStart":278,"responseEnd":290,"domLoading":282,"domInteractive":1168,"domContentLoadedEventStart":1168,"domContentLoadedEventEnd":1216,"domComplete":1722,"loadEventStart":1722,"loadEventEnd":1722,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1149.9000000953674},{"name":"bigPipe.sidebar-id.end","time":1150.6000000238419},{"name":"bigPipe.activity-panel-pipe-id.start","time":1150.8000000715256},{"name":"bigPipe.activity-panel-pipe-id.end","time":1151.6000000238419},{"name":"activityTabFullyLoaded","time":1234}],"measures":[],"correlationId":"d8f22b925b0763","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":101,"dbReadsTimeInMs":16,"dbConnsTimeInMs":25,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Thank you, this is OK to push. I filed
MDEV-34212for the error that I was actually trying to reproduce while encountering these.