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

Server crash or assertion failure in myrocks::Rdb_key_def::unpack_simple_varchar_space_pad

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (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.11, 11.2(EOL), 11.4
    • 10.5, 10.6, 10.11, 11.4
    • None

    Description

      INSTALL SONAME 'ha_rocksdb';
       
      CREATE TABLE t1 (f1 VARCHAR(10), KEY(f1)) ENGINE=RocksDB;
      INSERT INTO t1 VALUES ("'q'"),("'s'");
       
      CREATE TABLE t2 (f2 INT) ENGINE=RocksDB;
      INSERT INTO t2 VALUES (1),(2);
       
      START TRANSACTION;
      UPDATE t1 SET f1 = NULL;
      UPDATE t2, t1 SET f2 = 3 WHERE f1 IS NULL;
      

      10.3 dd8833bf

      mysqld: /data/src/10.3/storage/rocksdb/rdb_datadic.cc:2881: static int myrocks::Rdb_key_def::unpack_simple_varchar_space_pad(myrocks::Rdb_field_packing*, Field*, uchar*, myrocks::Rdb_string_reader*, myrocks::Rdb_string_reader*): Assertion `unp_reader != nullptr' failed.
      221005  0:34:18 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fc413aec662 in __GI___assert_fail (assertion=0x7fc408867c00 "unp_reader != nullptr", file=0x7fc408864620 "/data/src/10.3/storage/rocksdb/rdb_datadic.cc", line=2881, function=0x7fc408867e20 "static int myrocks::Rdb_key_def::unpack_simple_varchar_space_pad(myrocks::Rdb_field_packing*, Field*, uchar*, myrocks::Rdb_string_reader*, myrocks::Rdb_string_reader*)") at assert.c:101
      #8  0x00007fc407d5fd1f in myrocks::Rdb_key_def::unpack_simple_varchar_space_pad (fpi=0x611000047588, field=0x61900009baf8, dst=0x61900009baba "", reader=0x7fc4091610e0, unp_reader=0x0) at /data/src/10.3/storage/rocksdb/rdb_datadic.cc:2881
      #9  0x00007fc407d4ae4c in myrocks::Rdb_convert_to_record_key_decoder::decode_field (fpi=0x611000047588, field=0x61900009baf8, reader=0x7fc4091610e0, default_value=0x61900009b6b9 "", unpack_reader=0x0) at /data/src/10.3/storage/rocksdb/rdb_datadic.cc:104
      #10 0x00007fc407d4b134 in myrocks::Rdb_convert_to_record_key_decoder::decode (buf=0x61900009bab8 "\376", offset=0x7fc4091611c0, fpi=0x611000047588, table=0x61f000046e88, field=0x61900009baf8, has_unpack_info=false, reader=0x7fc4091610e0, unpack_reader=0x7fc409161100) at /data/src/10.3/storage/rocksdb/rdb_datadic.cc:143
      #11 0x00007fc407d4c3c4 in myrocks::Rdb_key_field_iterator::next (this=0x7fc409161160) at /data/src/10.3/storage/rocksdb/rdb_datadic.cc:275
      #12 0x00007fc407d59598 in myrocks::Rdb_key_def::unpack_record (this=0x61500001c790, table=0x61f000046e88, buf=0x61900009bab8 "\376", packed_key=0x7fc4091612a0, unpack_info=0x7fc4091612c0, verify_row_debug_checksums=false) at /data/src/10.3/storage/rocksdb/rdb_datadic.cc:1673
      #13 0x00007fc407c0f2ce in myrocks::ha_rocksdb::secondary_index_read (this=0x61c0000428a8, keyno=0, buf=0x61900009bab8 "\376") at /data/src/10.3/storage/rocksdb/ha_rocksdb.cc:8318
      #14 0x00007fc407c16a35 in myrocks::ha_rocksdb::index_next_with_direction (this=0x61c0000428a8, buf=0x61900009bab8 "\376", move_forward=true) at /data/src/10.3/storage/rocksdb/ha_rocksdb.cc:9151
      #15 0x00007fc407c160f1 in myrocks::ha_rocksdb::index_next (this=0x61c0000428a8, buf=0x61900009bab8 "\376") at /data/src/10.3/storage/rocksdb/ha_rocksdb.cc:9096
      #16 0x00005620b8709918 in handler::index_next_same (this=0x61c0000428a8, buf=0x61900009bab8 "\376", key=0x62b000004f90 "\001", keylen=13) at /data/src/10.3/sql/handler.cc:4883
      #17 0x00005620b86fdd92 in handler::ha_index_next_same (this=0x61c0000428a8, buf=0x61900009bab8 "\376", key=0x62b000004f90 "\001", keylen=13) at /data/src/10.3/sql/handler.cc:3046
      #18 0x00005620b80c9ed0 in join_read_next_same (info=0x62b000004570) at /data/src/10.3/sql/sql_select.cc:20765
      #19 0x00005620b7e09db4 in READ_RECORD::read_record (this=0x62b000004570) at /data/src/10.3/sql/records.h:70
      #20 0x00005620b80c44d7 in sub_select (join=0x62b0000016e0, join_tab=0x62b0000044a8, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19951
      #21 0x00005620b80c58fe in evaluate_join_record (join=0x62b0000016e0, join_tab=0x62b000004118, error=0) at /data/src/10.3/sql/sql_select.cc:20159
      #22 0x00005620b80c4247 in sub_select (join=0x62b0000016e0, join_tab=0x62b000004118, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19932
      #23 0x00005620b80c2294 in do_select (join=0x62b0000016e0, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:19470
      #24 0x00005620b8056334 in JOIN::exec_inner (this=0x62b0000016e0) at /data/src/10.3/sql/sql_select.cc:4171
      #25 0x00005620b8053d05 in JOIN::exec (this=0x62b0000016e0) at /data/src/10.3/sql/sql_select.cc:3965
      #26 0x00005620b8057667 in mysql_select (thd=0x62a000060208, tables=0x62b000000350, wild_num=0, fields=..., conds=0x62b000001438, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=1342177408, result=0x62b0000015a0, unit=0x62a0000640c0, select_lex=0x62a000064880) at /data/src/10.3/sql/sql_select.cc:4374
      #27 0x00005620b823d7fe in mysql_multi_update (thd=0x62a000060208, table_list=0x62b000000350, fields=0x62a0000649a8, values=0x62a000064ed8, conds=0x62b000001438, options=0, handle_duplicates=DUP_ERROR, ignore=false, unit=0x62a0000640c0, select_lex=0x62a000064880, result=0x7fc409162180) at /data/src/10.3/sql/sql_update.cc:1824
      #28 0x00005620b7f94202 in mysql_execute_command (thd=0x62a000060208) at /data/src/10.3/sql/sql_parse.cc:4420
      #29 0x00005620b7fac608 in mysql_parse (thd=0x62a000060208, rawbuf=0x62b000000228 "UPDATE t2, t1 SET f2 = 3 WHERE f1 IS NULL", length=41, parser_state=0x7fc4091639d0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7855
      #30 0x00005620b7f83c56 in dispatch_command (command=COM_QUERY, thd=0x62a000060208, packet=0x6290000eb209 "UPDATE t2, t1 SET f2 = 3 WHERE f1 IS NULL", packet_length=41, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1852
      #31 0x00005620b7f8080e in do_command (thd=0x62a000060208) at /data/src/10.3/sql/sql_parse.cc:1398
      #32 0x00005620b8343336 in do_handle_one_connection (connect=0x608000000ea8) at /data/src/10.3/sql/sql_connect.cc:1403
      #33 0x00005620b8342c32 in handle_one_connection (arg=0x608000000ea8) at /data/src/10.3/sql/sql_connect.cc:1308
      #34 0x00005620b98ee29f in pfs_spawn_thread (arg=0x615000004408) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #35 0x00007fc413c97ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #36 0x00007fc413bb7aef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.3 dd8833bf non-debug

      #3  <signal handler called>
      #4  0x00007fdeafb3a39b in myrocks::Rdb_string_reader::read (size=<optimized out>, this=<optimized out>) at /data/src/10.3/storage/rocksdb/./././rdb_buff.h:284
      #5  myrocks::Rdb_string_reader::read_uint16 (res=<optimized out>, this=<optimized out>) at /data/src/10.3/storage/rocksdb/./././rdb_buff.h:306
      #6  myrocks::Rdb_key_def::unpack_simple_varchar_space_pad (fpi=0x7fdeb40ac0a8, field=0x7fdeb41535d8, dst=0x7fdeb41535aa "", reader=0x7fdec43c5730, unp_reader=0x0) at /data/src/10.3/storage/rocksdb/rdb_datadic.cc:2884
      #7  0x00007fdeafb3cd13 in myrocks::Rdb_convert_to_record_key_decoder::decode (buf=<optimized out>, offset=offset@entry=0x7fdec43c57d0, fpi=<optimized out>, table=0x7fdeb40d8e48, field=0x7fdeb41535d8, has_unpack_info=<optimized out>, reader=0x7fdec43c5730, unpack_reader=0x7fdec43c5740) at /data/src/10.3/storage/rocksdb/rdb_datadic.cc:143
      #8  0x00007fdeafb3eb72 in myrocks::Rdb_key_field_iterator::next (this=this@entry=0x7fdec43c5770) at /data/src/10.3/storage/rocksdb/rdb_datadic.cc:275
      #9  0x00007fdeafb3ecd8 in myrocks::Rdb_key_def::unpack_record (this=0x7fdeb4116800, table=<optimized out>, buf=buf@entry=0x7fdeb41535a8 "\376", packed_key=packed_key@entry=0x7fdec43c5870, unpack_info=unpack_info@entry=0x7fdec43c5880, verify_row_debug_checksums=<optimized out>) at /data/src/10.3/storage/rocksdb/rdb_datadic.cc:1673
      #10 0x00007fdeafaf8ab5 in myrocks::ha_rocksdb::secondary_index_read (buf=0x7fdeb41535a8 "\376", keyno=<optimized out>, this=0x7fdeb4170ca0) at /data/src/10.3/storage/rocksdb/ha_rocksdb.cc:8318
      #11 myrocks::ha_rocksdb::secondary_index_read (this=0x7fdeb4170ca0, keyno=<optimized out>, buf=0x7fdeb41535a8 "\376") at /data/src/10.3/storage/rocksdb/ha_rocksdb.cc:8288
      #12 0x00007fdeafaf9d72 in myrocks::ha_rocksdb::index_next_with_direction (move_forward=<optimized out>, buf=0x7fdeb41535a8 "\376", this=0x7fdeb4170ca0) at /data/src/10.3/storage/rocksdb/ha_rocksdb.cc:9151
      #13 myrocks::ha_rocksdb::index_next_with_direction (this=0x7fdeb4170ca0, buf=0x7fdeb41535a8 "\376", move_forward=true) at /data/src/10.3/storage/rocksdb/ha_rocksdb.cc:9121
      #14 0x00007fdeafaf9e07 in myrocks::ha_rocksdb::index_next (this=<optimized out>, buf=<optimized out>) at /data/src/10.3/storage/rocksdb/ha_rocksdb.cc:9096
      #15 0x00005588aed529ab in handler::index_next_same (this=0x7fdeb4170ca0, buf=0x7fdeb41535a8 "\376", key=0x7fdeb4014270 "\001", keylen=13) at /data/src/10.3/sql/handler.cc:4883
      #16 0x00005588aed5886a in handler::ha_index_next_same (this=0x7fdeb4170ca0, buf=0x7fdeb41535a8 "\376", key=0x7fdeb4014270 "\001", keylen=13) at /data/src/10.3/sql/handler.cc:3046
      #17 0x00005588aeba0f01 in join_read_next_same (info=<optimized out>) at /data/src/10.3/sql/sql_select.cc:20765
      #18 0x00005588aeb9377b in READ_RECORD::read_record (this=0x7fdeb4013868) at /data/src/10.3/sql/records.h:70
      #19 sub_select (end_of_records=false, join_tab=0x7fdeb40137a0, join=0x7fdeb4010b18) at /data/src/10.3/sql/sql_select.cc:19951
      #20 sub_select (join=0x7fdeb4010b18, join_tab=0x7fdeb40137a0, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19867
      #21 0x00005588aeb85f6c in evaluate_join_record (join=join@entry=0x7fdeb4010b18, join_tab=join_tab@entry=0x7fdeb4013410, error=<optimized out>) at /data/src/10.3/sql/sql_select.cc:20159
      #22 0x00005588aeb93743 in sub_select (end_of_records=false, join_tab=0x7fdeb4013410, join=0x7fdeb4010b18) at /data/src/10.3/sql/sql_select.cc:19932
      #23 sub_select (join=0x7fdeb4010b18, join_tab=0x7fdeb4013410, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19867
      #24 0x00005588aebbd6be in do_select (procedure=<optimized out>, join=0x7fdeb4010b18) at /data/src/10.3/sql/sql_select.cc:19470
      #25 JOIN::exec_inner (this=0x7fdeb4010b18) at /data/src/10.3/sql/sql_select.cc:4171
      #26 0x00005588aebbda33 in JOIN::exec (this=this@entry=0x7fdeb4010b18) at /data/src/10.3/sql/sql_select.cc:3965
      #27 0x00005588aebbdb8e in mysql_select (thd=thd@entry=0x7fdeb4000c48, tables=tables@entry=0x7fdeb400f858, wild_num=0, fields=..., conds=conds@entry=0x7fdeb40108b8, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=<optimized out>, result=0x7fdeb40109f8, unit=0x7fdeb4004940, select_lex=0x7fdeb4005100) at /data/src/10.3/sql/sql_select.cc:4374
      #28 0x00005588aec0efb5 in mysql_multi_update (thd=thd@entry=0x7fdeb4000c48, table_list=0x7fdeb400f858, fields=fields@entry=0x7fdeb4005228, values=values@entry=0x7fdeb4005758, conds=0x7fdeb40108b8, options=0, handle_duplicates=DUP_ERROR, ignore=false, unit=0x7fdeb4004940, select_lex=0x7fdeb4005100, result=0x7fdec43c5e60) at /data/src/10.3/sql/sql_update.cc:1824
      #29 0x00005588aeb58784 in mysql_execute_command (thd=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:4420
      #30 0x00005588aeb5e893 in mysql_parse (thd=0x7fdeb4000c48, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:7855
      #31 0x00005588aeb60945 in dispatch_command (command=COM_QUERY, thd=0x7fdeb4000c48, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_class.h:200
      #32 0x00005588aeb62d09 in do_command (thd=0x7fdeb4000c48) at /data/src/10.3/sql/sql_parse.cc:1398
      #33 0x00005588aec4c786 in do_handle_one_connection (connect=connect@entry=0x5588b2063198) at /data/src/10.3/sql/sql_connect.cc:1403
      #34 0x00005588aec4c95b in handle_one_connection (arg=arg@entry=0x5588b2063198) at /data/src/10.3/sql/sql_connect.cc:1308
      #35 0x00005588af21f512 in pfs_spawn_thread (arg=0x5588b2147008) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #36 0x00007fdeca562ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #37 0x00007fdeca482aef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Reproducible on all 10.3+.

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            elenst Elena Stepanova
            Votes:
            0 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.