Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-29692

Assertion `(writeptr + (i * size)) != local_frame' failed upon IMPORT TABLESPACE

    XMLWordPrintable

Details

    Description

      Run with

      --mysqld=--innodb-page-size=4K --mysqld=--file-key-management-filename=`pwd`/std_data/keys.txt --mysqld=--plugin-load-add=file_key_management
      

      --source include/have_innodb.inc
      --source include/have_sequence.inc
      --source include/have_file_key_management.inc
      --source include/have_innodb_4k.inc
       
      create database db;
      use db;
       
      create table t1 (a binary(1)) engine=InnoDB ENCRYPTED=YES;
      insert into t1 select NULL from seq_1_to_550000;
       
      flush table t1 for export;
       
      --let $datadir= `select @@datadir`
       
      --copy_file $datadir/db/t1.ibd $MYSQL_TMP_DIR/t1.ibd
      --copy_file $datadir/db/t1.cfg $MYSQL_TMP_DIR/t1.cfg
       
      unlock tables;
      drop table t1;
       
      create table t1 (a binary(1)) engine=InnoDB ENCRYPTED=YES;
      alter table t1 discard tablespace;
       
      --move_file $MYSQL_TMP_DIR/t1.ibd $datadir/db/t1.ibd
      --move_file $MYSQL_TMP_DIR/t1.cfg $datadir/db/t1.cfg
       
      alter table t1 import tablespace;
       
      # Cleanup
      drop database db;
      

      10.3 dd8833bf

      mysqld: /data/src/10.3/storage/innobase/row/row0import.cc:3724: dberr_t fil_iterate(const fil_iterator_t&, buf_block_t*, AbstractCallback&): Assertion `(writeptr + (i * size)) != local_frame' failed.
      221004  1:11:11 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fd30efa1662 in __GI___assert_fail (assertion=0x5584b8fe5560 "(writeptr + (i * size)) != local_frame", file=0x5584b8fe1100 "/data/src/10.3/storage/innobase/row/row0import.cc", line=3724, function=0x5584b8fe5240 "dberr_t fil_iterate(const fil_iterator_t&, buf_block_t*, AbstractCallback&)") at assert.c:101
      #8  0x00005584b7e04455 in fil_iterate (iter=..., block=0x617000025000, callback=...) at /data/src/10.3/storage/innobase/row/row0import.cc:3724
      #9  0x00005584b7e0c503 in PageConverter::run (this=0x7fd2f8894bc0, iter=..., block=0x617000025000) at /data/src/10.3/storage/innobase/row/row0import.cc:830
      #10 0x00005584b7e06056 in fil_tablespace_iterate (table=0x6190000d3508, n_io_buffers=128, callback=...) at /data/src/10.3/storage/innobase/row/row0import.cc:3947
      #11 0x00005584b7e07ac0 in row_import_for_mysql (table=0x6190000d3508, prebuilt=0x620000010108) at /data/src/10.3/storage/innobase/row/row0import.cc:4142
      #12 0x00005584b7b60b45 in ha_innobase::discard_or_import_tablespace (this=0x61c0000548a8, discard=0 '\000') at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:13149
      #13 0x00005584b75efb7b in handler::ha_discard_or_import_tablespace (this=0x61c0000548a8, discard=0 '\000') at /data/src/10.3/sql/handler.cc:4587
      #14 0x00005584b70b668b in mysql_discard_or_import_tablespace (thd=0x62a00009c208, table_list=0x62b000000340, discard=false) at /data/src/10.3/sql/sql_table.cc:6070
      #15 0x00005584b723be5d in Sql_cmd_discard_import_tablespace::execute (this=0x62b0000009e0, thd=0x62a00009c208) at /data/src/10.3/sql/sql_alter.cc:553
      #16 0x00005584b6e887d6 in mysql_execute_command (thd=0x62a00009c208) at /data/src/10.3/sql/sql_parse.cc:6076
      #17 0x00005584b6e94608 in mysql_parse (thd=0x62a00009c208, rawbuf=0x62b000000228 "alter table t1 import tablespace", length=32, parser_state=0x7fd2f88979d0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7855
      #18 0x00005584b6e6bc56 in dispatch_command (command=COM_QUERY, thd=0x62a00009c208, packet=0x629000127209 "alter table t1 import tablespace", packet_length=32, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1852
      #19 0x00005584b6e6880e in do_command (thd=0x62a00009c208) at /data/src/10.3/sql/sql_parse.cc:1398
      #20 0x00005584b722b336 in do_handle_one_connection (connect=0x6080000012a8) at /data/src/10.3/sql/sql_connect.cc:1403
      #21 0x00005584b722ac32 in handle_one_connection (arg=0x6080000012a8) at /data/src/10.3/sql/sql_connect.cc:1308
      #22 0x00005584b87d629f in pfs_spawn_thread (arg=0x615000006e88) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #23 0x00007fd30f14cea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #24 0x00007fd30f06caef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Reproducible on all of 10.3+, also on previous minor releases.
      No obvious problem on a non-debug build.

      Attachments

        Activity

          People

            marko Marko Mäkelä
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.