Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-5541

Encryption algorithm error on query to information_schema.INNODB_CHANGED_PAGES

Details

    Description

      This is regarding the following functionality:

      https://www.percona.com/doc/percona-server/5.7/management/changed_page_tracking.html

       

      When we enable innodb_track_changed_pages, we see the following error messages after some writes:

      2019-04-01T23:03:54.355418Z 2 [ERROR] InnoDB: Encryption algorithm support missing: N
      2019-04-01T23:03:54.356065Z 2 [ERROR] InnoDB: Encryption algorithm support missing: N 

       

      The attached files can be run in an environment where dbdeployer is available, to reproduce it 100% of the times). Run them in the following way (they should be in the ~/sandboxes/  directory):

      shell> bash track_changed_pages.sh track_changed_pages_int.sql
      shell> bash track_changed_pages.sh track_changed_pages_uuid.sql 

      The innodb_max_bitmap_file_size doesn't seem to be relevant to the amount of times we see the errors shown above.

       

      While checking this deeper, I noted the following.

       

      After checking the source code, I noted this error is only printed in storage/innobase/os/os0file.cc​:

       

      agustin@bm-support01 /opt/percona_server/src/5.7.24-26 $ grep "Encryption algo"  storage/innobase/os/os0file.cc
            << "Encryption algorithm support missing: "
          << "Encryption algorithm support missing: "
            fprintf(stderr, "Encryption algorithm support missing: %s\n", 

      In particular in the Encryption::decrypt_log_block()​ and Encryption::decrypt()​ functions.

      I attached gdb to the running sandbox process, set breakpoints on these functions, and run the query again, and got the following results:

      (gdb) b Encryption::decrypt_log_block
      
      Breakpoint 1 at 0x10645e0: file /mnt/workspace/percona-server-5.7-binaries-release-rocks-new/label_exp/min-centos-6-x64/test/percona-server-5.7.24-26/storage/innobase/os/os0file.cc, line 10553.
      (gdb) b Encryption::decrypt
      
      Breakpoint 2 at 0x1064b00: file /mnt/workspace/percona-server-5.7-binaries-release-rocks-new/label_exp/min-centos-6-x64/test/percona-server-5.7.24-26/storage/innobase/os/os0file.cc, line 10731.
      (gdb) c
      Continuing.
      [Switching to Thread 0x7f8c31e25700 (LWP 35976)]
      
      
      Breakpoint 1, Encryption::decrypt_log_block (this=this@entry=0x7f8c31e215d0, type=...,
      
          src=src@entry=0x7f8818c4c218 '�' <repeats 135 times>, "\037", dst=dst@entry=0x7f8c26f3a018 "")
          at /mnt/workspace/percona-server-5.7-binaries-release-rocks-new/label_exp/min-centos-6-x64/test/percona-server-5.7.24-26/
      storage/innobase/os/os0file.cc:10553
      
      10553    /mnt/workspace/percona-server-5.7-binaries-release-rocks-new/label_exp/min-centos-6-x64/test/percona-server-5.7.24-26/storage/innobase/os/os0file.cc: No such file or directory.
      (gdb) p m_type
       
      $1 = Encryption::NONE 

      This is triggering the following codepath:

      10542 /** Decrypt the log block.
      10543 @param[in]      type            IORequest
      10544 @param[in,out]  src            Data read from disk, decrypted data will be
      10545                                copied to this page
      10546 @param[in,out]  dst            Scratch area to use for decryption
      10547 @return DB_SUCCESS or error code */
      10548 dberr_t
      10549 Encryption::decrypt_log_block(
      10550        const IORequest&        type,
      10551        byte*                  src,
      10552        byte*                  dst)
      10553 {
      ...
      10561        switch (m_type) {
      10562        case Encryption::AES: {
      ...
      10621        default:
      10622                ib::error()
      10623                        << "Encryption algorithm support missing: "
      10624                        << Encryption::to_string(m_type);
      10625                return(DB_UNSUPPORTED);
      10626        }
      ... 

      As we can see there, it only supports the AES encryption, but these pages have NONE​, making the thread fail with that error. The "N" we see in the error log is due to this ("NONE").

      All these outputs are for version 5.7.24. I run the tests on 5.7.25, too, and it's still reproducible.

      This is the farthest I could go here  After this I'm a bit lost. I hope this is enough to help get more insight into these issues.

      Attachments

        Activity

          People

            zsolt.parragi Zsolt Parragi
            agustin.gallego Agustín Gallego
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 4 days, 5 hours
                4d 5h

                Smart Checklist