Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-4971

[PS8QA] Setting utf8mb4 as a key in MyRocks table could lead to a server crash

Details

    • Bug
    • Status: Done
    • Critical
    • Resolution: Fixed
    • 8.0.12-2rc1, Not 5.7.x
    • 8.0.13-3
    • MyRocks
    • None

    Description

      sql:

      # mysqld options required for replay: --plugin-load-add=RocksDB=ha_rocksdb.so
      CREATE DATABASE test;
      USE test;
      create TABLE t1(str varchar(255)character set utf8mb4,key str (str(2))) engine=RocksDB;
      insert INTO t1 values("1111111111111111111111111111111111111111111111111111");
      

      gdb:

      +bt
      #0  0x00007fba366ffa01 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
      #1  0x0000000003e11c99 in my_write_core (sig=6) at /home/hrvoje/worktable/PS-8.0.12-2_dbg/mysys/stacktrace.cc:278
      #2  0x0000000002e802cb in handle_fatal_signal (sig=6) at /home/hrvoje/worktable/PS-8.0.12-2_dbg/sql/signal_handler.cc:254
      #3  <signal handler called>
      #4  0x00007fba34803277 in __GI_raise ([email protected]=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
      #5  0x00007fba34804968 in __GI_abort () at abort.c:90
      #6  0x00007fba347fc096 in __assert_fail_base (fmt=0x7fba34957580 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", [email protected]=0x7fb9e39dccc8 "is_storage_available(tuple - packed_tuple, 0)", [email protected]=0x7fb9e39dc6b8 "/home/hrvoje/worktable/PS-8.0.12-2_dbg/storage/rocksdb/rdb_datadic.cc", [email protected]=1234, [email protected]=0x7fb9e39dffc0 <myrocks::Rdb_key_def::pack_record(TABLE const*, unsigned char*, unsigned char const*, unsigned char*, myrocks::Rdb_string_writer*, bool const&, long long const&, unsigned int, 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*, const bool&, const longlong&, uint, uint*, uint*, const char*) const") at assert.c:92
      #7  0x00007fba347fc142 in __GI___assert_fail (assertion=0x7fb9e39dccc8 "is_storage_available(tuple - packed_tuple, 0)", file=0x7fb9e39dc6b8 "/home/hrvoje/worktable/PS-8.0.12-2_dbg/storage/rocksdb/rdb_datadic.cc", line=1234, function=0x7fb9e39dffc0 <myrocks::Rdb_key_def::pack_record(TABLE const*, unsigned char*, unsigned char const*, unsigned char*, myrocks::Rdb_string_writer*, bool const&, long long const&, unsigned int, 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*, const bool&, const longlong&, uint, uint*, uint*, const char*) const") at assert.c:101
      #8  0x00007fb9e33da51a in myrocks::Rdb_key_def::pack_record (this=0x7fb9d1db3658, tbl=0x7fb9d1caf620, pack_buffer=0x7fb9d1c448a0 "\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>\034>", record=0x7fb9d1cb0028 "\376\064", packed_tuple=0x7fb9d1c446a0 "", unpack_info=0x7fb9d1e39918, [email protected]: false, [email protected]: 1, n_key_parts=2, n_null_fields=0x0, ttl_pk_offset=0x0, ttl_bytes=0x7fb9d1e39998 "") at /home/hrvoje/worktable/PS-8.0.12-2_dbg/storage/rocksdb/rdb_datadic.cc:1234
      #9  0x00007fb9e337b142 in myrocks::ha_rocksdb::update_sk (this=0x7fb9d1e38028, table_arg=0x7fb9d1caf620, kd=..., row_info=..., bulk_load_sk=false) at /home/hrvoje/worktable/PS-8.0.12-2_dbg/storage/rocksdb/ha_rocksdb.cc:8908
      #10 0x00007fb9e337b61b in myrocks::ha_rocksdb::update_indexes (this=0x7fb9d1e38028, row_info=..., [email protected]: false) at /home/hrvoje/worktable/PS-8.0.12-2_dbg/storage/rocksdb/ha_rocksdb.cc:8991
      #11 0x00007fb9e337b86b in myrocks::ha_rocksdb::update_write_row (this=0x7fb9d1e38028, old_data=0x0, new_data=0x7fb9d1cb0028 "\376\064", skip_unique_check=false) at /home/hrvoje/worktable/PS-8.0.12-2_dbg/storage/rocksdb/ha_rocksdb.cc:9052
      #12 0x00007fb9e3379859 in myrocks::ha_rocksdb::write_row (this=0x7fb9d1e38028, buf=0x7fb9d1cb0028 "\376\064") at /home/hrvoje/worktable/PS-8.0.12-2_dbg/storage/rocksdb/ha_rocksdb.cc:8444
      #13 0x0000000002995690 in handler::ha_write_row (this=0x7fb9d1e38028, buf=0x7fb9d1cb0028 "\376\064") at /home/hrvoje/worktable/PS-8.0.12-2_dbg/sql/handler.cc:7828
      #14 0x0000000002c8f260 in write_record (thd=0x7fb9d1c1a000, table=0x7fb9d1caf620, info=0x7fba331a68b0, update=0x7fba331a6930) at /home/hrvoje/worktable/PS-8.0.12-2_dbg/sql/sql_insert.cc:1841
      #15 0x0000000002c8bc2d in Sql_cmd_insert_values::execute_inner (this=0x7fb9d1dc6280, thd=0x7fb9d1c1a000) at /home/hrvoje/worktable/PS-8.0.12-2_dbg/sql/sql_insert.cc:614
      #16 0x0000000002d3b38c in Sql_cmd_dml::execute (this=0x7fb9d1dc6280, thd=0x7fb9d1c1a000) at /home/hrvoje/worktable/PS-8.0.12-2_dbg/sql/sql_select.cc:555
      #17 0x0000000002cde88e in mysql_execute_command (thd=0x7fb9d1c1a000, first_level=true) at /home/hrvoje/worktable/PS-8.0.12-2_dbg/sql/sql_parse.cc:3375
      #18 0x0000000002ce4005 in mysql_parse (thd=0x7fb9d1c1a000, parser_state=0x7fba331a8160, update_userstat=false) at /home/hrvoje/worktable/PS-8.0.12-2_dbg/sql/sql_parse.cc:5143
      #19 0x0000000002cd9ca4 in dispatch_command (thd=0x7fb9d1c1a000, com_data=0x7fba331a8b20, command=COM_QUERY) at /home/hrvoje/worktable/PS-8.0.12-2_dbg/sql/sql_parse.cc:1654
      #20 0x0000000002cd852e in do_command (thd=0x7fb9d1c1a000) at /home/hrvoje/worktable/PS-8.0.12-2_dbg/sql/sql_parse.cc:1262
      #21 0x0000000002e6d6c8 in handle_connection (arg=0x7fb9e272e1c0) at /home/hrvoje/worktable/PS-8.0.12-2_dbg/sql/conn_handler/connection_handler_per_thread.cc:317
      #22 0x0000000003ef5671 in pfs_spawn_thread (arg=0x7fb9e270ae20) at /home/hrvoje/worktable/PS-8.0.12-2_dbg/storage/perfschema/pfs.cc:2836
      #23 0x00007fba366fae25 in start_thread (arg=0x7fba331a9700) at pthread_create.c:308
      #24 0x00007fba348cbbad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
      

      Reproduced on: Percona Server 8.0.12-2rc1 release branch (4ed261eb50d6f51ac03f5126682571a512f1daea).

      Attachments

        Issue Links

          Activity

            People

              george.lorch George Lorch (Inactive)
              hrvoje.matijakovic Hrvoje Matijakovic
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 1 day, 2 hours, 45 minutes
                  1d 2h 45m

                  Smart Checklist