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

Server crash in myrocks::ha_rocksdb::update_stats or internal error after failed TRUNCATE

    XMLWordPrintable

    Details

      Description

      --source include/have_partition.inc
       
      INSTALL SONAME 'ha_rocksdb';
       
      CREATE TABLE t1 (
          pk INT PRIMARY KEY,
          a VARCHAR(1),
          KEY(a)
      ) ENGINE=RocksDB PARTITION BY HASH (pk);
       
      ALTER TABLE t1 MODIFY a VARCHAR (2) COLLATE utf8mb4_general_nopad_ci;
      --error ER_MYROCKS_CANT_NOPAD_COLLATION
      TRUNCATE t1;
      SELECT * FROM t1;
      

      10.2 6e09e7c1

      #3  <signal handler called>
      #4  0x00007fa4275851d3 in myrocks::ha_rocksdb::update_stats (this=0x7fa42c0994c8) at /data/src/10.2/storage/rocksdb/ha_rocksdb.cc:10838
      #5  0x00007fa42758539f in myrocks::ha_rocksdb::info (this=0x7fa42c0994c8, flag=18) at /data/src/10.2/storage/rocksdb/ha_rocksdb.cc:10870
      #6  0x000055bd9c44f34e in ha_partition::info (this=0x7fa42c0940f8, flag=18) at /data/src/10.2/sql/ha_partition.cc:6650
      #7  0x000055bd9bbd9329 in TABLE_LIST::fetch_number_of_rows (this=0x7fa42c012638) at /data/src/10.2/sql/table.cc:8298
      #8  0x000055bd9bb0dfbc in make_join_statistics (join=0x7fa42c012d50, tables_list=..., keyuse_array=0x7fa42c013040) at /data/src/10.2/sql/sql_select.cc:3969
      #9  0x000055bd9bb05e32 in JOIN::optimize_inner (this=0x7fa42c012d50) at /data/src/10.2/sql/sql_select.cc:1584
      #10 0x000055bd9bb04324 in JOIN::optimize (this=0x7fa42c012d50) at /data/src/10.2/sql/sql_select.cc:1114
      #11 0x000055bd9bb0d852 in mysql_select (thd=0x7fa42c000af0, tables=0x7fa42c012638, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fa42c012d30, unit=0x7fa42c0046e8, select_lex=0x7fa42c004e28) at /data/src/10.2/sql/sql_select.cc:3819
      #12 0x000055bd9bb01aa0 in handle_select (thd=0x7fa42c000af0, lex=0x7fa42c004628, result=0x7fa42c012d30, setup_tables_done_option=0) at /data/src/10.2/sql/sql_select.cc:361
      #13 0x000055bd9bacd4ec in execute_sqlcom_select (thd=0x7fa42c000af0, all_tables=0x7fa42c012638) at /data/src/10.2/sql/sql_parse.cc:6218
      #14 0x000055bd9bac3d6d in mysql_execute_command (thd=0x7fa42c000af0) at /data/src/10.2/sql/sql_parse.cc:3524
      #15 0x000055bd9bad1223 in mysql_parse (thd=0x7fa42c000af0, rawbuf=0x7fa42c012458 "SELECT * FROM t1", length=16, parser_state=0x7fa43c6c3610, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7733
      #16 0x000055bd9babf54f in dispatch_command (command=COM_QUERY, thd=0x7fa42c000af0, packet=0x7fa42c08cdb1 "SELECT * FROM t1", packet_length=16, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1824
      #17 0x000055bd9babdfca in do_command (thd=0x7fa42c000af0) at /data/src/10.2/sql/sql_parse.cc:1377
      #18 0x000055bd9bc14099 in do_handle_one_connection (connect=0x55bd9ee423b0) at /data/src/10.2/sql/sql_connect.cc:1336
      #19 0x000055bd9bc13e04 in handle_one_connection (arg=0x55bd9ee423b0) at /data/src/10.2/sql/sql_connect.cc:1241
      #20 0x000055bd9c42aaa8 in pfs_spawn_thread (arg=0x55bd9ed8f0c0) at /data/src/10.2/storage/perfschema/pfs.cc:1869
      #21 0x00007fa4443184a4 in start_thread (arg=0x7fa43c6c4700) at pthread_create.c:456
      #22 0x00007fa44244cd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Without partitioning server doesn't crash, but SELECT produces an error:

      INSTALL SONAME 'ha_rocksdb';
       
      CREATE TABLE t1 (
          pk INT PRIMARY KEY,
          a VARCHAR(1),
          KEY(a)
      ) ENGINE=RocksDB;
       
      ALTER TABLE t1 MODIFY a VARCHAR (2) COLLATE utf8mb4_general_nopad_ci;
      --error ER_MYROCKS_CANT_NOPAD_COLLATION
      TRUNCATE t1;
      SELECT * FROM t1;
      

      mysqltest: At line 12: query 'SELECT * FROM t1' failed: 1815: Internal error: Attempt to open a table that is not present in RocksDB-SE data dictionary
      

      Reproducible on 10.2-10.5, release, debug and ASAN builds alike.

        Attachments

          Activity

            People

            Assignee:
            psergei Sergei Petrunia
            Reporter:
            elenst Elena Stepanova
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration

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