CentOS Linux release 7.9.2009 (Core)
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
Description
Details
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.
Step-by-Step Instructions
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):
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
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-15912 and MDEV-15464 will result in crashes.
Marko Mäkelä
added a comment - 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-15912 and MDEV-15464 will result in crashes.
The VERSION file in the source code repository (as well as the version number reported by the server) is only tentative. It turns out that there will be an unscheduled 10.3.30 release, which will exclude MDEV-15912. Thus, neither the 10.3.30 nor the 10.3.31 releases should be affected by this.
If upgrade from mariadb-10.3.29-datadir.tar.xz failed with MDEV-15912 before this fix, then that data directory must have been originally created with something earlier than the first GA release of MariaDB Server 10.3.
Marko Mäkelä
added a comment - The VERSION file in the source code repository (as well as the version number reported by the server) is only tentative. It turns out that there will be an unscheduled 10.3.30 release, which will exclude MDEV-15912 . Thus, neither the 10.3.30 nor the 10.3.31 releases should be affected by this.
I tested the upgrade locally from a freshly created 10.2 data directory in mysql-test/var/install.db , as well as the data directories from MDEV-15912 and MDEV-15464 , and your attached mysql-5.7.34-datadir.tar.xz and mariadb-10.3.29-datadir.tar.xz .
If upgrade from mariadb-10.3.29-datadir.tar.xz failed with MDEV-15912 before this fix, then that data directory must have been originally created with something earlier than the first GA release of MariaDB Server 10.3.
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.