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

Set crypt_data based on the destination table encryption status

    XMLWordPrintable

    Details

      Description

      While testing PS-8.0.21 release branch, I found a crash which looks like a regression. The crash is not seen prior to merge. Also, the assertion code does not exist on upstream.

      The crash is seen with non-partition tables without the encryption=KEYRING feature.

      Steps to reproduce (refer attached MTR testcase)

      ./pstress-ps --threads 1 --seconds 100 --tables 10 --records 100 --log-all-queries --log-failed-queries --no-partition-tables --rename-index 5 --rename-column 5 --rotate-master-key 50 --alt-tbs-enc 50 --only-cl-sql

      Request you to please take a look.

      #0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:62
      #1  0x0000000004e83daa in my_write_core (sig=6) at /home/mohit.joshi/release-8.0.21/mysys/stacktrace.cc:409
      #2  0x0000000003c3b387 in handle_fatal_signal (sig=6) at /home/mohit.joshi/release-8.0.21/sql/signal_handler.cc:194
      #3  <signal handler called>
      #4  0x00007efc6d5c7438 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
      #5  0x00007efc6d5c903a in __GI_abort () at abort.c:89
      #6  0x0000000005373214 in ut_dbg_assertion_failed (expr=0x70c1178 "key_version_read_from_page != ENCRYPTION_KEY_VERSION_NOT_ENCRYPTED", 
          file=0x70c0928 "/home/mohit.joshi/release-8.0.21/storage/innobase/os/os0file.cc", line=1767)
          at /home/mohit.joshi/release-8.0.21/storage/innobase/ut/ut0dbg.cc:98
      #7  0x0000000005171f70 in load_key_needed_for_decryption (type=..., encryption=..., buf=0x7efc59eb4000 "\252\226\rX")
          at /home/mohit.joshi/release-8.0.21/storage/innobase/os/os0file.cc:1767
      #8  0x0000000005172388 in os_file_io_complete (type=..., fh=22, buf=0x7efc59eb4000 "\252\226\rX", scratch=0x0, src_len=16384, offset=65536, 
          len=16384) at /home/mohit.joshi/release-8.0.21/storage/innobase/os/os0file.cc:1842
      #9  0x000000000517887c in os_file_io (in_type=..., file=22, buf=0x7efc59eb4000, n=16384, offset=65536, err=0x7efc6129ae94)
          at /home/mohit.joshi/release-8.0.21/storage/innobase/os/os0file.cc:5378
      #10 0x00000000051792e9 in os_file_pread (type=..., file=22, buf=0x7efc59eb4000, n=16384, offset=65536, trx=0x0, err=0x7efc6129ae94)
          at /home/mohit.joshi/release-8.0.21/storage/innobase/os/os0file.cc:5542
      #11 0x00000000051794d0 in os_file_read_page (type=..., file_name=0x7efc59ead640 "./tab16k_e.ibd", file=22, buf=0x7efc59eb4000, offset=65536, 
          n=16384, o=0x0, exit_on_err=true, trx=0x0) at /home/mohit.joshi/release-8.0.21/storage/innobase/os/os0file.cc:5584
      #12 0x000000000517a947 in os_file_read_func (type=..., file_name=0x7efc59ead640 "./tab16k_e.ibd", file=22, buf=0x7efc59eb4000, offset=65536, 
          n=16384, trx=0x0) at /home/mohit.joshi/release-8.0.21/storage/innobase/os/os0file.cc:6035
      #13 0x000000000517e12a in os_aio_func (type=..., aio_mode=AIO_mode::SYNC, name=0x7efc59ead640 "./tab16k_e.ibd", file=..., 
          buf=0x7efc59eb4000, offset=65536, n=16384, read_only=false, m1=0x7efc59ead500, m2=0x0, space_id=5, trx=0x0, should_buffer=false)
          at /home/mohit.joshi/release-8.0.21/storage/innobase/os/os0file.cc:7574
      #14 0x00000000055517d1 in pfs_os_aio_func (type=..., aio_mode=AIO_mode::SYNC, name=0x7efc59ead640 "./tab16k_e.ibd", file=..., 
          buf=0x7efc59eb4000, offset=65536, n=16384, read_only=false, m1=0x7efc59ead500, m2=0x0, space_id=5, trx=0x0, should_buffer=false, 
          src_file=0x71d1028 "/home/mohit.joshi/release-8.0.21/storage/innobase/fil/fil0fil.cc", src_line=8441)
          at /home/mohit.joshi/release-8.0.21/storage/innobase/include/os0file.ic:254
      #15 0x00000000055663e9 in Fil_shard::do_io (this=0x7efc582e2b40, type=..., sync=true, page_id=..., page_size=..., byte_offset=0, len=16384, 
          buf=0x7efc59eb4000, message=0x0, trx=0x0, should_buffer=false) at /home/mohit.joshi/release-8.0.21/storage/innobase/fil/fil0fil.cc:8438
      #16 0x0000000005566a25 in _fil_io (type=..., sync=true, page_id=..., page_size=..., byte_offset=0, len=16384, buf=0x7efc59eb4000, 
          message=0x0, trx=0x0, should_buffer=false) at /home/mohit.joshi/release-8.0.21/storage/innobase/fil/fil0fil.cc:8593
      #17 0x0000000005445303 in dblwr_recover_page (dblwr_page_no=13, space=0x7efc59eadc20, page_no=4, 
          page=0x7efc584ac000 "U\333", <incomplete sequence \356\275>) at /home/mohit.joshi/release-8.0.21/storage/innobase/buf/buf0dblwr.cc:1928
      #18 0x00000000054459fb in dblwr::recv::Pages::recover (this=0x7efc5835bbf0, space=0x7efc59eadc20)
          at /home/mohit.joshi/release-8.0.21/storage/innobase/buf/buf0dblwr.cc:2045
      #19 0x000000000544432e in dblwr::recv::recover (pages=0x7efc5835bbf0, space=0x7efc59eadc20)
      

        Attachments

        1. bug_7338.test
          0.9 kB
          Mohit Joshi
        2. bug_7338-master.opt
          0.1 kB
          Mohit Joshi
        3. loaddata_7338.inc
          214 kB
          Mohit Joshi
        4. metadata_7338.inc
          3 kB
          Mohit Joshi
        5. runload_7338.inc
          4 kB
          Mohit Joshi

          Issue Links

            Activity

              People

              Assignee:
              satya.bodapati Satya Bodapati
              Reporter:
              mohit.joshi Mohit Joshi
              Votes:
              0 Vote for this issue
              Watchers:
              5 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 - 1 day, 20 minutes
                  1d 20m

                    Smart Checklist