This relates to MDEV-15912, which has some nightly rpms built but is not available in public repos yet.
The failures occur even with innodb_fast_shutdown disable (set to 0).
I have two sample datadirs which can be used to reproduce the issue – one from mysql 5.7 directly, and one which went from 5.7 -> 10.3.29.
Both of these datadirs fail to start with 10.3.30.
1. Start with a CentOS 7 server – this will be relevant for step 4 later.
2. Install MariaDB 10.3.29.
3. Extract the datadir from mariadb-10.3.29-datadir.tar.xz – start up MariaDB using this datadir and note that it runs without issues.
4. Update to 10.3.30 (not in yum repos yet, so installing via direct downloads):
yum -y install http://hasky.askmonty.org/archive/10.3/build-41050/kvm-rpm-centos74-amd64/rpms/MariaDB-client-10.3.30-1.el7.centos.x86_64.rpm http://hasky.askmonty.org/archive/10.3/build-41050/kvm-rpm-centos74-amd64/rpms/MariaDB-common-10.3.30-1.el7.centos.x86_64.rpm http://hasky.askmonty.org/archive/10.3/build-41050/kvm-rpm-centos74-amd64/rpms/MariaDB-compat-10.3.30-1.el7.centos.x86_64.rpm http://hasky.askmonty.org/archive/10.3/build-41050/kvm-rpm-centos74-amd64/rpms/MariaDB-server-10.3.30-1.el7.centos.x86_64.rpm
|
5. Observe failures:
[root@server ~]# systemctl status mariadb.service
|
● mariadb.service - MariaDB 10.3.30 database server
|
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
|
Drop-In: /etc/systemd/system/mariadb.service.d
|
└─migrated-from-my.cnf-settings.conf
|
Active: failed (Result: exit-code) since Mon 2021-06-21 23:56:01 UTC; 26s ago
|
Docs: man:mysqld(8)
|
https://mariadb.com/kb/en/library/systemd/
|
Process: 27604 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
|
Process: 27578 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
|
Process: 27576 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
|
Main PID: 27604 (code=exited, status=1/FAILURE)
|
Status: "MariaDB server is down"
|
|
Jun 21 23:56:00 server systemd[1]: Starting MariaDB 10.3.30 database server...
|
Jun 21 23:56:00 server mysqld[27604]: 2021-06-21 23:56:00 0 [Note] /usr/sbin/mysqld (mysqld 10.3.30-MariaDB) starting as process 27604 ...
|
Jun 21 23:56:01 server systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
|
Jun 21 23:56:01 server systemd[1]: Failed to start MariaDB 10.3.30 database server.
|
Jun 21 23:56:01 server systemd[1]: Unit mariadb.service entered failed state.
|
Jun 21 23:56:01 server systemd[1]: mariadb.service failed.
|
|
|
[root@server ~]# tail -n 30 /var/log/mysqld.log
|
...
|
2021-06-21 21:41:08 0 [Note] InnoDB: Completed initialization of buffer pool
|
2021-06-21 21:41:08 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
|
2021-06-21 21:41:08 0 [ERROR] InnoDB: upgrade from older version than MariaDB 10.3 requires clean shutdown
|
2021-06-21 21:41:08 0 [Note] InnoDB: Retry with innodb_force_recovery=5
|
2021-06-21 21:41:08 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
|
2021-06-21 21:41:09 0 [Note] InnoDB: Starting shutdown...
|
2021-06-21 21:41:09 0 [ERROR] Plugin 'InnoDB' init function returned error.
|
2021-06-21 21:41:09 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
|
2021-06-21 21:41:09 0 [Note] Plugin 'FEEDBACK' is disabled.
|
2021-06-21 21:41:09 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
|
2021-06-21 21:41:09 0 [ERROR] Unknown/unsupported storage engine: InnoDB
|
2021-06-21 21:41:09 0 [ERROR] Aborting
|
I would not expect a minor version update to suddenly fail with innodb errors that require "innodb_force_recovery=5".
Rolling back to 10.3.29 works and seems like the best option.
If an average end-user sees the suggestion in the log and tries "innodb_force_recovery=5" I think they'd be more likely to do harm than good.
{"report":{"fcp":881.7000000476837,"ttfb":323.5,"pageVisibility":"visible","entityId":100689,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"1015aa6e-c9c1-445a-afc6-ff94f3cb30ef","navigationType":0,"readyForUser":987.4000000357628,"redirectCount":0,"resourceLoadedEnd":1083.2000000476837,"resourceLoadedStart":329.10000002384186,"resourceTiming":[{"duration":68.60000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":329.10000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":329.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":397.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":68.59999996423721,"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":329.4000000357628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":329.4000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":398,"responseStart":0,"secureConnectionStart":0},{"duration":102,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":329.60000002384186,"connectEnd":329.60000002384186,"connectStart":329.60000002384186,"domainLookupEnd":329.60000002384186,"domainLookupStart":329.60000002384186,"fetchStart":329.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":329.60000002384186,"responseEnd":431.60000002384186,"responseStart":431.60000002384186,"secureConnectionStart":329.60000002384186},{"duration":187.4000000357628,"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":329.80000001192093,"connectEnd":329.80000001192093,"connectStart":329.80000001192093,"domainLookupEnd":329.80000001192093,"domainLookupStart":329.80000001192093,"fetchStart":329.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":329.80000001192093,"responseEnd":517.2000000476837,"responseStart":517.2000000476837,"secureConnectionStart":329.80000001192093},{"duration":191.20000004768372,"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":330,"connectEnd":330,"connectStart":330,"domainLookupEnd":330,"domainLookupStart":330,"fetchStart":330,"redirectEnd":0,"redirectStart":0,"requestStart":330,"responseEnd":521.2000000476837,"responseStart":521.2000000476837,"secureConnectionStart":330},{"duration":191.5,"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":330.2000000476837,"connectEnd":330.2000000476837,"connectStart":330.2000000476837,"domainLookupEnd":330.2000000476837,"domainLookupStart":330.2000000476837,"fetchStart":330.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":330.2000000476837,"responseEnd":521.7000000476837,"responseStart":521.7000000476837,"secureConnectionStart":330.2000000476837},{"duration":191.80000001192093,"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":330.30000001192093,"connectEnd":330.30000001192093,"connectStart":330.30000001192093,"domainLookupEnd":330.30000001192093,"domainLookupStart":330.30000001192093,"fetchStart":330.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":330.30000001192093,"responseEnd":522.1000000238419,"responseStart":522.1000000238419,"secureConnectionStart":330.30000001192093},{"duration":242.19999998807907,"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":330.60000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":330.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":572.8000000119209,"responseStart":0,"secureConnectionStart":0},{"duration":192.0999999642372,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":330.7000000476837,"connectEnd":330.7000000476837,"connectStart":330.7000000476837,"domainLookupEnd":330.7000000476837,"domainLookupStart":330.7000000476837,"fetchStart":330.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":330.7000000476837,"responseEnd":522.8000000119209,"responseStart":522.8000000119209,"secureConnectionStart":330.7000000476837},{"duration":242.0999999642372,"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":330.9000000357628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":330.9000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":573,"responseStart":0,"secureConnectionStart":0},{"duration":192.4000000357628,"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":331,"connectEnd":331,"connectStart":331,"domainLookupEnd":331,"domainLookupStart":331,"fetchStart":331,"redirectEnd":0,"redirectStart":0,"requestStart":331,"responseEnd":523.4000000357628,"responseStart":523.4000000357628,"secureConnectionStart":331},{"duration":506.30000001192093,"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":336.9000000357628,"connectEnd":336.9000000357628,"connectStart":336.9000000357628,"domainLookupEnd":336.9000000357628,"domainLookupStart":336.9000000357628,"fetchStart":336.9000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":336.9000000357628,"responseEnd":843.2000000476837,"responseStart":843.2000000476837,"secureConnectionStart":336.9000000357628},{"duration":585.3999999761581,"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":336.9000000357628,"connectEnd":336.9000000357628,"connectStart":336.9000000357628,"domainLookupEnd":336.9000000357628,"domainLookupStart":336.9000000357628,"fetchStart":336.9000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":336.9000000357628,"responseEnd":922.3000000119209,"responseStart":922.2000000476837,"secureConnectionStart":336.9000000357628},{"duration":262,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":584,"connectEnd":584,"connectStart":584,"domainLookupEnd":584,"domainLookupStart":584,"fetchStart":584,"redirectEnd":0,"redirectStart":0,"requestStart":584,"responseEnd":846,"responseStart":846,"secureConnectionStart":584},{"duration":226.79999995231628,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":874.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":874.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1101.5,"responseStart":0,"secureConnectionStart":0},{"duration":185.60000002384186,"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":897.6000000238419,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":897.6000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1083.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":163.60000002384186,"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":898.6000000238419,"connectEnd":898.6000000238419,"connectStart":898.6000000238419,"domainLookupEnd":898.6000000238419,"domainLookupStart":898.6000000238419,"fetchStart":898.6000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":898.6000000238419,"responseEnd":1062.2000000476837,"responseStart":1062.2000000476837,"secureConnectionStart":898.6000000238419},{"duration":169.60000002384186,"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":899.1000000238419,"connectEnd":899.1000000238419,"connectStart":899.1000000238419,"domainLookupEnd":899.1000000238419,"domainLookupStart":899.1000000238419,"fetchStart":899.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":899.1000000238419,"responseEnd":1068.7000000476837,"responseStart":1068.7000000476837,"secureConnectionStart":899.1000000238419}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":140,"responseStart":323,"responseEnd":330,"domLoading":326,"domInteractive":1113,"domContentLoadedEventStart":1113,"domContentLoadedEventEnd":1163,"domComplete":1772,"loadEventStart":1772,"loadEventEnd":1772,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1088.4000000357628},{"name":"bigPipe.sidebar-id.end","time":1089.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":1089.300000011921},{"name":"bigPipe.activity-panel-pipe-id.end","time":1090.4000000357628},{"name":"activityTabFullyLoaded","time":1194}],"measures":[],"correlationId":"f915ecc0fea799","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":115,"dbReadsTimeInMs":17,"dbConnsTimeInMs":26,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Thank you for filing this. I should have tested this better upfront. The problem also manifests itself as upgrade failures on our CI system, and I intended to work on this as the first thing today.
The necessary fix should be simple. We must allow the type code TRX_UNDO_INSERT=1 in TRX_UNDO_CACHED pages. The function trx_undo_reuse_cached() will reset the type code to 0.
I have pushed a fix to a staging branch, to see if the upgrade tests would now pass. The fix will need some further refinement, because the data directories attached to
MDEV-15912andMDEV-15464will result in crashes.