Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-26795

InnoDB writes error messages about compressed tables upon startup

Details

    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.

      Attachments

        Issue Links

          Activity

            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.

            marko Marko Mäkelä added a comment - 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.

            Yes, they go away.

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

            serg Sergei Golubchik added a comment - Yes, they go away. I'll rephrase the messages for now. The underlying reason for the warnings will be handled in MDEV-26800

            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.

            elenst Elena Stepanova added a comment - 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.

            pushed into the preview branch

            serg Sergei Golubchik added a comment - pushed into the preview branch

            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.
            

            serg Sergei Golubchik added a comment - 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.

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.