[MDEV-25983] Upgrade of MariaDB 10.1 log crashes when encryption key is missing Created: 2021-06-22  Updated: 2021-06-22  Resolved: 2021-06-22

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6
Fix Version/s: 10.2.40, 10.3.31, 10.4.21, 10.5.12, 10.6.3

Type: Bug Priority: Minor
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Duplicate Votes: 0
Labels: upgrade

Issue Links:
Duplicate
is duplicated by MDEV-25982 Upgrade of MariaDB 10.1 log crashes w... Closed

 Description   

An incorrect attempt to start up MariaDB Server 10.2 or later with the dataset that is attached to MDEV-15464 would crash as follows:

mysqld --innodb-page-size=8k --datadir …/data

10.2 773a07b65517327add6348c045cee14bdf489fe0

2021-06-22  8:53:22 139829666023360 [ERROR] InnoDB: Obtaining redo log encryption key version 1 failed (4294967295). Maybe the key or the required encryption key management plugin was not found.
2021-06-22  8:53:22 139829666023360 [ERROR] InnoDB: Decrypting checkpoint failed
210622  8:53:22 [ERROR] mysqld got signal 11 ;

We would expect something like this instead:

2021-06-22  8:57:32 140541877659584 [ERROR] InnoDB: Obtaining redo log encryption key version 1 failed (4294967295). Maybe the key or the required encryption key management plugin was not found.
2021-06-22  8:57:32 140541877659584 [ERROR] InnoDB: Decrypting checkpoint failed
2021-06-22  8:57:32 140541877659584 [ERROR] InnoDB: Upgrade after a crash is not supported. This redo log was created before MariaDB 10.2.2, and it appears corrupted. Please follow the instructions at https://mariadb.com/kb/en/library/upgrading/
2021-06-22  8:57:32 140541877659584 [ERROR] InnoDB: Plugin initialization aborted at srv0start.cc[2209] with error Data structure corruption
2021-06-22  8:57:32 140541877659584 [Note] InnoDB: Starting shutdown...
2021-06-22  8:57:33 140541877659584 [ERROR] Plugin 'InnoDB' init function returned error.
2021-06-22  8:57:33 140541877659584 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-06-22  8:57:33 140541877659584 [Note] Plugin 'FEEDBACK' is disabled.
2021-06-22  8:57:33 140541877659584 [ERROR] Unknown/unsupported storage engine: InnoDB
2021-06-22  8:57:33 140541877659584 [ERROR] Aborting

Of course, if the encryption parameters were correctly specified, we would start up, like this:

2021-06-22  9:01:10 140716996093888 [Note] InnoDB: Highest supported file format is Barracuda.
2021-06-22  9:01:10 140716996093888 [Note] InnoDB: Upgrading redo log: 2*4294967296 bytes; LSN=21679480
2021-06-22  9:01:10 140716996093888 [Note] InnoDB: Starting to delete and rewrite log files.
2021-06-22  9:01:10 140716996093888 [Note] InnoDB: Setting log file ./ib_logfile101 size to 4294967296 bytes
2021-06-22  9:01:12 140716996093888 [Note] InnoDB: Setting log file ./ib_logfile1 size to 4294967296 bytes
2021-06-22  9:01:14 140716996093888 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2021-06-22  9:01:14 140716996093888 [Note] InnoDB: New log files created, LSN=21679480


Generated at Thu Feb 08 09:41:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.