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

Assertion `dd_val >= last_val' failed in myrocks::ha_rocksdb::load_auto_incr_value_from_index

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL)
    • 10.5, 10.6
    • None

    Description

      # The include file only exists in 10.6+, on earlier versions run with
      # --mysqld=--plugin-load-add=ha_rocksdb
      #
      #--source include/have_rocksdb.inc
       
      CREATE TABLE t (a VARCHAR(8), b INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(a), KEY(b)) CHARACTER SET utf8 ENGINE=RocksDB;
      INSERT INTO t VALUES ('foo',1),('bar',2);
      --source include/restart_mysqld.inc
      CHECK TABLE t;
       
      # Cleanup
      DROP TABLE t;
      

      10.3 990cde80

      mysqld: /data/src/10.3/storage/rocksdb/ha_rocksdb.cc:6157: ulonglong myrocks::ha_rocksdb::load_auto_incr_value_from_index(): Assertion `dd_val >= last_val' failed.
      220702 17:36:54 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f5c950f5662 in __GI___assert_fail (assertion=0x7f5c8bc72ce0 "dd_val >= last_val", file=0x7f5c8bc6d160 "/data/src/10.3/storage/rocksdb/ha_rocksdb.cc", line=6157, function=0x7f5c8bc72cf8 "ulonglong myrocks::ha_rocksdb::load_auto_incr_value_from_index()") at assert.c:101
      No locals.
      #8  0x00007f5c8b74a3d0 in myrocks::ha_rocksdb::load_auto_incr_value_from_index (this=0x7f5c4c1434f8) at /data/src/10.3/storage/rocksdb/ha_rocksdb.cc:6157
              gl_index_id = @0x7f5c900d2ab8: {cf_id = 0, index_id = 256}
              field = 0x7f5c4c141b60
              max_val = 4294967295
              old_map = 0x7f5c4c13ea00
              dd_val = 3
              save_active_index = 64
              save_table_status = 3 '\003'
              last_val = 2779096486
              tx = 0x7f5c4c140e70
              is_new_snapshot = true
              save_keyread_only = false
              __PRETTY_FUNCTION__ = "ulonglong myrocks::ha_rocksdb::load_auto_incr_value_from_index()"
      #9  0x00007f5c8b74a0f2 in myrocks::ha_rocksdb::load_auto_incr_value (this=0x7f5c4c1434f8) at /data/src/10.3/storage/rocksdb/ha_rocksdb.cc:6112
              auto_incr = 3
              validate_last = true
              use_datadic = true
      #10 0x00007f5c8b74cc03 in myrocks::ha_rocksdb::open (this=0x7f5c4c1434f8, name=0x7f5c4c030f20 "./test/t", mode=2, test_if_locked=50) at /data/src/10.3/storage/rocksdb/ha_rocksdb.cc:6837
              _db_stack_frame_ = {func = 0x55a46c57b844 "handler::ha_open", file = 0x55a46c57a5be "/data/src/10.3/sql/handler.cc", level = 2147483661, line = -1, prev = 0x7f5c900d2c90}
              __PRETTY_FUNCTION__ = "virtual int myrocks::ha_rocksdb::open(const char*, int, uint)"
              err = 0
              guard = {m_io_perf = {m_atomic_counters = 0x0, m_shared_io_perf_read = 0x0, m_shared_io_perf_write = 0x0, m_stats = 0x0, io_write_bytes = 0, io_write_requests = 0}, m_io_perf_ptr = 0x7f5c4c143bf0, m_tx = 0x0, m_level = 1}
              fullname = "test.t"
      #11 0x000055a46bae1a8d in handler::ha_open (this=0x7f5c4c1434f8, table_arg=0x7f5c4c13e8d0, name=0x7f5c4c030f20 "./test/t", mode=2, test_if_locked=50, mem_root=0x0, partitions_to_open=0x0) at /data/src/10.3/sql/handler.cc:2778
              error = 32604
              _db_stack_frame_ = {func = 0x55a46c414bd1 "open_table_from_share", file = 0x55a46c413d60 "/data/src/10.3/sql/table.cc", level = 2147483660, line = -1, prev = 0x7f5c900d2dc0}
              __PRETTY_FUNCTION__ = "int handler::ha_open(TABLE*, const char*, int, uint, MEM_ROOT*, List<String>*)"
      #12 0x000055a46b8de15e in open_table_from_share (thd=0x7f5c4c000d90, share=0x7f5c4c0309e8, alias=0x7f5c4c014ce0, db_stat=33, prgflag=8, ha_open_flags=50, outparam=0x7f5c4c13e8d0, is_create_table=false, partitions_to_open=0x0) at /data/src/10.3/sql/table.cc:3690
              ha_err = 32604
              error = OPEN_FRM_ERROR_ALREADY_ISSUED
              records = 2
              i = 2
              bitmap_size = 4
              bitmap_count = 7
              tmp_alias = 0x7f5c4c141a18 "t"
              error_reported = false
              record = 0x7f5c4c141a1f "\217", '\245' <repeats 64 times>, "x\032\024L\\\177"
              bitmaps = 0x7f5c4c141c50 ""
              field_ptr = 0x7f5c4c141a70
              save_context_analysis_only = 0 '\000'
              check_set_initialized = TABLE_SHARE::NOT_INITIALIZED
              _db_stack_frame_ = {func = 0x55a46c3dc53f "open_table", file = 0x55a46c3dbc88 "/data/src/10.3/sql/sql_base.cc", level = 2147483659, line = -1, prev = 0x7f5c900d2ee0}
              __PRETTY_FUNCTION__ = "open_frm_error open_table_from_share(THD*, TABLE_SHARE*, const LEX_CSTRING*, uint, uint, uint, TABLE*, bool, List<String>*)"
              work_part_info_used = 176
      #13 0x000055a46b72081f in open_table (thd=0x7f5c4c000d90, table_list=0x7f5c4c014c98, ot_ctx=0x7f5c900d3260) at /data/src/10.3/sql/sql_base.cc:2004
              error = 21924
              table = 0x7f5c4c13e8d0
              key = 0x7f5c4c015129 "test"
              key_length = 7
              alias = 0x7f5c4c014c90 "t"
              flags = 0
              mdl_ticket = 0x7f5c4c02eda0
              share = 0x7f5c4c0309e8
              gts_flags = 3
              from_share = false
              part_names_error = 0
              _db_stack_frame_ = {func = 0x55a46c3dce8d "open_and_process_table", file = 0x55a46c3dbc88 "/data/src/10.3/sql/sql_base.cc", level = 2147483658, line = -1, prev = 0x7f5c900d3170}
              __PRETTY_FUNCTION__ = "bool open_table(THD*, TABLE_LIST*, Open_table_context*)"
      #14 0x000055a46b7240f1 in open_and_process_table (thd=0x7f5c4c000d90, tables=0x7f5c4c014c98, counter=0x7f5c900d32f4, flags=0, prelocking_strategy=0x7f5c900d3378, has_prelocking_list=false, ot_ctx=0x7f5c900d3260) at /data/src/10.3/sql/sql_base.cc:3731
              error = false
              safe_to_ignore_table = false
              lex = 0x7f5c4c004b80
              _db_stack_frame_ = {func = 0x55a46c3dd148 "open_tables", file = 0x55a46c3dbc88 "/data/src/10.3/sql/sql_base.cc", level = 2147483657, line = -1, prev = 0x7f5c900d3240}
              __PRETTY_FUNCTION__ = "bool open_and_process_table(THD*, TABLE_LIST*, uint*, uint, Prelocking_strategy*, bool, Open_table_context*)"
      #15 0x000055a46b725142 in open_tables (thd=0x7f5c4c000d90, options=@0x7f5c4c005db0: {m_options = DDL_options_st::OPT_NONE}, start=0x7f5c900d32d8, counter=0x7f5c900d32f4, flags=0, prelocking_strategy=0x7f5c900d3378) at /data/src/10.3/sql/sql_base.cc:4206
              table_to_open = 0x7f5c900d32d8
              sroutine_to_open = 0x7f5c4c004c18
              tables = 0x7f5c4c014c98
              ot_ctx = {m_thd = 0x7f5c4c000d90, m_failed_table = 0x0, m_start_of_statement_svp = {m_stmt_ticket = 0x0, m_trans_ticket = 0x0}, m_timeout = 86400, m_flags = 0, m_action = Open_table_context::OT_NO_ACTION, m_has_locks = false, m_has_protection_against_grl = false}
              error = false
              some_routine_modifies_data = false
              has_prelocking_list = false
              _db_stack_frame_ = {func = 0x55a46c3dd5a9 "open_and_lock_tables", file = 0x55a46c3dbc88 "/data/src/10.3/sql/sql_base.cc", level = 2147483656, line = -1, prev = 0x7f5c900d3310}
              __PRETTY_FUNCTION__ = "bool open_tables(THD*, const DDL_options_st&, TABLE_LIST**, uint*, uint, Prelocking_strategy*)"
      #16 0x000055a46b727047 in open_and_lock_tables (thd=0x7f5c4c000d90, options=@0x7f5c4c005db0: {m_options = DDL_options_st::OPT_NONE}, tables=0x7f5c4c014c98, derived=true, flags=0, prelocking_strategy=0x7f5c900d3378) at /data/src/10.3/sql/sql_base.cc:5146
              counter = 1
              mdl_savepoint = {m_stmt_ticket = 0x0, m_trans_ticket = 0x0}
              _db_stack_frame_ = {func = 0x55a46c42aae8 "mysql_admin_table", file = 0x55a46c42a7f8 "/data/src/10.3/sql/sql_admin.cc", level = 2147483655, line = -1, prev = 0x7f5c900d3650}
      #17 0x000055a46b6e3ed9 in open_and_lock_tables (thd=0x7f5c4c000d90, tables=0x7f5c4c014c98, derived=true, flags=0) at /data/src/10.3/sql/sql_base.h:503
              prelocking_strategy = {<Prelocking_strategy> = {_vptr.Prelocking_strategy = 0x55a46cae8818 <vtable for DML_prelocking_strategy+16>}, <No data fields>}
      #18 0x000055a46b93f962 in open_only_one_table (thd=0x7f5c4c000d90, table=0x7f5c4c014c98, repair_table_use_frm=false, is_view_operator_func=true) at /data/src/10.3/sql/sql_admin.cc:412
              lex = 0x7f5c4c004b80
              select = 0x7f5c4c0053d8
              save_next_global = 0x0
              save_next_local = 0x0
              open_error = false
              __PRETTY_FUNCTION__ = "bool open_only_one_table(THD*, TABLE_LIST*, bool, bool)"
      #19 0x000055a46b93ffab in mysql_admin_table (thd=0x7f5c4c000d90, tables=0x7f5c4c014c98, check_opt=0x7f5c4c005c08, operator_name=0x55a46c42b0f4 "check", lock_type=TL_READ_NO_INSERT, org_open_for_modify=false, repair_table_use_frm=false, extra_open_options=32, prepare_func=0x0, operator_func=(int (handler::*)(handler * const, THD *, HA_CHECK_OPT *)) 0x55a46bae6d70 <handler::ha_check(THD*, st_ha_check_opt*)>, view_operator_func=0x55a46b8d014e <view_check(THD*, TABLE_LIST*, st_ha_check_opt*)>, is_cmd_replicated=false) at /data/src/10.3/sql/sql_admin.cc:548
              table_name = "test.t\000\000\360\066\r\220\\\177\000\000\360U\000L\000\000\000\000\000\247L\234=\032\220!@7\r\220\\\177\000\000\374\357\213k\244U\000\000\300\247\201n\244U\000\000\330S\000L\\\177\000\000`'", '\000' <repeats 22 times>, "\375\034hk\244U\000\000\226\343?l\244U\000\000\300\325?l\244U\000\000\a\000\000\200F\b\000\000\240\067\r\220\000\000\000\000p\370=l\244U\000\000\000\000\000\000\000\000\000\000@7\r\220\\\177\000\000;\350\064l\000\000\001\000`7\r\220\\\177\000\000?P7l\244U\000\000`7\r\220\\\177\000\000\320\f\000L\\\177\000\000\320\f\000L\\\177\000\000"...
              db = 0x7f5c4c0152f8 "test"
              fatal_error = false
              open_for_modify = false
              open_error = 127
              collect_eis = false
              table = 0x7f5c4c014c98
              field_list = {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x7f5c4c015390, last = 0x7f5c4c015558, elements = 4}, <No data fields>}
              item = 0x7f5c4c0154d0
              protocol = 0x7f5c4c001368
              lex = 0x7f5c4c004b80
              result_code = 1275071696
              compl_result_code = 32604
              need_repair_or_alter = false
              suspended_wfc = 0x0
              is_table_modified = false
              _db_stack_frame_ = {func = 0x55a46c42b0d7 "Sql_cmd_check_table::execute", file = 0x55a46c42a7f8 "/data/src/10.3/sql/sql_admin.cc", level = 2147483654, line = -1, prev = 0x7f5c900d3ce0}
              __PRETTY_FUNCTION__ = "bool mysql_admin_table(THD*, TABLE_LIST*, HA_CHECK_OPT*, const char*, thr_lock_type, bool, bool, uint, int (*)(THD*, TABLE_LIST*, HA_CHECK_OPT*), int (handler::*)(THD*, HA_CHECK_OPT*), int (*)(THD*, T"...
      #20 0x000055a46b943284 in Sql_cmd_check_table::execute (this=0x7f5c4c015300, thd=0x7f5c4c000d90) at /data/src/10.3/sql/sql_admin.cc:1386
              m_lex = 0x7f5c4c004b80
              first_table = 0x7f5c4c014c98
              lock_type = TL_READ_NO_INSERT
              res = true
              _db_stack_frame_ = {func = 0x55a46c3f22c8 "mysql_execute_command", file = 0x55a46c3f16a8 "/data/src/10.3/sql/sql_parse.cc", level = 2147483653, line = -1, prev = 0x7f5c900d3ed0}
      #21 0x000055a46b7c1aae in mysql_execute_command (thd=0x7f5c4c000d90) at /data/src/10.3/sql/sql_parse.cc:6075
              res = 0
              up_result = 0
              lex = 0x7f5c4c004b80
              select_lex = 0x7f5c4c0053d8
              first_table = 0x7f5c4c014c98
              all_tables = 0x7f5c4c014c98
              unit = 0x7f5c4c004c40
              have_table_map_for_update = false
              rpl_filter = 0x3886c374084
              _db_stack_frame_ = {func = 0x55a46c3f35a0 "mysql_parse", file = 0x55a46c3f16a8 "/data/src/10.3/sql/sql_parse.cc", level = 2147483652, line = -1, prev = 0x7f5c900d4400}
              __PRETTY_FUNCTION__ = "int mysql_execute_command(THD*)"
              orig_binlog_format = BINLOG_FORMAT_MIXED
              orig_current_stmt_binlog_format = BINLOG_FORMAT_STMT
      #22 0x000055a46b7c7090 in mysql_parse (thd=0x7f5c4c000d90, rawbuf=0x7f5c4c014bd8 "CHECK TABLE t", length=13, parser_state=0x7f5c900d45b0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7870
              found_semicolon = 0x0
              error = 32604
              lex = 0x7f5c4c004b80
              err = false
              _db_stack_frame_ = {func = 0x55a46c3f1b32 "dispatch_command", file = 0x55a46c3f16a8 "/data/src/10.3/sql/sql_parse.cc", level = 2147483651, line = -1, prev = 0x7f5c900d4590}
              __PRETTY_FUNCTION__ = "void mysql_parse(THD*, char*, uint, Parser_state*, bool, bool)"
      #23 0x000055a46b7b38c5 in dispatch_command (command=COM_QUERY, thd=0x7f5c4c000d90, packet=0x7f5c4c008f31 "", packet_length=13, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1852
              packet_end = 0x7f5c4c014be5 ""
              parser_state = {m_lip = {lookahead_token = -1, lookahead_yylval = 0x0, m_thd = 0x7f5c4c000d90, m_ptr = 0x7f5c4c014be6 "\004", m_tok_start = 0x7f5c4c014be6 "\004", m_tok_end = 0x7f5c4c014be6 "\004", m_end_of_query = 0x7f5c4c014be5 "", m_tok_start_prev = 0x7f5c4c014be5 "", m_buf = 0x7f5c4c014bd8 "CHECK TABLE t", m_buf_length = 13, m_echo = true, m_echo_saved = false, m_cpp_buf = 0x7f5c4c014c40 "CHECK TABLE t", m_cpp_ptr = 0x7f5c4c014c4d "", m_cpp_tok_start = 0x7f5c4c014c4d "", m_cpp_tok_start_prev = 0x7f5c4c014c4d "", m_cpp_tok_end = 0x7f5c4c014c4d "", m_body_utf8 = 0x0, m_body_utf8_ptr = 0x0, m_cpp_utf8_processed_ptr = 0x0, next_state = MY_LEX_END, found_semicolon = 0x0, ignore_space = false, stmt_prepare_mode = false, multi_statements = true, yylineno = 1, m_digest = 0x0, in_comment = NO_COMMENT, in_comment_saved = (unknown: 0x55a4), m_cpp_text_start = 0x7f5c4c014c4c "t", m_cpp_text_end = 0x7f5c4c014c4d "", m_underscore_cs = 0x0}, m_yacc = {yacc_yyss = 0x0, yacc_yyvs = 0x0, m_set_signal_info = {m_item = {0x0 <repeats 12 times>}}, m_lock_type = TL_UNLOCK, m_mdl_type = MDL_SHARED_READ}, m_digest_psi = 0x7f5c4c004658}
              net = 0x7f5c4c001098
              error = false
              do_end_of_statement = true
              _db_stack_frame_ = {func = 0x55a46c3f18bd "do_command", file = 0x55a46c3f16a8 "/data/src/10.3/sql/sql_parse.cc", level = 2147483650, line = -1, prev = 0x7f5c900d4df0}
              drop_more_results = false
              __PRETTY_FUNCTION__ = "bool dispatch_command(enum_server_command, THD*, char*, uint, bool, bool)"
              res = <optimized out>
      #24 0x000055a46b7b2283 in do_command (thd=0x7f5c4c000d90) at /data/src/10.3/sql/sql_parse.cc:1398
              return_value = false
              packet = 0x7f5c4c008f30 "\001"
              packet_length = 14
              net = 0x7f5c4c001098
              command = COM_QUERY
              _db_stack_frame_ = {func = 0x55a46c7737d0 "?func", file = 0x55a46c7737d6 "?file", level = 2147483649, line = -1, prev = 0x0}
              __PRETTY_FUNCTION__ = "bool do_command(THD*)"
      #25 0x000055a46b92f878 in do_handle_one_connection (connect=0x55a46e8e99d0) at /data/src/10.3/sql/sql_connect.cc:1403
              create_user = true
              thr_create_utime = 3194726050208
              thd = 0x7f5c4c000d90
      #26 0x000055a46b92f5e3 in handle_one_connection (arg=0x55a46e8e99d0) at /data/src/10.3/sql/sql_connect.cc:1308
              connect = 0x55a46e8e99d0
      #27 0x000055a46c2deb3a in pfs_spawn_thread (arg=0x55a46eb678d0) at /data/src/10.3/storage/perfschema/pfs.cc:1869
              typed_arg = 0x55a46eb678d0
              user_arg = 0x55a46e8e99d0
              user_start_routine = 0x55a46b92f5b3 <handle_one_connection(void*)>
              pfs = 0x7f5c933eea00
              klass = 0x55a46e812280
      #28 0x00007f5c9528eea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
              ret = <optimized out>
              pd = <optimized out>
              unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140035530512128, 7522617334601290763, 140732848819742, 140732848819743, 140035530510272, 311296, -7576017189692828661, -7576005882077441013}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
              not_first_call = 0
      #29 0x00007f5c951bedef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      No obvious problem on a non-debug build, other than the warnings upon INSERT (which are probably intended):

      Warnings:
      Warning	1815	Internal error: Indexed column test.t.a uses a collation that does not allow index-only access in secondary key and has reduced disk space efficiency in primary key.
      Warning	1815	Internal error: Indexed column test.t.a uses a collation that does not allow index-only access in secondary key and has reduced disk space efficiency in primary key.
      

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.