[MDEV-12115] install_db shows corruption for rest encryption and 'strict' configuration for innodb_log_checksum_algorithm Created: 2017-02-23  Updated: 2023-04-12  Resolved: 2023-04-11

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.1.22
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Andrii Nikitin (Inactive) Assignee: Jan Lindström (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None

Attachments: File error-strict_crc32.log     File error-strict_innodb.log    

 Description   

When trying to install database with rest encryption and 'strict' values for innodb_log_checksum_algorithm (e.g. innodb_log_checksum_algorithm=strict_innodb), following errors are shown:

2017-02-23 12:40:41 139936000474048 [ERROR] InnoDB: log block checksum mismatch: expected 1275863229, calculated checksum 128658407
2017-02-23 12:40:41 139936000474048 [ERROR] InnoDB: STRICT method was specified for innodb_log_checksum, so we intentionally assert here.
2017-02-23 12:40:41 7f4563997bc0 InnoDB: Assertion failure in thread 139936000474048 in file ha_innodb.cc line 22038

No problem happens for the same config without rest encryption.



 Comments   
Comment by Marko Mäkelä [ 2017-02-23 ]

This seems to be a logic bug in the 10.1 innodb_encrypt_log implementation.
In 10.2, MDEV-11782 will treat a corrupted redo log block as if the redo log ended at that point. Basically, we assume that the server was killed in the middle of a redo log block write, which might very well be the issue here.

Comment by Marko Mäkelä [ 2017-02-23 ]

A possible cause here is that bootstrap was performed with an incompatible log checksum algorithm or with mismatching --innodb-encrypt-log parameter. In that case, I think that 10.1 recovery should basically ignore the redo log, because it looks corrupted. There should definitely be no assertion failure, and no correctness problem if the bootstrap did a normal shutdown.
In 10.2 with MDEV-11782, encrypted redo log would always use CRC-32C. For 10.2 with --skip-innodb-encrypt-log, the checksums can be disabled.

Comment by Jan Lindström [ 2023-04-11 ]

10.1 is EOL.

Generated at Thu Feb 08 07:55:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.