[MDEV-26795] InnoDB writes error messages about compressed tables upon startup Created: 2021-10-09  Updated: 2021-10-11  Resolved: 2021-10-11

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

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-12933 sort out the compression library chaos Closed
is caused by MDEV-26800 mysql.plugin violates plugin_type_ini... Open

 Description   

--source include/have_innodb.inc
 
INSTALL SONAME 'provider_lzo';
SET GLOBAL innodb_compression_algorithm= lzo;
CREATE TABLE t (a INT) ENGINE=InnoDB page_compressed=1;
INSERT INTO t VALUES (1),(2);
--source include/restart_mysqld.inc
 
--exec grep -i "failed to read" $MYSQLTEST_VARDIR/log/mysqld.1.err
SELECT * FROM t;
 
DROP TABLE t;

In the test case above, upon restart InnoDB writes "failed to read" error messages into the log:

2021-10-10  1:50:25 0 [ERROR] InnoDB: Background Page read failed to read or decrypt [page id: space=5, page number=1]
2021-10-10  1:50:25 0 [ERROR] InnoDB: Failed to read page 2 from file './test/t.ibd': Table is encrypted but decrypt failed.
2021-10-10  1:50:25 0 [ERROR] InnoDB: Failed to read page 3 from file './test/t.ibd': Table is encrypted but decrypt failed.

However, the table is readable.

The effect is not necessarily limited to MTR. These are the elements of the use case which I couldn't get rid of while reproducing outside MTR:

  • server had to be bootstrapped without InnoDB;
  • server had to be run with performance schema;
  • provider had to be installed into mysql.plugin rather than loaded via a startup option.

I'm not sure how important each factor is, possibly they just cause a "lucky" timing or sequence of events upon startup. But this way it happens to me nearly deterministically. In rare cases only the first error message is written.

The specific provider is not important.



 Comments   
Comment by Marko Mäkelä [ 2021-10-11 ]

Do those messages go away if you remove the buffer pool dump file (by default, ib_buffer_pool)? Errors during loading a buffer pool dump are being ignored.

In that case, the only bug here would be that the messages are misleadingly mentioning encryption, while the issue is compression.

Comment by Sergei Golubchik [ 2021-10-11 ]

Yes, they go away.

I'll rephrase the messages for now. The underlying reason for the warnings will be handled in MDEV-26800

Comment by Elena Stepanova [ 2021-10-11 ]

The usual common sense applies: if they are not real errors, or at least not the kind that the user can do anything about, they shouldn't probably be errors?
Or, we can advise somewhere not to use buffer dump/load in this case.

Comment by Sergei Golubchik [ 2021-10-11 ]

pushed into the preview branch

Comment by Sergei Golubchik [ 2021-10-11 ]

Now it's

2021-10-11 13:52:21 0 [Warning] mariadbd: MariaDB tried to use the LZ4 compression, but its provider plugin is not loaded
2021-10-11 13:52:21 0 [ERROR] InnoDB: Background Page read failed to read, uncompress, or decrypt [page id: space=5, page number=1]
2021-10-11 13:52:21 0 [ERROR] InnoDB: Failed to read page 2 from file './test/t1.ibd': Table is compressed or encrypted but uncompress or decrypt failed.
2021-10-11 13:52:21 0 [ERROR] InnoDB: Failed to read page 3 from file './test/t1.ibd': Table is compressed or encrypted but uncompress or decrypt failed.

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