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

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:

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>, signo=signo@entry=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>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 #1 0x0000563f1bbab657 in my_write_core (sig=sig@entry=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 (s=s@entry=0x7f61943e4e10, format=format@entry=0x7f6195f9a2db "Table flags are %lx in the data dictionary but the flags in file %s are %lx!", ap=ap@entry=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!", args=args@entry=0x7f61943e4f90) at vsnprintf_chk.c:63 #7 0x00007f61a9fe6095 in ___snprintf_chk (s=s@entry=0x7f61943e5070 "Table flags are 563f1c2450ce in the data dictionary but the flags in file ", maxlen=maxlen@entry=8192, flags=flags@entry=1, slen=slen@entry=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]> (err=err@entry=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, file=file@entry=0x7f6193481e58, read_only_mode=read_only_mode@entry=false) at ../../../../../storage/innobase/fil/fil0fil.cc:2437 #13 0x0000563f1c0046c9 in Fil_shard::open_file (this=this@entry=0x7f61937f9918, file=file@entry=0x7f6193481e58, extend=extend@entry=false) at ../../../../../storage/innobase/fil/fil0fil.cc:2552 #14 0x0000563f1c004aaf in Fil_shard::space_open (this=this@entry=0x7f61937f9918, space_id=space_id@entry=1) at ../../../../../storage/innobase/fil/fil0fil.cc:3374 #15 0x0000563f1c004fd8 in fil_space_open (space_id=space_id@entry=1) at ../../../../../storage/innobase/fil/fil0fil.cc:3391 #16 0x0000563f1be90ae4 in srv_undo_tablespace_open (space_id=space_id@entry=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 (create_new_db=create_new_db@entry=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 (thd=thd@entry=0x7f619f3fc000, dict_init_mode=dict_init_mode@entry=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 (arg=arg@entry=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

Environment

None

Attachments

1
  • 21 Dec 2018, 10:44 AM

Smart Checklist

Activity

Show:

Peter Schwaller December 24, 2018 at 1:11 PM

said it would be there.

roel.vandepaar December 24, 2018 at 7:43 AM

Where is the workaround in the upgrade guide?

Peter Schwaller December 21, 2018 at 1:22 PM

When this is fixed, the workaround in the upgrade guide should be removed.

Peter Schwaller December 21, 2018 at 1:21 PM

8.0 triage - clear workaround: shutdown 5.7 with full purge, upgrade to 8.0 without undo tablespace encryption, turn it on in 8.0.  Fix if Time.

Done

Details

Assignee

Reporter

Time tracking

1d 4h 10m logged

Fix versions

Affects versions

Priority

Smart Checklist

Created December 21, 2018 at 10:48 AM
Updated March 6, 2024 at 12:31 PM
Resolved April 12, 2019 at 8:23 AM