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

Confusing error message when encryption is not available on recovery

    XMLWordPrintable

Details

    Description

      When attempting to recover an encrypted database with an incorrectly configured encryption plugin, fil_ibd_load() may return FIL_LOAD_INVALID to fil_name_process(), which will output confusing messages like this, while not mentioning the affected file name:

      2022-11-22  9:57:54 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=48561117,48561117
      2022-11-22  9:57:54 0 [Warning] InnoDB: We do not continue the crash recovery, because the table may become corrupt if we cannot apply the log records in the InnoDB log to it. To fix the problem and start mysqld:
      2022-11-22  9:57:54 0 [Note] InnoDB: 1) If there is a permission problem in the file and mysqld cannot open the file, you should modify the permissions.
      2022-11-22  9:57:54 0 [Note] InnoDB: 2) If the tablespace is not needed, or you can restore an older version from a backup, then you can remove the .ibd file, and use --innodb_force_recovery=1 to force startup without this file.
      2022-11-22  9:57:54 0 [Note] InnoDB: 3) If the file system or the disk is broken, and you cannot remove the .ibd file, you can set --innodb_force_recovery.
      2022-11-22  9:57:54 0 [ERROR] InnoDB: Plugin initialization aborted at srv0start.cc[1462] with error Generic error
      2022-11-22  9:57:54 0 [Note] InnoDB: Starting shutdown...
      

      This can be reproduced on 10.5, 10.6, 10.7 using the attached data.tar.xz and an incorrect invocation that fails to specify the full pathname of encryption_keys.txt:

      tar xJf data.tar.xz
      mariadbd --plugin-dir=$BUILD_DIR/plugin/file_key_management --plugin-load-add=file_key_management.so --file-key-management-filename=encryption_keys.txt --innodb_page_size=64K --innodb-buffer-pool-size=24M --datadir $(pwd)/data
      

      Attachments

        1. data.tar.xz
          5.99 MB
          Marko Mäkelä
        2. encryption_keys.txt
          0.4 kB
          Marko Mäkelä

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.