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

Assertion failure: dict0dd.cc:5784:space->flags == flags

Details

    • Bug
    • Status: Done
    • High
    • Resolution: Fixed
    • 8.0.12-2rc1
    • 8.0.13-3
    • None
    • None

    Description

      This is a crash recovery assertion.

      Testcase (used keyring_vault plugin)

      1) Initlialize database 
      
      /qa/ps8/work/ps8012/bin/mysqld --no-defaults --initialize-insecure --early-plugin-load=keyring_vault=keyring_vault.so --loose-keyring_vault_config=/qa/ps8/vault/keyring_vault.cnf --innodb_sys_tablespace_encrypt=ON --basedir=/qa/ps8/work/ps8012 --datadir=/qa/ps8/work/ps8012/data 
      
      2) Startup command
      
      /qa/ps8/work/ps8012/bin/mysqld --no-defaults --early-plugin-load=keyring_vault=keyring_vault.so --loose-keyring_vault_config=/qa/ps8/vault/keyring_vault.cnf --innodb_sys_tablespace_encrypt=ON --innodb_redo_log_encrypt=ON --innodb_temp_tablespace_encrypt=ON --innodb_encrypt_tables=ON --encrypt_binlog=ON --master_verify_checksum=ON --binlog_checksum=CRC32 --encrypt-tmp-files --gtid_mode=ON --enforce_gtid_consistency=ON --log_slave_updates=ON --log_bin=binlog --binlog_format=ROW --master_info_repository=TABLE --relay_log_info_repository=TABLE --core-file --basedir=/qa/ps8/work/ps8012 --tmpdir=/qa/ps8/work/ps8012/data --datadir=/qa/ps8/work/ps8012/data --plugin-load-add=tokudb=ha_tokudb.so --tokudb-check-jemalloc=0 --plugin-load-add=rocksdb=ha_rocksdb.so --socket=/qa/ps8/work/ps8012/socket.sock --port=10087 --log-error=/qa/ps8/work/ps8012/log/master.err --server-id=100
      
      3) create test database 
      
      create database test; use test
      
      4) Created tables using stored procedure 
      ## this will create tables similar to sysbench format.
      
      DROP PROCEDURE IF EXISTS `createTableProcTest`;
      DELIMITER //
      CREATE PROCEDURE `createTableProcTest`()
      BEGIN
          DECLARE count INT Default 0;
            simple_loop: LOOP
               SET @a := count + 1;
               SET @statement = CONCAT("CREATE TABLE sbtest",@a," (id int(11) NOT NULL AUTO_INCREMENT,k int(11) NOT NULL DEFAULT '0',c char(120) NOT NULL DEFAULT '',pad char(60) NOT NULL DEFAULT '', PRIMARY KEY (id), KEY k_1 (k)) TABLESPACE=innodb_system ENCRYPTION='Y';");
               PREPARE stmt FROM @statement;
                       EXECUTE stmt;
                       DEALLOCATE PREPARE stmt;
                       SET count = count + 1;
               IF count=10 THEN
                  LEAVE simple_loop;
               END IF;
      END LOOP simple_loop;
      END//
      DELIMITER ;
      
      call createTableProcTest();
      
      5) Insert data using sysbench lua script
      
      sysbench /usr/share/sysbench/oltp_insert.lua --mysql-db=test --mysql-user=root --db-driver=mysql --mysql-socket=/qa/ps8/work/ps8012/socket.sock --threads=10 --tables=10 --time=300 --report-interval=1 run
      
      6) kill mysqld from different session
      
      kill -9 <pid>
      
      7) start mysqld 
      
      This will give assertion
      
      

      GDB info

      #0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:62
      #1  0x000000000419fb5f in my_write_core (sig=6) at /qa/ps8/PS-8.0.12_dbg/mysys/stacktrace.cc:278
      #2  0x0000000002ebd1f7 in handle_fatal_signal (sig=6) at /qa/ps8/PS-8.0.12_dbg/sql/signal_handler.cc:254
      #3  <signal handler called>
      #4  0x00007fd49cb74428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
      #5  0x00007fd49cb7602a in __GI_abort () at abort.c:89
      #6  0x00000000046cca75 in ut_dbg_assertion_failed (expr=0x5951b7c "space->flags == flags", file=0x5950058 "/qa/ps8/PS-8.0.12_dbg/storage/innobase/dict/dict0dd.cc", line=5784) at /qa/ps8/PS-8.0.12_dbg/storage/innobase/ut/ut0dbg.cc:90
      #7  0x00000000047e0659 in dd_tablespace_update_cache (thd=0x7fd44605b000) at /qa/ps8/PS-8.0.12_dbg/storage/innobase/dict/dict0dd.cc:5784
      #8  0x00000000043e8b48 in innobase_post_recover () at /qa/ps8/PS-8.0.12_dbg/storage/innobase/handler/ha_innodb.cc:3678
      #9  0x00000000030580d7 in post_recover_handlerton (plugin=0x7ffe0b808c10) at /qa/ps8/PS-8.0.12_dbg/sql/handler.cc:8868
      #10 0x0000000002d3372f in plugin_foreach_with_mask (thd=0x0, funcs=0x7ffe0b808cb0, type=1, state_mask=4294967287, arg=0x0) at /qa/ps8/PS-8.0.12_dbg/sql/sql_plugin.cc:2475
      #11 0x0000000002d337fd in plugin_foreach_with_mask (thd=0x0, func=0x305808c <post_recover_handlerton(THD*, plugin_ref, void*)>, type=1, state_mask=8, arg=0x0) at /qa/ps8/PS-8.0.12_dbg/sql/sql_plugin.cc:2488
      #12 0x0000000003058103 in ha_post_recover () at /qa/ps8/PS-8.0.12_dbg/sql/handler.cc:8875
      #13 0x0000000002b904e4 in init_server_components () at /qa/ps8/PS-8.0.12_dbg/sql/mysqld.cc:5505
      #14 0x0000000002b92f10 in mysqld_main (argc=30, argv=0x7fd49c020120) at /qa/ps8/PS-8.0.12_dbg/sql/mysqld.cc:6185
      #15 0x0000000002b81006 in main (argc=30, argv=0x7ffe0b809a28) at /qa/ps8/PS-8.0.12_dbg/sql/main.cc:30 

      Attachments

        Issue Links

          Activity

            People

              satya.bodapati Satya Bodapati
              ramesh.sivaraman Ramesh Sivaraman (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 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 - 3 hours
                  3h

                  Smart Checklist