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

Can't upgrade with encrypted undo tablespaces from 5.7.24 to 8.0.13

Details

    • Bug
    • Status: Done
    • High
    • Resolution: Fixed
    • 8.0.x
    • 8.0.15-6
    • None
    • None

    Description

      I'm using following options:

       --no-defaults --innodb-undo-tablespaces=4 --binlog-format=ROW --log-bin=mysql-bin --master_verify_checksum=on --binlog_checksum=crc32 --encrypt_binlog --innodb_temp_tablespace_encrypt=ON --encrypt-tmp-files=ON --innodb_encrypt_tables=ON --innodb-parallel-dblwr-encrypt=ON --innodb-undo-log-encrypt=ON --innodb-redo-log-encrypt=MASTER_KEY --innodb_encrypt_online_alter_logs=ON --keyring_file_data=/tmp/mysql_keyring --early-plugin-load=keyring_file.so
      

      I don't add any data, just initialize 5.7.24, start, stop, then try to start 8.0.13.

      If I remove: "innodb-undo-tablespaces=4" and "innodb-undo-log-encrypt=ON" then the upgrade passes, mysql_upgrade seems to run ok and 8.0.13 starts.

      Here's the error log from bad upgrade: master.err

      Here's info from GDB:

      Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
      Core was generated by `/home/plavi/lab/mysql/bin/Percona-Server-8.0.13-3-Linux.x86_64/bin/mysqld --no-'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __pthread_kill (threadid=<optimized out>, [email protected]=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      57      ../sysdeps/unix/sysv/linux/pthread_kill.c: No such file or directory.
      [Current thread is 1 (Thread 0x7f61943ff700 (LWP 22061))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, [email protected]=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x0000563f1bbab657 in my_write_core ([email protected]=11) at ../../../../mysys/stacktrace.cc:278
      #2  0x0000563f1aedd3a5 in handle_fatal_signal (sig=11) at ../../../../sql/signal_handler.cc:254
      #3  <signal handler called>
      #4  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:62
      #5  0x00007f61a9f114d3 in _IO_vfprintf_internal ([email protected]=0x7f61943e4e10, [email protected]=0x7f6195f9a2db "Table flags are %lx in the data dictionary but the flags in file %s  are %lx!",
          [email protected]=0x7f61943e4f90) at vfprintf.c:1643
      #6  0x00007f61a9fe6169 in ___vsnprintf_chk (s=0x7f61943e5070 "Table flags are 563f1c2450ce in the data dictionary but the flags in file ", maxlen=<optimized out>, flags=1, slen=<optimized out>,
          format=0x7f6195f9a2db "Table flags are %lx in the data dictionary but the flags in file %s  are %lx!", [email protected]=0x7f61943e4f90) at vsnprintf_chk.c:63
      #7  0x00007f61a9fe6095 in ___snprintf_chk ([email protected]=0x7f61943e5070 "Table flags are 563f1c2450ce in the data dictionary but the flags in file ", [email protected]=8192, [email protected]=1,
          [email protected]=8192, format=<optimized out>) at snprintf_chk.c:34
      #8  0x0000563f1bcfb6c6 in snprintf (__fmt=<optimized out>, __n=8192, __s=0x7f61943e5070 "Table flags are 563f1c2450ce in the data dictionary but the flags in file ")
          at /usr/include/x86_64-linux-gnu/bits/stdio2.h:65
      #9  ib::logger::msg<char const (&) [1]> ([email protected]=12097, args#0=...) at ../../../../../storage/innobase/include/ut0ut.h:434
      #10 0x0000563f1bcfb8f7 in ib::logger::logger (this=0x7f61943e7270, level=ERROR_LEVEL, err=12097) at ../../../../../storage/innobase/include/ut0ut.h:460
      #11 0x0000563f1c003e60 in ib::fatal::fatal<unsigned int&, char*&, unsigned long&> (err=12097, this=0x7f61943e7270) at ../../../../../storage/innobase/include/ut0ut.h:572
      #12 Fil_shard::get_file_size (this=this@entry=0x7f61937f9918, [email protected]=0x7f6193481e58, [email protected]=false) at ../../../../../storage/innobase/fil/fil0fil.cc:2437
      #13 0x0000563f1c0046c9 in Fil_shard::open_file (this=this@entry=0x7f61937f9918, [email protected]=0x7f6193481e58, [email protected]=false) at ../../../../../storage/innobase/fil/fil0fil.cc:2552
      #14 0x0000563f1c004aaf in Fil_shard::space_open (this=this@entry=0x7f61937f9918, [email protected]=1) at ../../../../../storage/innobase/fil/fil0fil.cc:3374
      #15 0x0000563f1c004fd8 in fil_space_open ([email protected]=1) at ../../../../../storage/innobase/fil/fil0fil.cc:3391
      #16 0x0000563f1be90ae4 in srv_undo_tablespace_open ([email protected]=1) at ../../../../../storage/innobase/srv/srv0start.cc:861
      #17 0x0000563f1ab28e2d in srv_undo_tablespaces_open (target_undo_spaces=4) at ../../../../../storage/innobase/srv/srv0start.cc:897
      #18 0x0000563f1ab29294 in srv_undo_tablespaces_init (create_new_db=<optimized out>) at ../../../../../storage/innobase/srv/srv0start.cc:1271
      #19 0x0000563f1be9aafb in srv_start ([email protected]=false, scan_directories="./;./;./") at ../../../../../storage/innobase/srv/srv0start.cc:2514
      #20 0x0000563f1bd22458 in innobase_init_files (tablespaces=0x7f61943fe490, dict_init_mode=<optimized out>) at ../../../../../storage/innobase/handler/ha_innodb.cc:5027
      #21 innobase_ddse_dict_init (dict_init_mode=<optimized out>, version=<optimized out>, tables=0x7f61943fe470, tablespaces=0x7f61943fe490) at ../../../../../storage/innobase/handler/ha_innodb.cc:12083
      #22 0x0000563f1b986c25 in dd::bootstrap::DDSE_dict_init ([email protected]=0x7f619f3fc000, [email protected]=DICT_INIT_UPGRADE_57_FILES, version=80013)
          at ../../../../sql/dd/impl/bootstrapper.cc:2199
      #23 0x0000563f1bb59c24 in dd::upgrade_57::do_pre_checks_and_initialize_dd (thd=0x7f619f3fc000) at ../../../../sql/dd/upgrade/upgrade.cc:1087
      #24 0x0000563f1af895b6 in bootstrap::handle_bootstrap ([email protected]=0x7f619f3fc000) at ../../../../sql/bootstrap.cc:347
      #25 0x0000563f1bc572af in pfs_spawn_thread (arg=0x7f61a94a9320) at ../../../../../storage/perfschema/pfs.cc:2836
      #26 0x00007f61abd036db in start_thread (arg=0x7f61943ff700) at pthread_create.c:463
      #27 0x00007f61a9fd588f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        Issue Links

          Activity

            People

              robert.golebiowski Robert Golebiowski (Inactive)
              tomislav.plavcic@percona.com Tomislav Plavcic
              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 - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 4 hours, 10 minutes
                  1d 4h 10m

                  Smart Checklist