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

Null pointer dereference in myrocks::Rdb_key_def::get_keyno()

Details

    • Yes

    Description

      The attached MTR testcase crashes the server.

      Current Git commit is 1fbba6a54a7170b8e464e3366bb6473aa4cbea59, branch 8.0.

      Here is the backtrace:

      #0  __pthread_kill (threadid=<optimized out>, signo=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x00005597540ce174 in my_write_core (sig=11) at /work/percona-server/mysys/stacktrace.cc:395
      #2  0x00005597530fc81c in handle_fatal_signal (sig=11) at /work/percona-server/sql/signal_handler.cc:194
      #3  <signal handler called>
      #4  0x00007fe6bfb021c0 in myrocks::Rdb_key_def::get_keyno (this=0x0) at /work/percona-server/storage/rocksdb/././rdb_datadic.h:367
      #5  0x00007fe6bfb05115 in myrocks::Rdb_transaction::finish_bulk_load (this=0x7fe658514d00, is_critical_error=0x7fe72c1e5096, print_client_error=true, table_arg=0x7fe658129560, table_name_arg=0x7fe658420b10 "./test/t") at /work/percona-server/storage/rocksdb/ha_rocksdb.cc:3165
      #6  0x00007fe6bfaed1fb in myrocks::ha_rocksdb::inplace_populate_sk (this=0x7fe658127a88, new_table_arg=0x7fe658129560, indexes=std::unordered_set with 1 element = {...}) at /work/percona-server/storage/rocksdb/ha_rocksdb.cc:13351
      #7  0x00007fe6bfaec3f9 in myrocks::ha_rocksdb::inplace_alter_table (this=0x7fe658127a88, altered_table=0x7fe658129560, ha_alter_info=0x7fe72c1e5e70, old_table_def=0x7fe6583d6cb8, new_table_def=0x7fe65842c0f8) at /work/percona-server/storage/rocksdb/ha_rocksdb.cc:13120
      #8  0x00005597526fce37 in handler::ha_inplace_alter_table (this=0x7fe658127a88, altered_table=0x7fe658129560, ha_alter_info=0x7fe72c1e5e70, old_table_def=0x7fe6583d6cb8, new_table_def=0x7fe65842c0f8) at /work/percona-server/sql/handler.h:6067
      #9  0x0000559752fa5fe4 in mysql_inplace_alter_table (thd=0x7fe6585c0a80, schema=..., new_schema=..., table_def=0x7fe6583d6cb8, altered_table_def=0x7fe65842c0f8, table_list=0x7fe6586641f8, table=0x7fe658429c00, altered_table=0x7fe658129560, ha_alter_info=0x7fe72c1e5e70, inplace_supported=HA_ALTER_INPLACE_SHARED_LOCK_AFTER_PREPARE, alter_ctx=0x7fe72c1e69c0, columns=std::set with 0 elements, fk_key_info=0x7fe658666a40, fk_key_count=0, fk_invalidator=0x7fe72c1e5db0) at /work/percona-server/sql/sql_table.cc:13337
      #10 0x0000559752fb36ee in mysql_alter_table (thd=0x7fe6585c0a80, new_db=0x7fe658664880 "test", new_name=0x0, create_info=0x7fe72c1e7ea0, table_list=0x7fe6586641f8, alter_info=0x7fe72c1e7d00) at /work/percona-server/sql/sql_table.cc:17560
      #11 0x0000559752cfa4a5 in Sql_cmd_alter_table::execute (this=0x7fe658664a48, thd=0x7fe6585c0a80) at /work/percona-server/sql/sql_alter.cc:369
      #12 0x0000559752eb6a9c in mysql_execute_command (thd=0x7fe6585c0a80, first_level=true) at /work/percona-server/sql/sql_parse.cc:4789
      #13 0x0000559752eb8e0f in dispatch_sql_command (thd=0x7fe6585c0a80, parser_state=0x7fe72c1e9aa0, update_userstat=false) at /work/percona-server/sql/sql_parse.cc:5427
      #14 0x0000559752eae10a in dispatch_command (thd=0x7fe6585c0a80, com_data=0x7fe72c1eab70, command=COM_QUERY) at /work/percona-server/sql/sql_parse.cc:2015
      #15 0x0000559752eac1ae in do_command (thd=0x7fe6585c0a80) at /work/percona-server/sql/sql_parse.cc:1405
      #16 0x00005597530d813e in handle_connection (arg=0x5597597aa1b0) at /work/percona-server/sql/conn_handler/connection_handler_per_thread.cc:308
      #17 0x00005597548f98f9 in pfs_spawn_thread (arg=0x5597599a9880) at /work/percona-server/storage/perfschema/pfs.cc:2947
      #18 0x00007fe73d4bc609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #19 0x00007fe73d3df163 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      
      

       

      Attachments

        Issue Links

          Activity

            People

              amonar Anton Matvienko
              rinat.ibragimov Rinat Ibragimov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Smart Checklist