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

Crash on IMPORT TABLESPACE of a ROW_FORMAT=COMPRESSED table

    XMLWordPrintable

Details

    Description

      The function fil_iterate() that implements ALTER TABLE…IMPORT TABLESPACE is passing a wrong parameter to fil_encrypt_buf() when ROW_FORMAT=COMPRESSED is used together with a KEY_BLOCK_SIZE that equals to innodb_page_size/1024 (that is, the logical page size is equal to the physical page size).
      This will result in a large amount of error messages like this, during the import operation:

      10.1 1d4e1d3263bf3b87b473c12d4876f368dc3450b6

      2018-06-07 10:19:36 140577841662720 [Note] InnoDB: Phase I - Update all pages
      2018-06-07 10:19:36 140577841662720 [Note] InnoDB: Sync to disk
      2018-06-07 10:19:36 140577841662720 [Note] InnoDB: Sync to disk - done!
      2018-06-07 10:19:36 140577841662720 [ERROR] InnoDB: The page [page id: space=6, page number=1] in file test/t3 cannot be decrypted.
      2018-06-07 10:19:36 140577841662720 [Note] InnoDB: However key management plugin or used key_version 1 is not found or used encryption algorithm or method does not match.
      2018-06-07 10:19:36 140577841662720 [Note] InnoDB: Marking tablespace as missing. You may drop this table or install correct key management plugin and key file.
      2018-06-07 10:19:36 140577841662720 [ERROR] InnoDB: The page [page id: space=6, page number=1] in file test/t3 cannot be decrypted.
      2018-06-07 10:19:36 140577841662720 [Note] InnoDB: However key management plugin or used key_version 1 is not found or used encryption algorithm or method does not match.
      2018-06-07 10:19:36 140577841662720 [Note] InnoDB: Marking tablespace as missing. You may drop this table or install correct key management plugin and key file.
      2018-06-07 10:19:36 7fdad450cb00  InnoDB: Assertion failure in thread 140577841662720 in file buf0buf.cc line 2893
      InnoDB: We intentionally generate a memory trap.
      

      The assertion failure that occurs is only present in a debug build. A non-debug build would likely crash due to buf_page_get_gen() having returned NULL after the decryption failure:

      #6  0x00007fdad6bde3c8 in buf_block_align (ptr=0x0) at /mariadb/10.1/storage/innobase/buf/buf0buf.cc:2893
      #7  0x00007fdad6d3200e in mtr_memo_contains_page (mtr=0x7fdad45097b0, ptr=0x0, type=2) at /mariadb/10.1/storage/innobase/mtr/mtr0mtr.cc:420
      #8  0x00007fdad6cf2dc1 in ibuf_bitmap_page_get_bits_low (page=0x0, page_no=2, zip_size=16384, latch_type=2, mtr=0x7fdad45097b0, bit=3) at /mariadb/10.1/storage/innobase/ibuf/ibuf0ibuf.cc:740
      #9  0x00007fdad6cfbc38 in ibuf_check_bitmap_on_import (trx=0x7fda8c0d4f98, space_id=6) at /mariadb/10.1/storage/innobase/ibuf/ibuf0ibuf.cc:5183
      #10 0x00007fdad6d8e39c in row_import_for_mysql (table=0x7fda8c0219e8, prebuilt=0x7fda8c0cc998) at /mariadb/10.1/storage/innobase/row/row0import.cc:4042
      

      Attachments

        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.