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

Assertion `is_storage_available(tuple - packed_tuple, 0)' failed in myrocks::Rdb_key_def::pack_record upon INSERT into VARBINARY(0) or VARCHAR | heap-buffer-overflow on address from myrocks::Rdb_field_packing::fill_hidden_pk_val

Details

    Description

      INSTALL SONAME 'ha_rocksdb';
       
      CREATE TABLE t1 (a VARBINARY(0), KEY(a)) ENGINE=RocksDB;
      INSERT IGNORE INTO t1 VALUES (1);
      

      10.2 3ce49a0a

      mysqld: /data/src/10.2/storage/rocksdb/rdb_datadic.cc:1443: uint myrocks::Rdb_key_def::pack_record(const TABLE*, uchar*, const uchar*, uchar*, myrocks::Rdb_string_writer*, bool, longlong, uint, uint*, const char*) const: Assertion `is_storage_available(tuple - packed_tuple, 0)' failed.
      200221 15:48:42 [ERROR] mysqld got signal 6 ;
       
      #6  0x00007f0977f1fe67 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x7f0931ac9c70 "is_storage_available(tuple - packed_tuple, 0)", file=file@entry=0x7f0931ac9688 "/data/src/10.2/storage/rocksdb/rdb_datadic.cc", line=line@entry=1443, function=function@entry=0x7f0931acb860 <myrocks::Rdb_key_def::pack_record(TABLE const*, unsigned char*, unsigned char const*, unsigned char*, myrocks::Rdb_string_writer*, bool, long long, unsigned int, unsigned int*, char const*) const::__PRETTY_FUNCTION__> "uint myrocks::Rdb_key_def::pack_record(const TABLE*, uchar*, const uchar*, uchar*, myrocks::Rdb_string_writer*, bool, longlong, uint, uint*, const char*) const") at assert.c:92
      #7  0x00007f0977f1ff12 in __GI___assert_fail (assertion=0x7f0931ac9c70 "is_storage_available(tuple - packed_tuple, 0)", file=0x7f0931ac9688 "/data/src/10.2/storage/rocksdb/rdb_datadic.cc", line=1443, function=0x7f0931acb860 <myrocks::Rdb_key_def::pack_record(TABLE const*, unsigned char*, unsigned char const*, unsigned char*, myrocks::Rdb_string_writer*, bool, long long, unsigned int, unsigned int*, char const*) const::__PRETTY_FUNCTION__> "uint myrocks::Rdb_key_def::pack_record(const TABLE*, uchar*, const uchar*, uchar*, myrocks::Rdb_string_writer*, bool, longlong, uint, uint*, const char*) const") at assert.c:101
      #8  0x00007f09316c274f in myrocks::Rdb_key_def::pack_record (this=0x7f0914050c50, tbl=0x7f0914055a70, pack_buffer=0x7f09140576d0 '\245' <repeats 16 times>, "h4z\025\217\217\217\217\225", record=0x7f0914056680 "\376", packed_tuple=0x7f091405ec90 "", unpack_info=0x7f0914057018, should_store_row_debug_checksums=false, hidden_pk_id=1, n_key_parts=2, n_null_fields=0x0, ttl_bytes=0x7f0914057841 '\217' <repeats 15 times>, "\020y\005\024\t\177") at /data/src/10.2/storage/rocksdb/rdb_datadic.cc:1443
      #9  0x00007f093163e57a in myrocks::ha_rocksdb::update_write_sk (this=0x7f0914056ad8, table_arg=0x7f0914055a70, kd=..., row_info=..., bulk_load_sk=false) at /data/src/10.2/storage/rocksdb/ha_rocksdb.cc:10141
      #10 0x00007f093163ea6c in myrocks::ha_rocksdb::update_write_indexes (this=0x7f0914056ad8, row_info=..., pk_changed=false) at /data/src/10.2/storage/rocksdb/ha_rocksdb.cc:10241
      #11 0x00007f093163ed28 in myrocks::ha_rocksdb::update_write_row (this=0x7f0914056ad8, old_data=0x0, new_data=0x7f0914056680 "\376", skip_unique_check=false) at /data/src/10.2/storage/rocksdb/ha_rocksdb.cc:10324
      #12 0x00007f093163ca7c in myrocks::ha_rocksdb::write_row (this=0x7f0914056ad8, buf=0x7f0914056680 "\376") at /data/src/10.2/storage/rocksdb/ha_rocksdb.cc:9533
      #13 0x0000561d839cf5a8 in handler::ha_write_row (this=0x7f0914056ad8, buf=0x7f0914056680 "\376") at /data/src/10.2/sql/handler.cc:6089
      #14 0x0000561d8371ea0a in write_record (thd=0x7f0914000af0, table=0x7f0914055a70, info=0x7f097567a530) at /data/src/10.2/sql/sql_insert.cc:1941
      #15 0x0000561d8371c4a2 in mysql_insert (thd=0x7f0914000af0, table_list=0x7f0914012328, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=true) at /data/src/10.2/sql/sql_insert.cc:1066
      #16 0x0000561d83743515 in mysql_execute_command (thd=0x7f0914000af0) at /data/src/10.2/sql/sql_parse.cc:4166
      #17 0x0000561d8374ecba in mysql_parse (thd=0x7f0914000af0, rawbuf=0x7f0914012238 "INSERT IGNORE INTO t1 VALUES (1)", length=32, parser_state=0x7f097567b250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7739
      #18 0x0000561d8373d013 in dispatch_command (command=COM_QUERY, thd=0x7f0914000af0, packet=0x7f0914066ca1 "INSERT IGNORE INTO t1 VALUES (1)", packet_length=32, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1831
      #19 0x0000561d8373b967 in do_command (thd=0x7f0914000af0) at /data/src/10.2/sql/sql_parse.cc:1384
      #20 0x0000561d838909a3 in do_handle_one_connection (connect=0x561d871f0cf0) at /data/src/10.2/sql/sql_connect.cc:1336
      #21 0x0000561d8389070e in handle_one_connection (arg=0x561d871f0cf0) at /data/src/10.2/sql/sql_connect.cc:1241
      #22 0x00007f0979ea84a4 in start_thread (arg=0x7f097567c700) at pthread_create.c:456
      #23 0x00007f0977fdcd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible on 10.2-10.5.
      No obvious problem on a non-debug build.

      Attachments

        Issue Links

          Activity

            Roel Roel Van de Paar added a comment - - edited

            Full report for first testcase (looped twice to ensure crashes).

            INSTALL SONAME 'ha_rocksdb';
            DROP DATABASE test;
            CREATE DATABASE test;
            USE test;
            CREATE TABLE t1 (a VARBINARY(0), KEY(a)) ENGINE=RocksDB;
            INSERT IGNORE INTO t1 VALUES (1);
            INSTALL SONAME 'ha_rocksdb';
            DROP DATABASE test;
            CREATE DATABASE test;
            USE test;
            CREATE TABLE t1 (a VARBINARY(0), KEY(a)) ENGINE=RocksDB;
            INSERT IGNORE INTO t1 VALUES (1);
            

            Leads to:

            10.7.0 d552e092c9f3e20da078d1b62b976f629f73d3a4 (Debug)

            mysqld: /test/10.7_dbg/storage/rocksdb/rdb_datadic.cc:1447: uint myrocks::Rdb_key_def::pack_record(const TABLE*, uchar*, const uchar*, uchar*, myrocks::Rdb_string_writer*, bool, longlong, uint, uint*, const char*) const: Assertion `is_storage_available(tuple - packed_tuple, 0)' failed.
            

            10.7.0 d552e092c9f3e20da078d1b62b976f629f73d3a4 (Debug)

            Core was generated by `/test/MD180921-mariadb-10.7.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            [Current thread is 1 (Thread 0x152e18506700 (LWP 1551416))]
            (gdb) bt
            #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #1  0x0000152e2e395859 in __GI_abort () at abort.c:79
            #2  0x0000152e2e395729 in __assert_fail_base (fmt=0x152e2e52b588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x152e09ebf910 "is_storage_available(tuple - packed_tuple, 0)", file=0x152e09ebea70 "/test/10.7_dbg/storage/rocksdb/rdb_datadic.cc", line=1447, function=<optimized out>) at assert.c:92
            #3  0x0000152e2e3a6f36 in __GI___assert_fail (assertion=assertion@entry=0x152e09ebf910 "is_storage_available(tuple - packed_tuple, 0)", file=file@entry=0x152e09ebea70 "/test/10.7_dbg/storage/rocksdb/rdb_datadic.cc", line=line@entry=1447, function=function@entry=0x152e09ec0580 "uint myrocks::Rdb_key_def::pack_record(const TABLE*, uchar*, const uchar*, uchar*, myrocks::Rdb_string_writer*, bool, longlong, uint, uint*, const char*) const") at assert.c:101
            #4  0x0000152e09b7b626 in myrocks::Rdb_key_def::pack_record (this=this@entry=0x152de02cded0, tbl=tbl@entry=0x152de025e668, pack_buffer=0x152de02d33e8 '\245' <repeats 16 times>, "h4z\025", record=0x152de02653b8 "\376", packed_tuple=0x152de0243b38 "", unpack_info=unpack_info@entry=0x152de0265e28, should_store_row_debug_checksums=false, hidden_pk_id=1, n_key_parts=2, n_null_fields=0x0, ttl_bytes=0x152de026f901 "\240\253R\362U") at /test/10.7_dbg/storage/rocksdb/./rdb_datadic.h:773
            #5  0x0000152e09b3eda2 in myrocks::ha_rocksdb::update_write_sk (this=this@entry=0x152de0265840, table_arg=0x152de025e668, kd=@0x152de02cded0: {static CF_FLAGS_TO_IGNORE = 4, m_index_number = 256, m_index_number_storage_form = "\000\000\001", m_cf_handle = 0x152de021df30, m_index_dict_version = 6, m_index_type = 2 '\002', m_kv_format_version = 13, m_is_reverse_cf = false, m_is_per_partition_cf = false, m_name = "a", m_stats = {m_gl_index_id = {cf_id = 0, index_id = 0}, m_data_size = 0, m_rows = 0, m_actual_disk_size = 0, m_entry_deletes = 0, m_entry_single_deletes = 0, m_entry_merges = 0, m_entry_others = 0, m_distinct_keys_per_prefix = std::vector of length 2, capacity 2 = {0, 0}, m_name = ""}, m_index_flags_bitmap = 0, m_total_index_flags_length = 0, m_ttl_rec_offset = 4294967295, m_ttl_duration = 0, m_ttl_column = "", m_pk_key_parts = 1, m_pk_part_no = 0x55f2563aafe8, m_pack_info = 0x152de0013868, m_keyno = 0, m_key_parts = 2, m_ttl_pk_key_part_offset = 4294967295, m_ttl_field_index = 4294967295, m_prefix_extractor = std::shared_ptr<const class rocksdb::SliceTransform> (empty) = {
                    get() = 0x0
                  }, m_maxlength = 13, m_mutex = {m_mutex = {global = pthread_mutex_t = {
                        Type = Error check,
                        Status = Not acquired,
                        Robust = No,
                        Shared = No,
                        Protocol = None
                      }, mutex = pthread_mutex_t = {
                        Type = Adaptive,
                        Status = Not acquired,
                        Robust = No,
                        Shared = No,
                        Protocol = None
                      }, file = 0x152e09ebea70 "/test/10.7_dbg/storage/rocksdb/rdb_datadic.cc", name = 0x152e09eb8d33 "m_mutex", line = 406, count = 0, create_flags = 0, active_flags = 0, id = 219, thread = 0, locked_mutex = 0x152de026dcd8, used_mutex = 0x152de026dd48, prev = 0x0, next = 0x0}, m_psi = 0x0}}, row_info=@0x152e18504970: {tx = 0x152de027d900, new_data = 0x152de02653b8 "\376", old_data = 0x0, new_pk_slice = {data_ = 0x152de0240888 "", size_ = 12}, old_pk_slice = {data_ = 0x152e09f05fe0 "", size_ = 0}, old_pk_rec = {data_ = 0x152e09f05fe0 "", size_ = 0}, new_pk_unpack_info = 0x0, hidden_pk_id = 1, skip_unique_check = false}, bulk_load_sk=bulk_load_sk@entry=false) at /test/10.7_dbg/storage/rocksdb/ha_rocksdb.cc:10206
            #6  0x0000152e09b3f627 in myrocks::ha_rocksdb::update_write_indexes (this=this@entry=0x152de0265840, row_info=@0x152e18504970: {tx = 0x152de027d900, new_data = 0x152de02653b8 "\376", old_data = 0x0, new_pk_slice = {data_ = 0x152de0240888 "", size_ = 12}, old_pk_slice = {data_ = 0x152e09f05fe0 "", size_ = 0}, old_pk_rec = {data_ = 0x152e09f05fe0 "", size_ = 0}, new_pk_unpack_info = 0x0, hidden_pk_id = 1, skip_unique_check = false}, pk_changed=pk_changed@entry=false) at /usr/include/c++/9/bits/shared_ptr_base.h:1309
            #7  0x0000152e09b3f866 in myrocks::ha_rocksdb::update_write_row (this=this@entry=0x152de0265840, old_data=old_data@entry=0x0, new_data=new_data@entry=0x152de02653b8 "\376", skip_unique_check=<optimized out>) at /test/10.7_dbg/storage/rocksdb/ha_rocksdb.cc:10390
            #8  0x0000152e09b3faa4 in myrocks::ha_rocksdb::write_row (this=0x152de0265840, buf=0x152de02653b8 "\376") at /test/10.7_dbg/storage/rocksdb/ha_rocksdb.cc:9590
            #9  0x000055f252cdd7b7 in handler::ha_write_row (this=0x152de0265840, buf=0x152de02653b8 "\376") at /test/10.7_dbg/sql/handler.cc:7516
            #10 0x000055f2529823da in write_record (thd=thd@entry=0x152de0000db8, table=table@entry=0x152de025e668, info=info@entry=0x152e18504cc0, sink=sink@entry=0x0) at /test/10.7_dbg/sql/sql_insert.cc:2136
            #11 0x000055f25298e028 in mysql_insert (thd=thd@entry=0x152de0000db8, table_list=0x152de0013d58, fields=@0x152de0005fb8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55f253fc84a0 <end_of_list>, last = 0x152de0005fb8, elements = 0}, <No data fields>}, values_list=@0x152de0006000: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x152de0014960, last = 0x152de0014960, elements = 1}, <No data fields>}, update_fields=@0x152de0005fe8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55f253fc84a0 <end_of_list>, last = 0x152de0005fe8, elements = 0}, <No data fields>}, update_values=@0x152de0005fd0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55f253fc84a0 <end_of_list>, last = 0x152de0005fd0, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=true, result=0x0) at /test/10.7_dbg/sql/sql_insert.cc:1124
            #12 0x000055f2529d4112 in mysql_execute_command (thd=thd@entry=0x152de0000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.7_dbg/sql/sql_parse.cc:4563
            #13 0x000055f2529bed4b in mysql_parse (thd=thd@entry=0x152de0000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x152e18505400) at /test/10.7_dbg/sql/sql_parse.cc:8028
            #14 0x000055f2529cd944 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x152de0000db8, packet=packet@entry=0x152de000b729 "INSERT IGNORE INTO t1 VALUES (1)", packet_length=packet_length@entry=32, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_class.h:1358
            #15 0x000055f2529d0d4a in do_command (thd=0x152de0000db8, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_parse.cc:1402
            #16 0x000055f252b46ed8 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55f2569ad068, put_in_cache=put_in_cache@entry=true) at /test/10.7_dbg/sql/sql_connect.cc:1418
            #17 0x000055f252b474dd in handle_one_connection (arg=arg@entry=0x55f2569ad068) at /test/10.7_dbg/sql/sql_connect.cc:1312
            #18 0x000055f252fb047e in pfs_spawn_thread (arg=0x55f2568ac2b8) at /test/10.7_dbg/storage/perfschema/pfs.cc:2201
            #19 0x0000152e2e8a4609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #20 0x0000152e2e492293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            10.2.41 (Optimized)

            Core was generated by `/test/MD180921-mariadb-10.2.41-linux-x86_64-opt/bin/mysqld --no-defaults --core'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
                at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            [Current thread is 1 (Thread 0x14aaa089a700 (LWP 3314512))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            #1  0x000055560dca87bf in my_write_core (sig=sig@entry=6) at /test/10.2_opt/mysys/stacktrace.c:382
            #2  0x000055560d74d878 in handle_fatal_signal (sig=6) at /test/10.2_opt/sql/signal_handler.cc:355
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #5  0x000014aad316e859 in __GI_abort () at abort.c:79
            #6  0x000014aad31d93ee in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x14aad3303285 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
            #7  0x000014aad31e147c in malloc_printerr (str=str@entry=0x14aad3305600 "free(): invalid next size (fast)") at malloc.c:5347
            #8  0x000014aad31e2d2c in _int_free (av=0x14aa74000020, p=0x14aa74210fb0, have_lock=0) at malloc.c:4249
            #9  0x000014aaa2f654fe in __gnu_cxx::new_allocator<long>::deallocate (this=0x14aa742b5568, __p=<optimized out>) at /usr/include/c++/9/ext/new_allocator.h:119
            #10 std::allocator_traits<std::allocator<long> >::deallocate (__a=@0x14aa742b5568: {<__gnu_cxx::new_allocator<long>> = {<No data fields>}, <No data fields>}, __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/9/bits/alloc_traits.h:470
            #11 std::_Vector_base<long, std::allocator<long> >::_M_deallocate (this=0x14aa742b5568, __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:351
            #12 std::_Vector_base<long, std::allocator<long> >::~_Vector_base (this=0x14aa742b5568, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:332
            #13 std::vector<long, std::allocator<long> >::~vector (this=0x14aa742b5568, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:680
            #14 myrocks::Rdb_index_stats::~Rdb_index_stats (this=0x14aa742b5528, __in_chrg=<optimized out>) at /test/10.2_opt/storage/rocksdb/././properties_collector.h:47
            #15 myrocks::Rdb_key_def::~Rdb_key_def (this=0x14aa742b54f0, __in_chrg=<optimized out>) at /test/10.2_opt/storage/rocksdb/rdb_datadic.cc:381
            #16 0x000014aaa2f6e7ad in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x14aa742b54e0) at /usr/include/c++/9/bits/shared_ptr_base.h:148
            #17 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x14aa742b54e0) at /usr/include/c++/9/bits/shared_ptr_base.h:148
            #18 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=<optimized out>, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/shared_ptr_base.h:730
            #19 std::__shared_ptr<myrocks::Rdb_key_def, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=<optimized out>, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/shared_ptr_base.h:1169
            #20 std::__shared_ptr<myrocks::Rdb_key_def, (__gnu_cxx::_Lock_policy)2>::operator= (__r=<optimized out>, this=<optimized out>) at /usr/include/c++/9/bits/shared_ptr_base.h:1265
            #21 std::shared_ptr<myrocks::Rdb_key_def>::operator= (__r=<optimized out>, this=<optimized out>) at /usr/include/c++/9/bits/shared_ptr.h:335
            #22 myrocks::Rdb_tbl_def::~Rdb_tbl_def (this=0x14aa7420edd0, __in_chrg=<optimized out>) at /test/10.2_opt/storage/rocksdb/rdb_datadic.cc:3512
            #23 0x000014aaa2f714df in myrocks::Rdb_ddl_manager::remove (this=this@entry=0x14aaa33f2200 <myrocks::ddl_manager>, tbl=tbl@entry=0x14aa7420edd0, batch=batch@entry=0x14aa5001e9b0, lock=lock@entry=true) at /test/10.2_opt/storage/rocksdb/rdb_datadic.cc:4388
            #24 0x000014aaa2f1d342 in myrocks::ha_rocksdb::delete_table (this=0x14aa5000fc08, tbl=0x14aa7420edd0) at /test/10.2_opt/storage/rocksdb/ha_rocksdb.cc:11626
            #25 0x000055560d755c9d in ha_delete_table (thd=thd@entry=0x14aa50000c48, table_type=<optimized out>, path=path@entry=0x14aaa08973d0 "./test/t1", db=db@entry=0x14aa5000f368 "test", alias=0x14aa5000f380 "t1", generate_warning=generate_warning@entry=false) at /test/10.2_opt/sql/handler.cc:2443
            #26 0x000055560d625e27 in mysql_rm_table_no_locks (thd=thd@entry=0x14aa50000c48, tables=tables@entry=0x14aa5000f388, if_exists=if_exists@entry=true, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=true, dont_log_query=dont_log_query@entry=true, dont_free_locks=<optimized out>) at /test/10.2_opt/sql/sql_table.cc:2451
            #27 0x000055560d5726d4 in mysql_rm_db_internal (thd=0x14aa50000c48, db=0x14aa5000f368 "test", if_exists=<optimized out>, silent=<optimized out>) at /test/10.2_opt/sql/sql_db.cc:919
            #28 0x000055560d59d67c in mysql_execute_command (thd=<optimized out>) at /test/10.2_opt/sql/structs.h:530
            #29 0x000055560d5a345a in mysql_parse (thd=thd@entry=0x14aa50000c48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14aaa0899560, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.2_opt/sql/sql_parse.cc:7793
            #30 0x000055560d5a641d in dispatch_command (command=COM_QUERY, thd=0x14aa50000c48, packet=0x14aa50006fb9 "DROP DATABASE test", packet_length=18, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.2_opt/sql/sql_class.h:1109
            #31 0x000055560d5a785d in do_command (thd=0x14aa50000c48) at /test/10.2_opt/sql/sql_parse.cc:1381
            #32 0x000055560d6806c6 in do_handle_one_connection (connect=connect@entry=0x5556104ef4d8) at /test/10.2_opt/sql/sql_connect.cc:1336
            #33 0x000055560d68083f in handle_one_connection (arg=0x5556104ef4d8) at /test/10.2_opt/sql/sql_connect.cc:1241
            #34 0x000014aad3677609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #35 0x000014aad326b293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            10.3.32 b112c9dfaacbcb7c3548414c6f402114663223dc (Optimized)

            Core was generated by `/test/MD180921-mariadb-10.3.32-linux-x86_64-opt/bin/mysqld --no-defaults --core'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            [Current thread is 1 (Thread 0x151bdc0a1700 (LWP 1585888))]
            (gdb) bt
            #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #1  0x0000151bdda8e859 in __GI_abort () at abort.c:79
            #2  0x0000151bddaf93ee in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x151bddc23285 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
            #3  0x0000151bddb0147c in malloc_printerr (str=str@entry=0x151bddc2143a "corrupted size vs. prev_size") at malloc.c:5347
            #4  0x0000151bddb01aeb in unlink_chunk (p=p@entry=0x151b80226f50, av=0x151b80000020) at malloc.c:1454
            #5  0x0000151bddb0300b in _int_free (av=0x151b80000020, p=0x151b80226e40, have_lock=<optimized out>, have_lock@entry=0) at malloc.c:4342
            #6  0x0000151bddb06a0d in __GI___libc_free (mem=0x151b80226e50) at malloc.c:3125
            #7  tcache_thread_shutdown () at malloc.c:2964
            #8  __malloc_arena_thread_freeres () at arena.c:951
            #9  0x0000151bddb0b220 in __libc_thread_freeres () at thread-freeres.c:38
            #10 0x0000151bddc6462f in start_thread (arg=<optimized out>) at pthread_create.c:491
            #11 0x0000151bddb8b293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            10.4.22 03a10706ecfa5cf0a6252d436e341483f5c0827c (Optimized)

            Core was generated by `/test/MD180921-mariadb-10.4.22-linux-x86_64-opt/bin/mysqld --no-defaults --core'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            [Current thread is 1 (Thread 0x14fe9406e700 (LWP 3210537))]
            (gdb) bt
            #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #1  0x000014fe9721f859 in __GI_abort () at abort.c:79
            #2  0x000014fe9728a3ee in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x14fe973b4285 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
            #3  0x000014fe9729247c in malloc_printerr (str=str@entry=0x14fe973b6600 "free(): invalid next size (fast)") at malloc.c:5347
            #4  0x000014fe97293d2c in _int_free (av=0x14fe2c000020, p=0x14fe2c20f0d0, have_lock=0) at malloc.c:4249
            #5  0x000014fe4b91fe24 in __gnu_cxx::new_allocator<std::shared_ptr<rocksdb::EventListener> >::deallocate (this=0x14fe94068980, __p=<optimized out>) at /usr/include/c++/9/ext/new_allocator.h:119
            #6  std::allocator_traits<std::allocator<std::shared_ptr<rocksdb::EventListener> > >::deallocate (__a=@0x14fe94068980: {<__gnu_cxx::new_allocator<std::shared_ptr<rocksdb::EventListener> >> = {<No data fields>}, <No data fields>}, __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/9/bits/alloc_traits.h:470
            #7  std::_Vector_base<std::shared_ptr<rocksdb::EventListener>, std::allocator<std::shared_ptr<rocksdb::EventListener> > >::_M_deallocate (this=0x14fe94068980, __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:351
            #8  std::_Vector_base<std::shared_ptr<rocksdb::EventListener>, std::allocator<std::shared_ptr<rocksdb::EventListener> > >::~_Vector_base (this=0x14fe94068980, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:332
            #9  std::vector<std::shared_ptr<rocksdb::EventListener>, std::allocator<std::shared_ptr<rocksdb::EventListener> > >::~vector (this=0x14fe94068980, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:680
            #10 rocksdb::DBOptions::~DBOptions (this=0x14fe940687c0, __in_chrg=<optimized out>) at /test/10.4_opt/storage/rocksdb/rocksdb/include/rocksdb/options.h:350
            #11 0x000014fe4b97a904 in rocksdb::DBImpl::GetOptions (this=0x14fe2c200e10, column_family=<optimized out>) at /usr/include/c++/9/ext/atomicity.h:96
            #12 0x000014fe4b94fcd3 in rocksdb::StackableDB::GetOptions (column_family=<optimized out>, this=<optimized out>) at /test/10.4_opt/storage/rocksdb/rocksdb/include/rocksdb/utilities/stackable_db.h:308
            #13 myrocks::Rdb_key_def::setup (this=0x14fe2c217dd0, tbl=tbl@entry=0x14fe94069890, tbl_def=tbl_def@entry=0x14fe2c257960) at /test/10.4_opt/storage/rocksdb/rdb_datadic.cc:582
            #14 0x000014fe4b903272 in myrocks::ha_rocksdb::create_key_def (this=<optimized out>, table_arg=0x14fe94069890, i=1, tbl_def_arg=0x14fe2c257960, new_key_def=0x14fe2c2186d8, cf_info=<optimized out>, ttl_duration=0, ttl_column="") at /test/10.4_opt/storage/rocksdb/ha_rocksdb.cc:7515
            #15 0x000014fe4b91144c in myrocks::ha_rocksdb::create_key_defs (this=0x14fe2c259fe0, table_arg=0x14fe94069890, tbl_def_arg=0x14fe2c257960, old_table_arg=0x0, old_tbl_def_arg=0x0) at /usr/include/c++/9/array:185
            #16 0x000014fe4b9116ac in myrocks::ha_rocksdb::create_table (this=0x14fe2c259fe0, table_name=<optimized out>, table_arg=0x14fe94069890, auto_increment_value=<optimized out>) at /test/10.4_opt/storage/rocksdb/ha_rocksdb.cc:7693
            #17 0x000014fe4b911bae in myrocks::ha_rocksdb::create (this=0x14fe2c259fe0, name=0x14fe9406b570 "./test/t1", table_arg=0x14fe94069890, create_info=0x14fe9406b940) at /test/10.4_opt/storage/rocksdb/ha_rocksdb.cc:7839
            #18 0x0000556a28a03cf4 in handler::ha_create (this=<optimized out>, name=<optimized out>, form=0x14fe94069890, info_arg=0x14fe9406b940) at /test/10.4_opt/sql/handler.cc:4804
            #19 0x0000556a28a0469a in ha_create_table (thd=thd@entry=0x14fe2c000c48, path=path@entry=0x14fe9406b570 "./test/t1", db=0x14fe2c0107e0 "test", table_name=0x14fe2c0100e0 "t1", create_info=create_info@entry=0x14fe9406b940, frm=frm@entry=0x14fe9406b560) at /test/10.4_opt/sql/handler.cc:5269
            #20 0x0000556a28873169 in create_table_impl (thd=thd@entry=0x14fe2c000c48, orig_db=@0x14fe2c010130: {str = 0x14fe2c0107e0 "test", length = 4}, orig_table_name=@0x14fe2c010140: {str = 0x14fe2c0100e0 "t1", length = 2}, db=@0x14fe2c010130: {str = 0x14fe2c0107e0 "test", length = 4}, table_name=@0x14fe2c010140: {str = 0x14fe2c0100e0 "t1", length = 2}, path=path@entry=0x14fe9406b570 "./test/t1", options={m_options = DDL_options_st::OPT_NONE}, create_info=0x14fe9406b940, alter_info=0x14fe9406b880, create_table_mode=0, is_trans=0x14fe9406b7f7, key_info=0x14fe9406b558, key_count=0x14fe9406b554, frm=0x14fe9406b560) at /test/10.4_opt/sql/sql_table.cc:5152
            #21 0x0000556a2887359f in mysql_create_table_no_lock (thd=thd@entry=0x14fe2c000c48, db=db@entry=0x14fe2c010130, table_name=table_name@entry=0x14fe2c010140, create_info=create_info@entry=0x14fe9406b940, alter_info=0x14fe9406b880, is_trans=is_trans@entry=0x14fe9406b7f7, create_table_mode=0, table_list=0x14fe2c010118) at /test/10.4_opt/sql/sql_table.cc:5236
            #22 0x0000556a288737eb in mysql_create_table (thd=thd@entry=0x14fe2c000c48, create_table=create_table@entry=0x14fe2c010118, create_info=create_info@entry=0x14fe9406b940, alter_info=alter_info@entry=0x14fe9406b880) at /test/10.4_opt/sql/sql_table.cc:5331
            #23 0x0000556a28874bc4 in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x14fe2c000c48) at /test/10.4_opt/sql/sql_table.cc:11593
            #24 0x0000556a287cd700 in mysql_execute_command (thd=0x14fe2c000c48) at /test/10.4_opt/sql/sql_parse.cc:6192
            #25 0x0000556a287d47e7 in mysql_parse (thd=0x14fe2c000c48, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.4_opt/sql/sql_parse.cc:7995
            #26 0x0000556a287d6c9d in dispatch_command (command=COM_QUERY, thd=0x14fe2c000c48, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.4_opt/sql/sql_class.h:1201
            #27 0x0000556a287d8e6e in do_command (thd=0x14fe2c000c48) at /test/10.4_opt/sql/sql_parse.cc:1373
            #28 0x0000556a288cd50e in do_handle_one_connection (connect=connect@entry=0x556a2bbf86a8) at /test/10.4_opt/sql/sql_connect.cc:1420
            #29 0x0000556a288cd63f in handle_one_connection (arg=0x556a2bbf86a8) at /test/10.4_opt/sql/sql_connect.cc:1316
            #30 0x000014fe9772e609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #31 0x000014fe9731c293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            10.5.13 c430aa72abbdccb1ece7f0d65b49a6b48e7c5ba7 (Optimized)

            Core was generated by `/test/MD180921-mariadb-10.5.13-linux-x86_64-opt/bin/mysqld --no-defaults --core'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            [Current thread is 1 (Thread 0x14561811d700 (LWP 1579833))]
            (gdb) bt
            #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #1  0x0000145619769859 in __GI_abort () at abort.c:79
            #2  0x00001456197d43ee in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x1456198fe285 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
            #3  0x00001456197dc47c in malloc_printerr (str=str@entry=0x145619900600 "free(): invalid next size (fast)") at malloc.c:5347
            #4  0x00001456197ddd2c in _int_free (av=0x1455c8000020, p=0x1455c8079500, have_lock=0) at malloc.c:4249
            #5  0x00001455f4f16e69 in __gnu_cxx::new_allocator<int>::deallocate (this=0x145618119318, __p=<optimized out>) at /usr/include/c++/9/ext/new_allocator.h:119
            #6  std::allocator_traits<std::allocator<int> >::deallocate (__a=@0x145618119318: {<__gnu_cxx::new_allocator<int>> = {<No data fields>}, <No data fields>}, __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/9/bits/alloc_traits.h:470
            #7  std::_Vector_base<int, std::allocator<int> >::_M_deallocate (this=0x145618119318, __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:351
            #8  std::_Vector_base<int, std::allocator<int> >::~_Vector_base (this=0x145618119318, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:332
            #9  std::vector<int, std::allocator<int> >::~vector (this=0x145618119318, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:680
            #10 rocksdb::AdvancedColumnFamilyOptions::~AdvancedColumnFamilyOptions (this=0x145618119270, __in_chrg=<optimized out>) at /test/10.5_opt/storage/rocksdb/rocksdb/include/rocksdb/advanced_options.h:154
            #11 rocksdb::ColumnFamilyOptions::~ColumnFamilyOptions (this=0x145618119270, __in_chrg=<optimized out>) at /test/10.5_opt/storage/rocksdb/rocksdb/include/rocksdb/options.h:84
            #12 0x00001455f4f71130 in rocksdb::DBImpl::GetOptions (this=0x1455c8201940, column_family=<optimized out>) at /usr/include/c++/9/ext/atomicity.h:96
            #13 0x00001455f4f465c3 in rocksdb::StackableDB::GetOptions (column_family=<optimized out>, this=<optimized out>) at /test/10.5_opt/storage/rocksdb/rocksdb/include/rocksdb/utilities/stackable_db.h:308
            #14 myrocks::Rdb_key_def::setup (this=0x1455c82337f0, tbl=tbl@entry=0x14561811a5a0, tbl_def=tbl_def@entry=0x1455c8234060) at /test/10.5_opt/storage/rocksdb/rdb_datadic.cc:583
            #15 0x00001455f4ef9842 in myrocks::ha_rocksdb::create_key_def (this=<optimized out>, table_arg=0x14561811a5a0, i=0, tbl_def_arg=0x1455c8234060, new_key_def=0x1455c82b8e08, cf_info=<optimized out>, ttl_duration=0, ttl_column="") at /test/10.5_opt/storage/rocksdb/ha_rocksdb.cc:7534
            #16 0x00001455f4f07adc in myrocks::ha_rocksdb::create_key_defs (this=0x1455c82140f0, table_arg=0x14561811a5a0, tbl_def_arg=0x1455c8234060, old_table_arg=0x0, old_tbl_def_arg=0x0) at /usr/include/c++/9/array:185
            #17 0x00001455f4f07d3c in myrocks::ha_rocksdb::create_table (this=0x1455c82140f0, table_name=<optimized out>, table_arg=0x14561811a5a0, auto_increment_value=<optimized out>) at /test/10.5_opt/storage/rocksdb/ha_rocksdb.cc:7712
            #18 0x00001455f4f0823e in myrocks::ha_rocksdb::create (this=0x1455c82140f0, name=0x14561811b8a0 "./test/t1", table_arg=0x14561811a5a0, create_info=0x14561811bc70) at /test/10.5_opt/storage/rocksdb/ha_rocksdb.cc:7858
            #19 0x0000564aca4f6654 in handler::ha_create (this=<optimized out>, name=<optimized out>, form=0x14561811a5a0, info_arg=0x14561811bc70) at /test/10.5_opt/sql/handler.cc:5110
            #20 0x0000564aca4f6fea in ha_create_table (thd=thd@entry=0x1455c8000c58, path=path@entry=0x14561811b8a0 "./test/t1", db=0x1455c8010c00 "test", table_name=0x1455c80104f0 "t1", create_info=create_info@entry=0x14561811bc70, frm=frm@entry=0x14561811b890) at /test/10.5_opt/sql/handler.cc:5575
            #21 0x0000564aca37d633 in create_table_impl (thd=thd@entry=0x1455c8000c58, orig_db=@0x1455c8010540: {str = 0x1455c8010c00 "test", length = 4}, orig_table_name=@0x1455c8010550: {str = 0x1455c80104f0 "t1", length = 2}, db=@0x1455c8010540: {str = 0x1455c8010c00 "test", length = 4}, table_name=@0x1455c8010550: {str = 0x1455c80104f0 "t1", length = 2}, path=path@entry=0x14561811b8a0 "./test/t1", options={m_options = DDL_options_st::OPT_NONE}, create_info=0x14561811bc70, alter_info=0x14561811bba0, create_table_mode=0, is_trans=0x14561811bb17, key_info=0x14561811b888, key_count=0x14561811b884, frm=0x14561811b890) at /test/10.5_opt/sql/sql_table.cc:5392
            #22 0x0000564aca37df0f in mysql_create_table_no_lock (thd=thd@entry=0x1455c8000c58, db=db@entry=0x1455c8010540, table_name=table_name@entry=0x1455c8010550, create_info=create_info@entry=0x14561811bc70, alter_info=alter_info@entry=0x14561811bba0, is_trans=is_trans@entry=0x14561811bb17, create_table_mode=0, table_list=0x1455c8010528) at /test/10.5_opt/sql/sql_table.cc:5476
            #23 0x0000564aca37e1f2 in mysql_create_table (thd=thd@entry=0x1455c8000c58, create_table=create_table@entry=0x1455c8010528, create_info=create_info@entry=0x14561811bc70, alter_info=alter_info@entry=0x14561811bba0) at /test/10.5_opt/sql/sql_table.cc:5580
            #24 0x0000564aca37f5f9 in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x1455c8000c58) at /test/10.5_opt/sql/sql_table.cc:12199
            #25 0x0000564aca2dac4e in mysql_execute_command (thd=0x1455c8000c58) at /test/10.5_opt/sql/sql_parse.cc:6056
            #26 0x0000564aca2ca1e3 in mysql_parse (thd=0x1455c8000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_parse.cc:8100
            #27 0x0000564aca2d69c5 in dispatch_command (command=COM_QUERY, thd=0x1455c8000c58, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_class.h:1290
            #28 0x0000564aca2d8f32 in do_command (thd=0x1455c8000c58) at /test/10.5_opt/sql/sql_parse.cc:1370
            #29 0x0000564aca3df3d1 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x564acdea89a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_opt/sql/sql_connect.cc:1418
            #30 0x0000564aca3df84d in handle_one_connection (arg=arg@entry=0x564acdea89a8) at /test/10.5_opt/sql/sql_connect.cc:1312
            #31 0x0000564aca76f1d9 in pfs_spawn_thread (arg=0x564acde17128) at /test/10.5_opt/storage/perfschema/pfs.cc:2201
            #32 0x0000145619c78609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #33 0x0000145619866293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            10.6.5 1e9c922fa726b22f4522f2a4de0fcb6595404086 (Optimized)

            Core was generated by `/test/MD180921-mariadb-10.6.5-linux-x86_64-opt/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            [Current thread is 1 (Thread 0x1542ebfa3800 (LWP 1581728))]
            (gdb) bt
            #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #1  0x00001542ec180859 in __GI_abort () at abort.c:79
            #2  0x00001542ec1eb3ee in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x1542ec315285 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
            #3  0x00001542ec1f347c in malloc_printerr (str=str@entry=0x1542ec317600 "free(): invalid next size (fast)") at malloc.c:5347
            #4  0x00001542ec1f4d2c in _int_free (av=0x154284000020, p=0x1542842b9b00, have_lock=0) at malloc.c:4249
            #5  0x00001542b6ef4793 in myrocks::ha_rocksdb::free_key_buffers (this=this@entry=0x1542842153e0) at /test/10.6_opt/storage/rocksdb/ha_rocksdb.cc:6648
            #6  0x00001542b6ef4938 in myrocks::ha_rocksdb::close (this=0x1542842153e0) at /test/10.6_opt/storage/rocksdb/ha_rocksdb.cc:6856
            #7  0x000056159a916cb9 in closefrm (table=table@entry=0x15428425aa88) at /test/10.6_opt/sql/table.cc:4431
            #8  0x000056159a9f1d5d in intern_close_table (table=0x15428425aa88) at /test/10.6_opt/sql/table_cache.cc:220
            #9  tc_purge () at /test/10.6_opt/sql/table_cache.cc:312
            #10 0x000056159a7d2812 in purge_tables () at /test/10.6_opt/sql/sql_base.cc:327
            #11 0x000056159a9f08b1 in tdc_start_shutdown () at /test/10.6_opt/sql/table_cache.cc:634
            #12 0x000056159a76683d in clean_up (print_message=print_message@entry=true) at /test/10.6_opt/sql/mysqld.cc:1919
            #13 0x000056159a771692 in clean_up (print_message=true) at /test/10.6_opt/sql/mysqld.cc:5844
            #14 mysqld_main (argc=<optimized out>, argv=<optimized out>) at /test/10.6_opt/sql/mysqld.cc:5844
            #15 0x00001542ec1820b3 in __libc_start_main (main=0x56159a735230 <main(int, char**)>, argc=10, argv=0x7fff0b37bfc8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff0b37bfb8) at ../csu/libc-start.c:308
            #16 0x000056159a76541e in _start () at /test/10.6_opt/sql/mysqld.cc:4475
            

            Debug stacks are always the same (ref a previous comment above).

            Bug confirmed present in:
            MariaDB: 10.2.41 (dbg), 10.2.41 (opt), 10.3.32 (dbg), 10.3.32 (opt), 10.4.22 (dbg), 10.4.22 (opt), 10.5.13 (dbg), 10.5.13 (opt), 10.6.5 (dbg), 10.6.5 (opt), 10.7.0 (dbg), 10.7.0 (opt)

            Bug (or feature/syntax) confirmed not present in:
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.35 (dbg), 5.7.35 (opt), 8.0.26 (dbg), 8.0.26 (opt)

            Roel Roel Van de Paar added a comment - - edited Full report for first testcase (looped twice to ensure crashes). INSTALL SONAME 'ha_rocksdb' ; DROP DATABASE test; CREATE DATABASE test; USE test; CREATE TABLE t1 (a VARBINARY(0), KEY (a)) ENGINE=RocksDB; INSERT IGNORE INTO t1 VALUES (1); INSTALL SONAME 'ha_rocksdb' ; DROP DATABASE test; CREATE DATABASE test; USE test; CREATE TABLE t1 (a VARBINARY(0), KEY (a)) ENGINE=RocksDB; INSERT IGNORE INTO t1 VALUES (1); Leads to: 10.7.0 d552e092c9f3e20da078d1b62b976f629f73d3a4 (Debug) mysqld: /test/10.7_dbg/storage/rocksdb/rdb_datadic.cc:1447: uint myrocks::Rdb_key_def::pack_record(const TABLE*, uchar*, const uchar*, uchar*, myrocks::Rdb_string_writer*, bool, longlong, uint, uint*, const char*) const: Assertion `is_storage_available(tuple - packed_tuple, 0)' failed. 10.7.0 d552e092c9f3e20da078d1b62b976f629f73d3a4 (Debug) Core was generated by `/test/MD180921-mariadb-10.7.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 [Current thread is 1 (Thread 0x152e18506700 (LWP 1551416))] (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x0000152e2e395859 in __GI_abort () at abort.c:79 #2 0x0000152e2e395729 in __assert_fail_base (fmt=0x152e2e52b588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x152e09ebf910 "is_storage_available(tuple - packed_tuple, 0)", file=0x152e09ebea70 "/test/10.7_dbg/storage/rocksdb/rdb_datadic.cc", line=1447, function=<optimized out>) at assert.c:92 #3 0x0000152e2e3a6f36 in __GI___assert_fail (assertion=assertion@entry=0x152e09ebf910 "is_storage_available(tuple - packed_tuple, 0)", file=file@entry=0x152e09ebea70 "/test/10.7_dbg/storage/rocksdb/rdb_datadic.cc", line=line@entry=1447, function=function@entry=0x152e09ec0580 "uint myrocks::Rdb_key_def::pack_record(const TABLE*, uchar*, const uchar*, uchar*, myrocks::Rdb_string_writer*, bool, longlong, uint, uint*, const char*) const") at assert.c:101 #4 0x0000152e09b7b626 in myrocks::Rdb_key_def::pack_record (this=this@entry=0x152de02cded0, tbl=tbl@entry=0x152de025e668, pack_buffer=0x152de02d33e8 '\245' <repeats 16 times>, "h4z\025", record=0x152de02653b8 "\376", packed_tuple=0x152de0243b38 "", unpack_info=unpack_info@entry=0x152de0265e28, should_store_row_debug_checksums=false, hidden_pk_id=1, n_key_parts=2, n_null_fields=0x0, ttl_bytes=0x152de026f901 "\240\253R\362U") at /test/10.7_dbg/storage/rocksdb/./rdb_datadic.h:773 #5 0x0000152e09b3eda2 in myrocks::ha_rocksdb::update_write_sk (this=this@entry=0x152de0265840, table_arg=0x152de025e668, kd=@0x152de02cded0: {static CF_FLAGS_TO_IGNORE = 4, m_index_number = 256, m_index_number_storage_form = "\000\000\001", m_cf_handle = 0x152de021df30, m_index_dict_version = 6, m_index_type = 2 '\002', m_kv_format_version = 13, m_is_reverse_cf = false, m_is_per_partition_cf = false, m_name = "a", m_stats = {m_gl_index_id = {cf_id = 0, index_id = 0}, m_data_size = 0, m_rows = 0, m_actual_disk_size = 0, m_entry_deletes = 0, m_entry_single_deletes = 0, m_entry_merges = 0, m_entry_others = 0, m_distinct_keys_per_prefix = std::vector of length 2, capacity 2 = {0, 0}, m_name = ""}, m_index_flags_bitmap = 0, m_total_index_flags_length = 0, m_ttl_rec_offset = 4294967295, m_ttl_duration = 0, m_ttl_column = "", m_pk_key_parts = 1, m_pk_part_no = 0x55f2563aafe8, m_pack_info = 0x152de0013868, m_keyno = 0, m_key_parts = 2, m_ttl_pk_key_part_offset = 4294967295, m_ttl_field_index = 4294967295, m_prefix_extractor = std::shared_ptr<const class rocksdb::SliceTransform> (empty) = { get() = 0x0 }, m_maxlength = 13, m_mutex = {m_mutex = {global = pthread_mutex_t = { Type = Error check, Status = Not acquired, Robust = No, Shared = No, Protocol = None }, mutex = pthread_mutex_t = { Type = Adaptive, Status = Not acquired, Robust = No, Shared = No, Protocol = None }, file = 0x152e09ebea70 "/test/10.7_dbg/storage/rocksdb/rdb_datadic.cc", name = 0x152e09eb8d33 "m_mutex", line = 406, count = 0, create_flags = 0, active_flags = 0, id = 219, thread = 0, locked_mutex = 0x152de026dcd8, used_mutex = 0x152de026dd48, prev = 0x0, next = 0x0}, m_psi = 0x0}}, row_info=@0x152e18504970: {tx = 0x152de027d900, new_data = 0x152de02653b8 "\376", old_data = 0x0, new_pk_slice = {data_ = 0x152de0240888 "", size_ = 12}, old_pk_slice = {data_ = 0x152e09f05fe0 "", size_ = 0}, old_pk_rec = {data_ = 0x152e09f05fe0 "", size_ = 0}, new_pk_unpack_info = 0x0, hidden_pk_id = 1, skip_unique_check = false}, bulk_load_sk=bulk_load_sk@entry=false) at /test/10.7_dbg/storage/rocksdb/ha_rocksdb.cc:10206 #6 0x0000152e09b3f627 in myrocks::ha_rocksdb::update_write_indexes (this=this@entry=0x152de0265840, row_info=@0x152e18504970: {tx = 0x152de027d900, new_data = 0x152de02653b8 "\376", old_data = 0x0, new_pk_slice = {data_ = 0x152de0240888 "", size_ = 12}, old_pk_slice = {data_ = 0x152e09f05fe0 "", size_ = 0}, old_pk_rec = {data_ = 0x152e09f05fe0 "", size_ = 0}, new_pk_unpack_info = 0x0, hidden_pk_id = 1, skip_unique_check = false}, pk_changed=pk_changed@entry=false) at /usr/include/c++/9/bits/shared_ptr_base.h:1309 #7 0x0000152e09b3f866 in myrocks::ha_rocksdb::update_write_row (this=this@entry=0x152de0265840, old_data=old_data@entry=0x0, new_data=new_data@entry=0x152de02653b8 "\376", skip_unique_check=<optimized out>) at /test/10.7_dbg/storage/rocksdb/ha_rocksdb.cc:10390 #8 0x0000152e09b3faa4 in myrocks::ha_rocksdb::write_row (this=0x152de0265840, buf=0x152de02653b8 "\376") at /test/10.7_dbg/storage/rocksdb/ha_rocksdb.cc:9590 #9 0x000055f252cdd7b7 in handler::ha_write_row (this=0x152de0265840, buf=0x152de02653b8 "\376") at /test/10.7_dbg/sql/handler.cc:7516 #10 0x000055f2529823da in write_record (thd=thd@entry=0x152de0000db8, table=table@entry=0x152de025e668, info=info@entry=0x152e18504cc0, sink=sink@entry=0x0) at /test/10.7_dbg/sql/sql_insert.cc:2136 #11 0x000055f25298e028 in mysql_insert (thd=thd@entry=0x152de0000db8, table_list=0x152de0013d58, fields=@0x152de0005fb8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55f253fc84a0 <end_of_list>, last = 0x152de0005fb8, elements = 0}, <No data fields>}, values_list=@0x152de0006000: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x152de0014960, last = 0x152de0014960, elements = 1}, <No data fields>}, update_fields=@0x152de0005fe8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55f253fc84a0 <end_of_list>, last = 0x152de0005fe8, elements = 0}, <No data fields>}, update_values=@0x152de0005fd0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55f253fc84a0 <end_of_list>, last = 0x152de0005fd0, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=true, result=0x0) at /test/10.7_dbg/sql/sql_insert.cc:1124 #12 0x000055f2529d4112 in mysql_execute_command (thd=thd@entry=0x152de0000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.7_dbg/sql/sql_parse.cc:4563 #13 0x000055f2529bed4b in mysql_parse (thd=thd@entry=0x152de0000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x152e18505400) at /test/10.7_dbg/sql/sql_parse.cc:8028 #14 0x000055f2529cd944 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x152de0000db8, packet=packet@entry=0x152de000b729 "INSERT IGNORE INTO t1 VALUES (1)", packet_length=packet_length@entry=32, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_class.h:1358 #15 0x000055f2529d0d4a in do_command (thd=0x152de0000db8, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_parse.cc:1402 #16 0x000055f252b46ed8 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55f2569ad068, put_in_cache=put_in_cache@entry=true) at /test/10.7_dbg/sql/sql_connect.cc:1418 #17 0x000055f252b474dd in handle_one_connection (arg=arg@entry=0x55f2569ad068) at /test/10.7_dbg/sql/sql_connect.cc:1312 #18 0x000055f252fb047e in pfs_spawn_thread (arg=0x55f2568ac2b8) at /test/10.7_dbg/storage/perfschema/pfs.cc:2201 #19 0x0000152e2e8a4609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #20 0x0000152e2e492293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 10.2.41 (Optimized) Core was generated by `/test/MD180921-mariadb-10.2.41-linux-x86_64-opt/bin/mysqld --no-defaults --core'. Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 [Current thread is 1 (Thread 0x14aaa089a700 (LWP 3314512))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 #1 0x000055560dca87bf in my_write_core (sig=sig@entry=6) at /test/10.2_opt/mysys/stacktrace.c:382 #2 0x000055560d74d878 in handle_fatal_signal (sig=6) at /test/10.2_opt/sql/signal_handler.cc:355 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #5 0x000014aad316e859 in __GI_abort () at abort.c:79 #6 0x000014aad31d93ee in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x14aad3303285 "%s\n") at ../sysdeps/posix/libc_fatal.c:155 #7 0x000014aad31e147c in malloc_printerr (str=str@entry=0x14aad3305600 "free(): invalid next size (fast)") at malloc.c:5347 #8 0x000014aad31e2d2c in _int_free (av=0x14aa74000020, p=0x14aa74210fb0, have_lock=0) at malloc.c:4249 #9 0x000014aaa2f654fe in __gnu_cxx::new_allocator<long>::deallocate (this=0x14aa742b5568, __p=<optimized out>) at /usr/include/c++/9/ext/new_allocator.h:119 #10 std::allocator_traits<std::allocator<long> >::deallocate (__a=@0x14aa742b5568: {<__gnu_cxx::new_allocator<long>> = {<No data fields>}, <No data fields>}, __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/9/bits/alloc_traits.h:470 #11 std::_Vector_base<long, std::allocator<long> >::_M_deallocate (this=0x14aa742b5568, __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:351 #12 std::_Vector_base<long, std::allocator<long> >::~_Vector_base (this=0x14aa742b5568, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:332 #13 std::vector<long, std::allocator<long> >::~vector (this=0x14aa742b5568, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:680 #14 myrocks::Rdb_index_stats::~Rdb_index_stats (this=0x14aa742b5528, __in_chrg=<optimized out>) at /test/10.2_opt/storage/rocksdb/././properties_collector.h:47 #15 myrocks::Rdb_key_def::~Rdb_key_def (this=0x14aa742b54f0, __in_chrg=<optimized out>) at /test/10.2_opt/storage/rocksdb/rdb_datadic.cc:381 #16 0x000014aaa2f6e7ad in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x14aa742b54e0) at /usr/include/c++/9/bits/shared_ptr_base.h:148 #17 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x14aa742b54e0) at /usr/include/c++/9/bits/shared_ptr_base.h:148 #18 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=<optimized out>, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/shared_ptr_base.h:730 #19 std::__shared_ptr<myrocks::Rdb_key_def, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=<optimized out>, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/shared_ptr_base.h:1169 #20 std::__shared_ptr<myrocks::Rdb_key_def, (__gnu_cxx::_Lock_policy)2>::operator= (__r=<optimized out>, this=<optimized out>) at /usr/include/c++/9/bits/shared_ptr_base.h:1265 #21 std::shared_ptr<myrocks::Rdb_key_def>::operator= (__r=<optimized out>, this=<optimized out>) at /usr/include/c++/9/bits/shared_ptr.h:335 #22 myrocks::Rdb_tbl_def::~Rdb_tbl_def (this=0x14aa7420edd0, __in_chrg=<optimized out>) at /test/10.2_opt/storage/rocksdb/rdb_datadic.cc:3512 #23 0x000014aaa2f714df in myrocks::Rdb_ddl_manager::remove (this=this@entry=0x14aaa33f2200 <myrocks::ddl_manager>, tbl=tbl@entry=0x14aa7420edd0, batch=batch@entry=0x14aa5001e9b0, lock=lock@entry=true) at /test/10.2_opt/storage/rocksdb/rdb_datadic.cc:4388 #24 0x000014aaa2f1d342 in myrocks::ha_rocksdb::delete_table (this=0x14aa5000fc08, tbl=0x14aa7420edd0) at /test/10.2_opt/storage/rocksdb/ha_rocksdb.cc:11626 #25 0x000055560d755c9d in ha_delete_table (thd=thd@entry=0x14aa50000c48, table_type=<optimized out>, path=path@entry=0x14aaa08973d0 "./test/t1", db=db@entry=0x14aa5000f368 "test", alias=0x14aa5000f380 "t1", generate_warning=generate_warning@entry=false) at /test/10.2_opt/sql/handler.cc:2443 #26 0x000055560d625e27 in mysql_rm_table_no_locks (thd=thd@entry=0x14aa50000c48, tables=tables@entry=0x14aa5000f388, if_exists=if_exists@entry=true, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=true, dont_log_query=dont_log_query@entry=true, dont_free_locks=<optimized out>) at /test/10.2_opt/sql/sql_table.cc:2451 #27 0x000055560d5726d4 in mysql_rm_db_internal (thd=0x14aa50000c48, db=0x14aa5000f368 "test", if_exists=<optimized out>, silent=<optimized out>) at /test/10.2_opt/sql/sql_db.cc:919 #28 0x000055560d59d67c in mysql_execute_command (thd=<optimized out>) at /test/10.2_opt/sql/structs.h:530 #29 0x000055560d5a345a in mysql_parse (thd=thd@entry=0x14aa50000c48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14aaa0899560, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.2_opt/sql/sql_parse.cc:7793 #30 0x000055560d5a641d in dispatch_command (command=COM_QUERY, thd=0x14aa50000c48, packet=0x14aa50006fb9 "DROP DATABASE test", packet_length=18, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.2_opt/sql/sql_class.h:1109 #31 0x000055560d5a785d in do_command (thd=0x14aa50000c48) at /test/10.2_opt/sql/sql_parse.cc:1381 #32 0x000055560d6806c6 in do_handle_one_connection (connect=connect@entry=0x5556104ef4d8) at /test/10.2_opt/sql/sql_connect.cc:1336 #33 0x000055560d68083f in handle_one_connection (arg=0x5556104ef4d8) at /test/10.2_opt/sql/sql_connect.cc:1241 #34 0x000014aad3677609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #35 0x000014aad326b293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 10.3.32 b112c9dfaacbcb7c3548414c6f402114663223dc (Optimized) Core was generated by `/test/MD180921-mariadb-10.3.32-linux-x86_64-opt/bin/mysqld --no-defaults --core'. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 [Current thread is 1 (Thread 0x151bdc0a1700 (LWP 1585888))] (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x0000151bdda8e859 in __GI_abort () at abort.c:79 #2 0x0000151bddaf93ee in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x151bddc23285 "%s\n") at ../sysdeps/posix/libc_fatal.c:155 #3 0x0000151bddb0147c in malloc_printerr (str=str@entry=0x151bddc2143a "corrupted size vs. prev_size") at malloc.c:5347 #4 0x0000151bddb01aeb in unlink_chunk (p=p@entry=0x151b80226f50, av=0x151b80000020) at malloc.c:1454 #5 0x0000151bddb0300b in _int_free (av=0x151b80000020, p=0x151b80226e40, have_lock=<optimized out>, have_lock@entry=0) at malloc.c:4342 #6 0x0000151bddb06a0d in __GI___libc_free (mem=0x151b80226e50) at malloc.c:3125 #7 tcache_thread_shutdown () at malloc.c:2964 #8 __malloc_arena_thread_freeres () at arena.c:951 #9 0x0000151bddb0b220 in __libc_thread_freeres () at thread-freeres.c:38 #10 0x0000151bddc6462f in start_thread (arg=<optimized out>) at pthread_create.c:491 #11 0x0000151bddb8b293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 10.4.22 03a10706ecfa5cf0a6252d436e341483f5c0827c (Optimized) Core was generated by `/test/MD180921-mariadb-10.4.22-linux-x86_64-opt/bin/mysqld --no-defaults --core'. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 [Current thread is 1 (Thread 0x14fe9406e700 (LWP 3210537))] (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x000014fe9721f859 in __GI_abort () at abort.c:79 #2 0x000014fe9728a3ee in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x14fe973b4285 "%s\n") at ../sysdeps/posix/libc_fatal.c:155 #3 0x000014fe9729247c in malloc_printerr (str=str@entry=0x14fe973b6600 "free(): invalid next size (fast)") at malloc.c:5347 #4 0x000014fe97293d2c in _int_free (av=0x14fe2c000020, p=0x14fe2c20f0d0, have_lock=0) at malloc.c:4249 #5 0x000014fe4b91fe24 in __gnu_cxx::new_allocator<std::shared_ptr<rocksdb::EventListener> >::deallocate (this=0x14fe94068980, __p=<optimized out>) at /usr/include/c++/9/ext/new_allocator.h:119 #6 std::allocator_traits<std::allocator<std::shared_ptr<rocksdb::EventListener> > >::deallocate (__a=@0x14fe94068980: {<__gnu_cxx::new_allocator<std::shared_ptr<rocksdb::EventListener> >> = {<No data fields>}, <No data fields>}, __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/9/bits/alloc_traits.h:470 #7 std::_Vector_base<std::shared_ptr<rocksdb::EventListener>, std::allocator<std::shared_ptr<rocksdb::EventListener> > >::_M_deallocate (this=0x14fe94068980, __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:351 #8 std::_Vector_base<std::shared_ptr<rocksdb::EventListener>, std::allocator<std::shared_ptr<rocksdb::EventListener> > >::~_Vector_base (this=0x14fe94068980, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:332 #9 std::vector<std::shared_ptr<rocksdb::EventListener>, std::allocator<std::shared_ptr<rocksdb::EventListener> > >::~vector (this=0x14fe94068980, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:680 #10 rocksdb::DBOptions::~DBOptions (this=0x14fe940687c0, __in_chrg=<optimized out>) at /test/10.4_opt/storage/rocksdb/rocksdb/include/rocksdb/options.h:350 #11 0x000014fe4b97a904 in rocksdb::DBImpl::GetOptions (this=0x14fe2c200e10, column_family=<optimized out>) at /usr/include/c++/9/ext/atomicity.h:96 #12 0x000014fe4b94fcd3 in rocksdb::StackableDB::GetOptions (column_family=<optimized out>, this=<optimized out>) at /test/10.4_opt/storage/rocksdb/rocksdb/include/rocksdb/utilities/stackable_db.h:308 #13 myrocks::Rdb_key_def::setup (this=0x14fe2c217dd0, tbl=tbl@entry=0x14fe94069890, tbl_def=tbl_def@entry=0x14fe2c257960) at /test/10.4_opt/storage/rocksdb/rdb_datadic.cc:582 #14 0x000014fe4b903272 in myrocks::ha_rocksdb::create_key_def (this=<optimized out>, table_arg=0x14fe94069890, i=1, tbl_def_arg=0x14fe2c257960, new_key_def=0x14fe2c2186d8, cf_info=<optimized out>, ttl_duration=0, ttl_column="") at /test/10.4_opt/storage/rocksdb/ha_rocksdb.cc:7515 #15 0x000014fe4b91144c in myrocks::ha_rocksdb::create_key_defs (this=0x14fe2c259fe0, table_arg=0x14fe94069890, tbl_def_arg=0x14fe2c257960, old_table_arg=0x0, old_tbl_def_arg=0x0) at /usr/include/c++/9/array:185 #16 0x000014fe4b9116ac in myrocks::ha_rocksdb::create_table (this=0x14fe2c259fe0, table_name=<optimized out>, table_arg=0x14fe94069890, auto_increment_value=<optimized out>) at /test/10.4_opt/storage/rocksdb/ha_rocksdb.cc:7693 #17 0x000014fe4b911bae in myrocks::ha_rocksdb::create (this=0x14fe2c259fe0, name=0x14fe9406b570 "./test/t1", table_arg=0x14fe94069890, create_info=0x14fe9406b940) at /test/10.4_opt/storage/rocksdb/ha_rocksdb.cc:7839 #18 0x0000556a28a03cf4 in handler::ha_create (this=<optimized out>, name=<optimized out>, form=0x14fe94069890, info_arg=0x14fe9406b940) at /test/10.4_opt/sql/handler.cc:4804 #19 0x0000556a28a0469a in ha_create_table (thd=thd@entry=0x14fe2c000c48, path=path@entry=0x14fe9406b570 "./test/t1", db=0x14fe2c0107e0 "test", table_name=0x14fe2c0100e0 "t1", create_info=create_info@entry=0x14fe9406b940, frm=frm@entry=0x14fe9406b560) at /test/10.4_opt/sql/handler.cc:5269 #20 0x0000556a28873169 in create_table_impl (thd=thd@entry=0x14fe2c000c48, orig_db=@0x14fe2c010130: {str = 0x14fe2c0107e0 "test", length = 4}, orig_table_name=@0x14fe2c010140: {str = 0x14fe2c0100e0 "t1", length = 2}, db=@0x14fe2c010130: {str = 0x14fe2c0107e0 "test", length = 4}, table_name=@0x14fe2c010140: {str = 0x14fe2c0100e0 "t1", length = 2}, path=path@entry=0x14fe9406b570 "./test/t1", options={m_options = DDL_options_st::OPT_NONE}, create_info=0x14fe9406b940, alter_info=0x14fe9406b880, create_table_mode=0, is_trans=0x14fe9406b7f7, key_info=0x14fe9406b558, key_count=0x14fe9406b554, frm=0x14fe9406b560) at /test/10.4_opt/sql/sql_table.cc:5152 #21 0x0000556a2887359f in mysql_create_table_no_lock (thd=thd@entry=0x14fe2c000c48, db=db@entry=0x14fe2c010130, table_name=table_name@entry=0x14fe2c010140, create_info=create_info@entry=0x14fe9406b940, alter_info=0x14fe9406b880, is_trans=is_trans@entry=0x14fe9406b7f7, create_table_mode=0, table_list=0x14fe2c010118) at /test/10.4_opt/sql/sql_table.cc:5236 #22 0x0000556a288737eb in mysql_create_table (thd=thd@entry=0x14fe2c000c48, create_table=create_table@entry=0x14fe2c010118, create_info=create_info@entry=0x14fe9406b940, alter_info=alter_info@entry=0x14fe9406b880) at /test/10.4_opt/sql/sql_table.cc:5331 #23 0x0000556a28874bc4 in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x14fe2c000c48) at /test/10.4_opt/sql/sql_table.cc:11593 #24 0x0000556a287cd700 in mysql_execute_command (thd=0x14fe2c000c48) at /test/10.4_opt/sql/sql_parse.cc:6192 #25 0x0000556a287d47e7 in mysql_parse (thd=0x14fe2c000c48, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.4_opt/sql/sql_parse.cc:7995 #26 0x0000556a287d6c9d in dispatch_command (command=COM_QUERY, thd=0x14fe2c000c48, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.4_opt/sql/sql_class.h:1201 #27 0x0000556a287d8e6e in do_command (thd=0x14fe2c000c48) at /test/10.4_opt/sql/sql_parse.cc:1373 #28 0x0000556a288cd50e in do_handle_one_connection (connect=connect@entry=0x556a2bbf86a8) at /test/10.4_opt/sql/sql_connect.cc:1420 #29 0x0000556a288cd63f in handle_one_connection (arg=0x556a2bbf86a8) at /test/10.4_opt/sql/sql_connect.cc:1316 #30 0x000014fe9772e609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #31 0x000014fe9731c293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 10.5.13 c430aa72abbdccb1ece7f0d65b49a6b48e7c5ba7 (Optimized) Core was generated by `/test/MD180921-mariadb-10.5.13-linux-x86_64-opt/bin/mysqld --no-defaults --core'. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 [Current thread is 1 (Thread 0x14561811d700 (LWP 1579833))] (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x0000145619769859 in __GI_abort () at abort.c:79 #2 0x00001456197d43ee in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x1456198fe285 "%s\n") at ../sysdeps/posix/libc_fatal.c:155 #3 0x00001456197dc47c in malloc_printerr (str=str@entry=0x145619900600 "free(): invalid next size (fast)") at malloc.c:5347 #4 0x00001456197ddd2c in _int_free (av=0x1455c8000020, p=0x1455c8079500, have_lock=0) at malloc.c:4249 #5 0x00001455f4f16e69 in __gnu_cxx::new_allocator<int>::deallocate (this=0x145618119318, __p=<optimized out>) at /usr/include/c++/9/ext/new_allocator.h:119 #6 std::allocator_traits<std::allocator<int> >::deallocate (__a=@0x145618119318: {<__gnu_cxx::new_allocator<int>> = {<No data fields>}, <No data fields>}, __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/9/bits/alloc_traits.h:470 #7 std::_Vector_base<int, std::allocator<int> >::_M_deallocate (this=0x145618119318, __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:351 #8 std::_Vector_base<int, std::allocator<int> >::~_Vector_base (this=0x145618119318, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:332 #9 std::vector<int, std::allocator<int> >::~vector (this=0x145618119318, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/stl_vector.h:680 #10 rocksdb::AdvancedColumnFamilyOptions::~AdvancedColumnFamilyOptions (this=0x145618119270, __in_chrg=<optimized out>) at /test/10.5_opt/storage/rocksdb/rocksdb/include/rocksdb/advanced_options.h:154 #11 rocksdb::ColumnFamilyOptions::~ColumnFamilyOptions (this=0x145618119270, __in_chrg=<optimized out>) at /test/10.5_opt/storage/rocksdb/rocksdb/include/rocksdb/options.h:84 #12 0x00001455f4f71130 in rocksdb::DBImpl::GetOptions (this=0x1455c8201940, column_family=<optimized out>) at /usr/include/c++/9/ext/atomicity.h:96 #13 0x00001455f4f465c3 in rocksdb::StackableDB::GetOptions (column_family=<optimized out>, this=<optimized out>) at /test/10.5_opt/storage/rocksdb/rocksdb/include/rocksdb/utilities/stackable_db.h:308 #14 myrocks::Rdb_key_def::setup (this=0x1455c82337f0, tbl=tbl@entry=0x14561811a5a0, tbl_def=tbl_def@entry=0x1455c8234060) at /test/10.5_opt/storage/rocksdb/rdb_datadic.cc:583 #15 0x00001455f4ef9842 in myrocks::ha_rocksdb::create_key_def (this=<optimized out>, table_arg=0x14561811a5a0, i=0, tbl_def_arg=0x1455c8234060, new_key_def=0x1455c82b8e08, cf_info=<optimized out>, ttl_duration=0, ttl_column="") at /test/10.5_opt/storage/rocksdb/ha_rocksdb.cc:7534 #16 0x00001455f4f07adc in myrocks::ha_rocksdb::create_key_defs (this=0x1455c82140f0, table_arg=0x14561811a5a0, tbl_def_arg=0x1455c8234060, old_table_arg=0x0, old_tbl_def_arg=0x0) at /usr/include/c++/9/array:185 #17 0x00001455f4f07d3c in myrocks::ha_rocksdb::create_table (this=0x1455c82140f0, table_name=<optimized out>, table_arg=0x14561811a5a0, auto_increment_value=<optimized out>) at /test/10.5_opt/storage/rocksdb/ha_rocksdb.cc:7712 #18 0x00001455f4f0823e in myrocks::ha_rocksdb::create (this=0x1455c82140f0, name=0x14561811b8a0 "./test/t1", table_arg=0x14561811a5a0, create_info=0x14561811bc70) at /test/10.5_opt/storage/rocksdb/ha_rocksdb.cc:7858 #19 0x0000564aca4f6654 in handler::ha_create (this=<optimized out>, name=<optimized out>, form=0x14561811a5a0, info_arg=0x14561811bc70) at /test/10.5_opt/sql/handler.cc:5110 #20 0x0000564aca4f6fea in ha_create_table (thd=thd@entry=0x1455c8000c58, path=path@entry=0x14561811b8a0 "./test/t1", db=0x1455c8010c00 "test", table_name=0x1455c80104f0 "t1", create_info=create_info@entry=0x14561811bc70, frm=frm@entry=0x14561811b890) at /test/10.5_opt/sql/handler.cc:5575 #21 0x0000564aca37d633 in create_table_impl (thd=thd@entry=0x1455c8000c58, orig_db=@0x1455c8010540: {str = 0x1455c8010c00 "test", length = 4}, orig_table_name=@0x1455c8010550: {str = 0x1455c80104f0 "t1", length = 2}, db=@0x1455c8010540: {str = 0x1455c8010c00 "test", length = 4}, table_name=@0x1455c8010550: {str = 0x1455c80104f0 "t1", length = 2}, path=path@entry=0x14561811b8a0 "./test/t1", options={m_options = DDL_options_st::OPT_NONE}, create_info=0x14561811bc70, alter_info=0x14561811bba0, create_table_mode=0, is_trans=0x14561811bb17, key_info=0x14561811b888, key_count=0x14561811b884, frm=0x14561811b890) at /test/10.5_opt/sql/sql_table.cc:5392 #22 0x0000564aca37df0f in mysql_create_table_no_lock (thd=thd@entry=0x1455c8000c58, db=db@entry=0x1455c8010540, table_name=table_name@entry=0x1455c8010550, create_info=create_info@entry=0x14561811bc70, alter_info=alter_info@entry=0x14561811bba0, is_trans=is_trans@entry=0x14561811bb17, create_table_mode=0, table_list=0x1455c8010528) at /test/10.5_opt/sql/sql_table.cc:5476 #23 0x0000564aca37e1f2 in mysql_create_table (thd=thd@entry=0x1455c8000c58, create_table=create_table@entry=0x1455c8010528, create_info=create_info@entry=0x14561811bc70, alter_info=alter_info@entry=0x14561811bba0) at /test/10.5_opt/sql/sql_table.cc:5580 #24 0x0000564aca37f5f9 in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x1455c8000c58) at /test/10.5_opt/sql/sql_table.cc:12199 #25 0x0000564aca2dac4e in mysql_execute_command (thd=0x1455c8000c58) at /test/10.5_opt/sql/sql_parse.cc:6056 #26 0x0000564aca2ca1e3 in mysql_parse (thd=0x1455c8000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_parse.cc:8100 #27 0x0000564aca2d69c5 in dispatch_command (command=COM_QUERY, thd=0x1455c8000c58, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_class.h:1290 #28 0x0000564aca2d8f32 in do_command (thd=0x1455c8000c58) at /test/10.5_opt/sql/sql_parse.cc:1370 #29 0x0000564aca3df3d1 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x564acdea89a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_opt/sql/sql_connect.cc:1418 #30 0x0000564aca3df84d in handle_one_connection (arg=arg@entry=0x564acdea89a8) at /test/10.5_opt/sql/sql_connect.cc:1312 #31 0x0000564aca76f1d9 in pfs_spawn_thread (arg=0x564acde17128) at /test/10.5_opt/storage/perfschema/pfs.cc:2201 #32 0x0000145619c78609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #33 0x0000145619866293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 10.6.5 1e9c922fa726b22f4522f2a4de0fcb6595404086 (Optimized) Core was generated by `/test/MD180921-mariadb-10.6.5-linux-x86_64-opt/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 [Current thread is 1 (Thread 0x1542ebfa3800 (LWP 1581728))] (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00001542ec180859 in __GI_abort () at abort.c:79 #2 0x00001542ec1eb3ee in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x1542ec315285 "%s\n") at ../sysdeps/posix/libc_fatal.c:155 #3 0x00001542ec1f347c in malloc_printerr (str=str@entry=0x1542ec317600 "free(): invalid next size (fast)") at malloc.c:5347 #4 0x00001542ec1f4d2c in _int_free (av=0x154284000020, p=0x1542842b9b00, have_lock=0) at malloc.c:4249 #5 0x00001542b6ef4793 in myrocks::ha_rocksdb::free_key_buffers (this=this@entry=0x1542842153e0) at /test/10.6_opt/storage/rocksdb/ha_rocksdb.cc:6648 #6 0x00001542b6ef4938 in myrocks::ha_rocksdb::close (this=0x1542842153e0) at /test/10.6_opt/storage/rocksdb/ha_rocksdb.cc:6856 #7 0x000056159a916cb9 in closefrm (table=table@entry=0x15428425aa88) at /test/10.6_opt/sql/table.cc:4431 #8 0x000056159a9f1d5d in intern_close_table (table=0x15428425aa88) at /test/10.6_opt/sql/table_cache.cc:220 #9 tc_purge () at /test/10.6_opt/sql/table_cache.cc:312 #10 0x000056159a7d2812 in purge_tables () at /test/10.6_opt/sql/sql_base.cc:327 #11 0x000056159a9f08b1 in tdc_start_shutdown () at /test/10.6_opt/sql/table_cache.cc:634 #12 0x000056159a76683d in clean_up (print_message=print_message@entry=true) at /test/10.6_opt/sql/mysqld.cc:1919 #13 0x000056159a771692 in clean_up (print_message=true) at /test/10.6_opt/sql/mysqld.cc:5844 #14 mysqld_main (argc=<optimized out>, argv=<optimized out>) at /test/10.6_opt/sql/mysqld.cc:5844 #15 0x00001542ec1820b3 in __libc_start_main (main=0x56159a735230 <main(int, char**)>, argc=10, argv=0x7fff0b37bfc8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff0b37bfb8) at ../csu/libc-start.c:308 #16 0x000056159a76541e in _start () at /test/10.6_opt/sql/mysqld.cc:4475 Debug stacks are always the same (ref a previous comment above). Bug confirmed present in: MariaDB: 10.2.41 (dbg), 10.2.41 (opt), 10.3.32 (dbg), 10.3.32 (opt), 10.4.22 (dbg), 10.4.22 (opt), 10.5.13 (dbg), 10.5.13 (opt), 10.6.5 (dbg), 10.6.5 (opt), 10.7.0 (dbg), 10.7.0 (opt) Bug (or feature/syntax) confirmed not present in: MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.35 (dbg), 5.7.35 (opt), 8.0.26 (dbg), 8.0.26 (opt)
            Roel Roel Van de Paar added a comment - - edited

            Summary of UniqueID's seen across versions

            SIGABRT|__libc_message|malloc_printerr|_int_free|__gnu_cxx::new_allocator<int>::deallocate
            SIGABRT|__libc_message|malloc_printerr|_int_free|__gnu_cxx::new_allocator<long>::deallocate
            SIGABRT|__libc_message|malloc_printerr|_int_free|__gnu_cxx::new_allocator<std::shared_ptr<rocksdb::EventListener> >::deallocate
            SIGABRT|__libc_message|malloc_printerr|_int_free|myrocks::ha_rocksdb::free_key_buffers
            SIGABRT|__libc_message|malloc_printerr|munmap_chunk|cleanup_variables
            SIGABRT|__libc_message|malloc_printerr|munmap_chunk|free_root
            SIGABRT|__libc_message|malloc_printerr|munmap_chunk|myrocks::ha_rocksdb::free_key_buffers
            SIGABRT|__libc_message|malloc_printerr|munmap_chunk|std::__shared_count<shared_ptr_base.h
            SIGABRT|__libc_message|malloc_printerr|unlink_chunk|_int_free
            is_storage_available(tuple - packed_tuple, 0)|SIGABRT|myrocks::Rdb_key_def::pack_record|myrocks::ha_rocksdb::update_write_sk|myrocks::ha_rocksdb::update_write_indexes|myrocks::ha_rocksdb::update_write_row
            is_storage_available(tuple - packed_tuple, pack_info->m_max_image_len)|SIGABRT|myrocks::Rdb_key_def::pack_field|myrocks::Rdb_key_def::pack_record|myrocks::ha_rocksdb::update_write_sk|myrocks::ha_rocksdb::update_write_indexes
            

            Roel Roel Van de Paar added a comment - - edited Summary of UniqueID's seen across versions SIGABRT|__libc_message|malloc_printerr|_int_free|__gnu_cxx::new_allocator<int>::deallocate SIGABRT|__libc_message|malloc_printerr|_int_free|__gnu_cxx::new_allocator<long>::deallocate SIGABRT|__libc_message|malloc_printerr|_int_free|__gnu_cxx::new_allocator<std::shared_ptr<rocksdb::EventListener> >::deallocate SIGABRT|__libc_message|malloc_printerr|_int_free|myrocks::ha_rocksdb::free_key_buffers SIGABRT|__libc_message|malloc_printerr|munmap_chunk|cleanup_variables SIGABRT|__libc_message|malloc_printerr|munmap_chunk|free_root SIGABRT|__libc_message|malloc_printerr|munmap_chunk|myrocks::ha_rocksdb::free_key_buffers SIGABRT|__libc_message|malloc_printerr|munmap_chunk|std::__shared_count<shared_ptr_base.h SIGABRT|__libc_message|malloc_printerr|unlink_chunk|_int_free is_storage_available(tuple - packed_tuple, 0)|SIGABRT|myrocks::Rdb_key_def::pack_record|myrocks::ha_rocksdb::update_write_sk|myrocks::ha_rocksdb::update_write_indexes|myrocks::ha_rocksdb::update_write_row is_storage_available(tuple - packed_tuple, pack_info->m_max_image_len)|SIGABRT|myrocks::Rdb_key_def::pack_field|myrocks::Rdb_key_def::pack_record|myrocks::ha_rocksdb::update_write_sk|myrocks::ha_rocksdb::update_write_indexes

            This bug significantly affects testing as the optimized stacks for these issues are broad filters. A fix would be appreciated.

            Roel Roel Van de Paar added a comment - This bug significantly affects testing as the optimized stacks for these issues are broad filters. A fix would be appreciated.
            Roel Roel Van de Paar added a comment - - edited

            Another related assertion/stack with this testcase variation:

            SET sql_mode='',@@collation_server=2;
            INSTALL plugin RocksDB SONAME 'ha_rocksdb';
            DROP DATABASE test;
            CREATE DATABASE test;
            USE test;
            CREATE TABLE t (pk INT PRIMARY KEY, c VARCHAR(100), KEY(c (10))) ENGINE=RocksDB;
            INSERT INTO t VALUES (19, 'aøaaaøaaaaaaaaøaaaa');
            SELECT SLEEP (3);
            

            Leads to:

            10.7.0 d552e092c9f3e20da078d1b62b976f629f73d3a4 (Debug)

            mysqld: /test/10.7_dbg/storage/rocksdb/rdb_datadic.cc:1231: uchar* myrocks::Rdb_key_def::pack_field(Field*, myrocks::Rdb_field_packing*, uchar*, uchar*, uchar*, myrocks::Rdb_string_writer*, uint*) const: Assertion `is_storage_available(tuple - packed_tuple, pack_info->m_max_image_len)' failed.
            

            10.7.0 d552e092c9f3e20da078d1b62b976f629f73d3a4 (Debug)

            Core was generated by `/test/MD180921-mariadb-10.7.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            [Current thread is 1 (Thread 0x14b130c59700 (LWP 4057769))]
            (gdb) bt
            #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #1  0x000014b145b0c859 in __GI_abort () at abort.c:79
            #2  0x000014b145b0c729 in __assert_fail_base (fmt=0x14b145ca2588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x14b1216cb2e0 "is_storage_available(tuple - packed_tuple, pack_info->m_max_image_len)", file=0x14b1216caa70 "/test/10.7_dbg/storage/rocksdb/rdb_datadic.cc", line=1231, function=<optimized out>) at assert.c:92
            #3  0x000014b145b1df36 in __GI___assert_fail (assertion=assertion@entry=0x14b1216cb2e0 "is_storage_available(tuple - packed_tuple, pack_info->m_max_image_len)", file=file@entry=0x14b1216caa70 "/test/10.7_dbg/storage/rocksdb/rdb_datadic.cc", line=line@entry=1231, function=function@entry=0x14b1216cb250 "uchar* myrocks::Rdb_key_def::pack_field(Field*, myrocks::Rdb_field_packing*, uchar*, uchar*, uchar*, myrocks::Rdb_string_writer*, uint*) const") at assert.c:101
            #4  0x000014b121381fab in myrocks::Rdb_key_def::pack_field (this=this@entry=0x14b0f82c4330, field=field@entry=0x14b0f8259aa0, pack_info=0x14b0f80138e0, tuple=<optimized out>, packed_tuple=packed_tuple@entry=0x14b0f826c738 "", pack_buffer=pack_buffer@entry=0x14b0f82694c8 '\003' <repeats 16 times>, "\001", '\003' <repeats 16 times>, "\001", '\003' <repeats 16 times>, "\001\003\227\003\245\245\245\245\245\245\245\245\245\245h4z\025", '\217' <repeats 12 times>, <incomplete sequence \345>, unpack_info=0x14b0f825a3c8, n_null_fields=0x0) at /test/10.7_dbg/storage/rocksdb/./rdb_datadic.h:773
            #5  0x000014b121387099 in myrocks::Rdb_key_def::pack_record (this=this@entry=0x14b0f82c4330, tbl=tbl@entry=0x14b0f8268998, pack_buffer=0x14b0f82694c8 '\003' <repeats 16 times>, "\001", '\003' <repeats 16 times>, "\001", '\003' <repeats 16 times>, "\001\003\227\003\245\245\245\245\245\245\245\245\245\245h4z\025", '\217' <repeats 12 times>, <incomplete sequence \345>, record=0x14b0f8259958 "\376\023", packed_tuple=0x14b0f826c738 "", unpack_info=unpack_info@entry=0x14b0f825a3c8, should_store_row_debug_checksums=false, hidden_pk_id=0, n_key_parts=2, n_null_fields=0x0, ttl_bytes=0x14b0f8232541 "\240\340'\234U") at /test/10.7_dbg/storage/rocksdb/rdb_datadic.cc:1382
            #6  0x000014b12134ada2 in myrocks::ha_rocksdb::update_write_sk (this=this@entry=0x14b0f8259de0, table_arg=0x14b0f8268998, kd=@0x14b0f82c4330: {static CF_FLAGS_TO_IGNORE = 4, m_index_number = 257, m_index_number_storage_form = "\000\000\001\001", m_cf_handle = 0x14b0f8212b70, m_index_dict_version = 6, m_index_type = 2 '\002', m_kv_format_version = 13, m_is_reverse_cf = false, m_is_per_partition_cf = false, m_name = "c", m_stats = {m_gl_index_id = {cf_id = 0, index_id = 0}, m_data_size = 0, m_rows = 0, m_actual_disk_size = 0, m_entry_deletes = 0, m_entry_single_deletes = 0, m_entry_merges = 0, m_entry_others = 0, m_distinct_keys_per_prefix = std::vector of length 2, capacity 2 = {0, 0}, m_name = ""}, m_index_flags_bitmap = 0, m_total_index_flags_length = 0, m_ttl_rec_offset = 4294967295, m_ttl_duration = 0, m_ttl_column = "", m_pk_key_parts = 1, m_pk_part_no = 0x14b0f825c4b8, m_pack_info = 0x14b0f8013868, m_keyno = 1, m_key_parts = 2, m_ttl_pk_key_part_offset = 4294967295, m_ttl_field_index = 4294967295, m_prefix_extractor = std::shared_ptr<const class rocksdb::SliceTransform> (empty) = {
                    get() = 0x0
                  }, m_maxlength = 63, m_mutex = {m_mutex = {global = pthread_mutex_t = {
                        Type = Error check,
                        Status = Not acquired,
                        Robust = No,
                        Shared = No,
                        Protocol = None
                      }, mutex = pthread_mutex_t = {
                        Type = Adaptive,
                        Status = Not acquired,
                        Robust = No,
                        Shared = No,
                        Protocol = None
                      }, file = 0x14b1216caa70 "/test/10.7_dbg/storage/rocksdb/rdb_datadic.cc", name = 0x14b1216c4d33 "m_mutex", line = 406, count = 0, create_flags = 0, active_flags = 0, id = 220, thread = 0, locked_mutex = 0x14b0f826c5b8, used_mutex = 0x14b0f826c628, prev = 0x0, next = 0x0}, m_psi = 0x0}}, row_info=@0x14b130c57970: {tx = 0x14b0f82724e0, new_data = 0x14b0f8259958 "\376\023", old_data = 0x0, new_pk_slice = {data_ = 0x14b0f8237628 "", size_ = 8}, old_pk_slice = {data_ = 0x14b121711fe0 "", size_ = 0}, old_pk_rec = {data_ = 0x14b121711fe0 "", size_ = 0}, new_pk_unpack_info = 0x14b0f825a3e0, hidden_pk_id = 0, skip_unique_check = false}, bulk_load_sk=bulk_load_sk@entry=false) at /test/10.7_dbg/storage/rocksdb/ha_rocksdb.cc:10206
            #7  0x000014b12134b627 in myrocks::ha_rocksdb::update_write_indexes (this=this@entry=0x14b0f8259de0, row_info=@0x14b130c57970: {tx = 0x14b0f82724e0, new_data = 0x14b0f8259958 "\376\023", old_data = 0x0, new_pk_slice = {data_ = 0x14b0f8237628 "", size_ = 8}, old_pk_slice = {data_ = 0x14b121711fe0 "", size_ = 0}, old_pk_rec = {data_ = 0x14b121711fe0 "", size_ = 0}, new_pk_unpack_info = 0x14b0f825a3e0, hidden_pk_id = 0, skip_unique_check = false}, pk_changed=pk_changed@entry=false) at /usr/include/c++/9/bits/shared_ptr_base.h:1309
            #8  0x000014b12134b866 in myrocks::ha_rocksdb::update_write_row (this=this@entry=0x14b0f8259de0, old_data=old_data@entry=0x0, new_data=new_data@entry=0x14b0f8259958 "\376\023", skip_unique_check=<optimized out>) at /test/10.7_dbg/storage/rocksdb/ha_rocksdb.cc:10390
            #9  0x000014b12134baa4 in myrocks::ha_rocksdb::write_row (this=0x14b0f8259de0, buf=0x14b0f8259958 "\376\023") at /test/10.7_dbg/storage/rocksdb/ha_rocksdb.cc:9590
            #10 0x0000559c2802d7b7 in handler::ha_write_row (this=0x14b0f8259de0, buf=0x14b0f8259958 "\376\023") at /test/10.7_dbg/sql/handler.cc:7516
            #11 0x0000559c27cd23da in write_record (thd=thd@entry=0x14b0f8000db8, table=table@entry=0x14b0f8268998, info=info@entry=0x14b130c57cc0, sink=sink@entry=0x0) at /test/10.7_dbg/sql/sql_insert.cc:2136
            #12 0x0000559c27cde028 in mysql_insert (thd=thd@entry=0x14b0f8000db8, table_list=0x14b0f8013d80, fields=@0x14b0f8005fb8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x559c293184a0 <end_of_list>, last = 0x14b0f8005fb8, elements = 0}, <No data fields>}, values_list=@0x14b0f8006000: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14b0f8014a38, last = 0x14b0f8014a38, elements = 1}, <No data fields>}, update_fields=@0x14b0f8005fe8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x559c293184a0 <end_of_list>, last = 0x14b0f8005fe8, elements = 0}, <No data fields>}, update_values=@0x14b0f8005fd0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x559c293184a0 <end_of_list>, last = 0x14b0f8005fd0, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/10.7_dbg/sql/sql_insert.cc:1124
            #13 0x0000559c27d24112 in mysql_execute_command (thd=thd@entry=0x14b0f8000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.7_dbg/sql/sql_parse.cc:4563
            #14 0x0000559c27d0ed4b in mysql_parse (thd=thd@entry=0x14b0f8000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14b130c58400) at /test/10.7_dbg/sql/sql_parse.cc:8028
            #15 0x0000559c27d1d944 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14b0f8000db8, packet=packet@entry=0x14b0f800b729 "INSERT INTO t VALUES (19, 'aøaaaøaaaaaaaaøaaaa')", packet_length=packet_length@entry=51, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_class.h:1358
            #16 0x0000559c27d20d4a in do_command (thd=0x14b0f8000db8, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_parse.cc:1402
            #17 0x0000559c27e96ed8 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x559c2ae86078, put_in_cache=put_in_cache@entry=true) at /test/10.7_dbg/sql/sql_connect.cc:1418
            #18 0x0000559c27e974dd in handle_one_connection (arg=arg@entry=0x559c2ae86078) at /test/10.7_dbg/sql/sql_connect.cc:1312
            #19 0x0000559c2830047e in pfs_spawn_thread (arg=0x559c2ad852c8) at /test/10.7_dbg/storage/perfschema/pfs.cc:2201
            #20 0x000014b14601b609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #21 0x000014b145c09293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            Bug confirmed present in:
            MariaDB: 10.2.41 (dbg), 10.2.41 (opt), 10.3.32 (dbg), 10.3.32 (opt), 10.4.22 (dbg), 10.4.22 (opt), 10.5.13 (dbg), 10.5.13 (opt), 10.6.5 (dbg), 10.6.5 (opt), 10.7.0 (dbg), 10.7.0 (opt)

            Bug (or feature/syntax) confirmed not present in:
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.35 (dbg), 5.7.35 (opt), 8.0.26 (dbg), 8.0.26 (opt)

            Roel Roel Van de Paar added a comment - - edited Another related assertion/stack with this testcase variation: SET sql_mode= '' ,@@collation_server=2; INSTALL plugin RocksDB SONAME 'ha_rocksdb' ; DROP DATABASE test; CREATE DATABASE test; USE test; CREATE TABLE t (pk INT PRIMARY KEY , c VARCHAR (100), KEY (c (10))) ENGINE=RocksDB; INSERT INTO t VALUES (19, 'aøaaaøaaaaaaaaøaaaa' ); SELECT SLEEP (3); Leads to: 10.7.0 d552e092c9f3e20da078d1b62b976f629f73d3a4 (Debug) mysqld: /test/10.7_dbg/storage/rocksdb/rdb_datadic.cc:1231: uchar* myrocks::Rdb_key_def::pack_field(Field*, myrocks::Rdb_field_packing*, uchar*, uchar*, uchar*, myrocks::Rdb_string_writer*, uint*) const: Assertion `is_storage_available(tuple - packed_tuple, pack_info->m_max_image_len)' failed. 10.7.0 d552e092c9f3e20da078d1b62b976f629f73d3a4 (Debug) Core was generated by `/test/MD180921-mariadb-10.7.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 [Current thread is 1 (Thread 0x14b130c59700 (LWP 4057769))] (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x000014b145b0c859 in __GI_abort () at abort.c:79 #2 0x000014b145b0c729 in __assert_fail_base (fmt=0x14b145ca2588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x14b1216cb2e0 "is_storage_available(tuple - packed_tuple, pack_info->m_max_image_len)", file=0x14b1216caa70 "/test/10.7_dbg/storage/rocksdb/rdb_datadic.cc", line=1231, function=<optimized out>) at assert.c:92 #3 0x000014b145b1df36 in __GI___assert_fail (assertion=assertion@entry=0x14b1216cb2e0 "is_storage_available(tuple - packed_tuple, pack_info->m_max_image_len)", file=file@entry=0x14b1216caa70 "/test/10.7_dbg/storage/rocksdb/rdb_datadic.cc", line=line@entry=1231, function=function@entry=0x14b1216cb250 "uchar* myrocks::Rdb_key_def::pack_field(Field*, myrocks::Rdb_field_packing*, uchar*, uchar*, uchar*, myrocks::Rdb_string_writer*, uint*) const") at assert.c:101 #4 0x000014b121381fab in myrocks::Rdb_key_def::pack_field (this=this@entry=0x14b0f82c4330, field=field@entry=0x14b0f8259aa0, pack_info=0x14b0f80138e0, tuple=<optimized out>, packed_tuple=packed_tuple@entry=0x14b0f826c738 "", pack_buffer=pack_buffer@entry=0x14b0f82694c8 '\003' <repeats 16 times>, "\001", '\003' <repeats 16 times>, "\001", '\003' <repeats 16 times>, "\001\003\227\003\245\245\245\245\245\245\245\245\245\245h4z\025", '\217' <repeats 12 times>, <incomplete sequence \345>, unpack_info=0x14b0f825a3c8, n_null_fields=0x0) at /test/10.7_dbg/storage/rocksdb/./rdb_datadic.h:773 #5 0x000014b121387099 in myrocks::Rdb_key_def::pack_record (this=this@entry=0x14b0f82c4330, tbl=tbl@entry=0x14b0f8268998, pack_buffer=0x14b0f82694c8 '\003' <repeats 16 times>, "\001", '\003' <repeats 16 times>, "\001", '\003' <repeats 16 times>, "\001\003\227\003\245\245\245\245\245\245\245\245\245\245h4z\025", '\217' <repeats 12 times>, <incomplete sequence \345>, record=0x14b0f8259958 "\376\023", packed_tuple=0x14b0f826c738 "", unpack_info=unpack_info@entry=0x14b0f825a3c8, should_store_row_debug_checksums=false, hidden_pk_id=0, n_key_parts=2, n_null_fields=0x0, ttl_bytes=0x14b0f8232541 "\240\340'\234U") at /test/10.7_dbg/storage/rocksdb/rdb_datadic.cc:1382 #6 0x000014b12134ada2 in myrocks::ha_rocksdb::update_write_sk (this=this@entry=0x14b0f8259de0, table_arg=0x14b0f8268998, kd=@0x14b0f82c4330: {static CF_FLAGS_TO_IGNORE = 4, m_index_number = 257, m_index_number_storage_form = "\000\000\001\001", m_cf_handle = 0x14b0f8212b70, m_index_dict_version = 6, m_index_type = 2 '\002', m_kv_format_version = 13, m_is_reverse_cf = false, m_is_per_partition_cf = false, m_name = "c", m_stats = {m_gl_index_id = {cf_id = 0, index_id = 0}, m_data_size = 0, m_rows = 0, m_actual_disk_size = 0, m_entry_deletes = 0, m_entry_single_deletes = 0, m_entry_merges = 0, m_entry_others = 0, m_distinct_keys_per_prefix = std::vector of length 2, capacity 2 = {0, 0}, m_name = ""}, m_index_flags_bitmap = 0, m_total_index_flags_length = 0, m_ttl_rec_offset = 4294967295, m_ttl_duration = 0, m_ttl_column = "", m_pk_key_parts = 1, m_pk_part_no = 0x14b0f825c4b8, m_pack_info = 0x14b0f8013868, m_keyno = 1, m_key_parts = 2, m_ttl_pk_key_part_offset = 4294967295, m_ttl_field_index = 4294967295, m_prefix_extractor = std::shared_ptr<const class rocksdb::SliceTransform> (empty) = { get() = 0x0 }, m_maxlength = 63, m_mutex = {m_mutex = {global = pthread_mutex_t = { Type = Error check, Status = Not acquired, Robust = No, Shared = No, Protocol = None }, mutex = pthread_mutex_t = { Type = Adaptive, Status = Not acquired, Robust = No, Shared = No, Protocol = None }, file = 0x14b1216caa70 "/test/10.7_dbg/storage/rocksdb/rdb_datadic.cc", name = 0x14b1216c4d33 "m_mutex", line = 406, count = 0, create_flags = 0, active_flags = 0, id = 220, thread = 0, locked_mutex = 0x14b0f826c5b8, used_mutex = 0x14b0f826c628, prev = 0x0, next = 0x0}, m_psi = 0x0}}, row_info=@0x14b130c57970: {tx = 0x14b0f82724e0, new_data = 0x14b0f8259958 "\376\023", old_data = 0x0, new_pk_slice = {data_ = 0x14b0f8237628 "", size_ = 8}, old_pk_slice = {data_ = 0x14b121711fe0 "", size_ = 0}, old_pk_rec = {data_ = 0x14b121711fe0 "", size_ = 0}, new_pk_unpack_info = 0x14b0f825a3e0, hidden_pk_id = 0, skip_unique_check = false}, bulk_load_sk=bulk_load_sk@entry=false) at /test/10.7_dbg/storage/rocksdb/ha_rocksdb.cc:10206 #7 0x000014b12134b627 in myrocks::ha_rocksdb::update_write_indexes (this=this@entry=0x14b0f8259de0, row_info=@0x14b130c57970: {tx = 0x14b0f82724e0, new_data = 0x14b0f8259958 "\376\023", old_data = 0x0, new_pk_slice = {data_ = 0x14b0f8237628 "", size_ = 8}, old_pk_slice = {data_ = 0x14b121711fe0 "", size_ = 0}, old_pk_rec = {data_ = 0x14b121711fe0 "", size_ = 0}, new_pk_unpack_info = 0x14b0f825a3e0, hidden_pk_id = 0, skip_unique_check = false}, pk_changed=pk_changed@entry=false) at /usr/include/c++/9/bits/shared_ptr_base.h:1309 #8 0x000014b12134b866 in myrocks::ha_rocksdb::update_write_row (this=this@entry=0x14b0f8259de0, old_data=old_data@entry=0x0, new_data=new_data@entry=0x14b0f8259958 "\376\023", skip_unique_check=<optimized out>) at /test/10.7_dbg/storage/rocksdb/ha_rocksdb.cc:10390 #9 0x000014b12134baa4 in myrocks::ha_rocksdb::write_row (this=0x14b0f8259de0, buf=0x14b0f8259958 "\376\023") at /test/10.7_dbg/storage/rocksdb/ha_rocksdb.cc:9590 #10 0x0000559c2802d7b7 in handler::ha_write_row (this=0x14b0f8259de0, buf=0x14b0f8259958 "\376\023") at /test/10.7_dbg/sql/handler.cc:7516 #11 0x0000559c27cd23da in write_record (thd=thd@entry=0x14b0f8000db8, table=table@entry=0x14b0f8268998, info=info@entry=0x14b130c57cc0, sink=sink@entry=0x0) at /test/10.7_dbg/sql/sql_insert.cc:2136 #12 0x0000559c27cde028 in mysql_insert (thd=thd@entry=0x14b0f8000db8, table_list=0x14b0f8013d80, fields=@0x14b0f8005fb8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x559c293184a0 <end_of_list>, last = 0x14b0f8005fb8, elements = 0}, <No data fields>}, values_list=@0x14b0f8006000: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14b0f8014a38, last = 0x14b0f8014a38, elements = 1}, <No data fields>}, update_fields=@0x14b0f8005fe8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x559c293184a0 <end_of_list>, last = 0x14b0f8005fe8, elements = 0}, <No data fields>}, update_values=@0x14b0f8005fd0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x559c293184a0 <end_of_list>, last = 0x14b0f8005fd0, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/10.7_dbg/sql/sql_insert.cc:1124 #13 0x0000559c27d24112 in mysql_execute_command (thd=thd@entry=0x14b0f8000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.7_dbg/sql/sql_parse.cc:4563 #14 0x0000559c27d0ed4b in mysql_parse (thd=thd@entry=0x14b0f8000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14b130c58400) at /test/10.7_dbg/sql/sql_parse.cc:8028 #15 0x0000559c27d1d944 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14b0f8000db8, packet=packet@entry=0x14b0f800b729 "INSERT INTO t VALUES (19, 'aøaaaøaaaaaaaaøaaaa')", packet_length=packet_length@entry=51, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_class.h:1358 #16 0x0000559c27d20d4a in do_command (thd=0x14b0f8000db8, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_parse.cc:1402 #17 0x0000559c27e96ed8 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x559c2ae86078, put_in_cache=put_in_cache@entry=true) at /test/10.7_dbg/sql/sql_connect.cc:1418 #18 0x0000559c27e974dd in handle_one_connection (arg=arg@entry=0x559c2ae86078) at /test/10.7_dbg/sql/sql_connect.cc:1312 #19 0x0000559c2830047e in pfs_spawn_thread (arg=0x559c2ad852c8) at /test/10.7_dbg/storage/perfschema/pfs.cc:2201 #20 0x000014b14601b609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #21 0x000014b145c09293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Bug confirmed present in: MariaDB: 10.2.41 (dbg), 10.2.41 (opt), 10.3.32 (dbg), 10.3.32 (opt), 10.4.22 (dbg), 10.4.22 (opt), 10.5.13 (dbg), 10.5.13 (opt), 10.6.5 (dbg), 10.6.5 (opt), 10.7.0 (dbg), 10.7.0 (opt) Bug (or feature/syntax) confirmed not present in: MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.35 (dbg), 5.7.35 (opt), 8.0.26 (dbg), 8.0.26 (opt)
            danblack Daniel Black added a comment -

            Given how deep in the stack this is, I'm linking to a submodule update - MDEV-30610 and will reevaluate after an update.

            danblack Daniel Black added a comment - Given how deep in the stack this is, I'm linking to a submodule update - MDEV-30610 and will reevaluate after an update.

            People

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