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

SIGSEGV in myrocks::ha_rocksdb::check_keyread_allowed on CREATE TABLE ... KEY

    XMLWordPrintable

Details

    Description

      Whilst this bug seems very closely related to MDEV-29393, the stack is very different, so I am creating a separate ticket for this one - in case the underlying issue is different too.
      Only present in bb-10.10-MDEV-16329.

      INSTALL SONAME 'ha_rocksdb.so';
      CREATE TABLE t (a INT,KEY(a)) ENGINE=RocksDB;
      

      10.10.0 7a41e4fbc62c5e917d9cb4dc045e21c983d4e73f (Optimized)

      Core was generated by `/test/MDEV-16329_bb-10.10-MDEV-16329_MD240822-mariadb-10.10.0-linux-x86_64-opt/'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x000014938a90dbf0 in myrocks::ha_rocksdb::check_keyread_allowed (
          this=this@entry=0x14935c2c8a00, inx=inx@entry=0, part=0, 
          all_parts=<optimized out>)
          at /test/bb-10.10-MDEV-16329_opt/storage/rocksdb/ha_rocksdb.cc:7931
      7931	  res = dummy1.setup(nullptr, key_info->key_part[part].field, inx, part,
      [Current thread is 1 (Thread 0x1493a4050700 (LWP 69132))]
      (gdb) bt
      #0  0x000014938a90dbf0 in myrocks::ha_rocksdb::check_keyread_allowed (this=this@entry=0x14935c2c8a00, inx=inx@entry=0, part=0, all_parts=<optimized out>) at /test/bb-10.10-MDEV-16329_opt/storage/rocksdb/ha_rocksdb.cc:7931
      #1  0x000014938a90ddd8 in myrocks::ha_rocksdb::index_flags (this=0x14935c2c8a00, inx=0, part=<optimized out>, all_parts=<optimized out>) at /test/bb-10.10-MDEV-16329_opt/storage/rocksdb/ha_rocksdb.cc:8286
      #2  0x000055dfe4ac50a1 in TABLE_SHARE::init_from_binary_frm_image (this=this@entry=0x1493a404bdb0, thd=thd@entry=0x14935c000db8, write=<optimized out>, frm_image=<optimized out>, frm_length=<optimized out>, par_image=par_image@entry=0x0, par_length=0) at /test/preview-10.10-ddl_dbg/sql/table.cc:3080
      #3  0x000055dfe4c8c2b6 in ha_create_table (thd=thd@entry=0x14935c000db8, path=<optimized out>, db=0x14935c014550 "test", table_name=0x14935c013e30 "t", create_info=create_info@entry=0x1493a404d230, frm=frm@entry=0x1493a404cc60, skip_frm_file=false) at /test/preview-10.10-ddl_dbg/sql/handler.cc:5894
      #4  0x000055dfe4a75a05 in create_table_impl (thd=thd@entry=0x14935c000db8, orig_db=@0x14935c013e68: {str = 0x14935c014550 "test", length = 4}, orig_table_name=@0x14935c013e78: {str = 0x14935c013e30 "t", length = 1}, db=@0x14935c013e68: {str = 0x14935c014550 "test", length = 4}, table_name=@0x14935c013e78: {str = 0x14935c013e30 "t", length = 1}, path=@0x1493a404cc50: {str = 0x1493a404cc70 "./test/t", length = 8}, options=<optimized out>, create_info=0x1493a404d230, alter_info=0x1493a404d050, create_table_mode=0, is_trans=0x1493a404cf50, key_info=0x1493a404cc48, key_count=0x1493a404cc44, frm=0x1493a404cc60) at /test/preview-10.10-ddl_dbg/sql/sql_table.cc:4929
      #5  0x000055dfe4a75e4d in mysql_create_table_no_lock (thd=thd@entry=0x14935c000db8, orig_db=orig_db@entry=0x14935c013e68, orig_table_name=orig_table_name@entry=0x14935c013e78, db=0x14935c013e68, table_name=0x14935c013e78, create_info=create_info@entry=0x1493a404d230, alter_info=0x1493a404d050, is_trans=0x1493a404cf50, create_table_mode=0, table_list=0x14935c013e68, frm=0x1493a404cc60) at /test/preview-10.10-ddl_dbg/sql/sql_table.cc:5056
      #6  0x000055dfe4a787b2 in mysql_create_table (alter_info=0x1493a404d050, create_info=0x1493a404d230, create_table=<optimized out>, thd=0x14935c000db8) at /test/preview-10.10-ddl_dbg/sql/sql_table.cc:5183
      #7  Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x14935c000db8) at /test/preview-10.10-ddl_dbg/sql/sql_table.cc:12935
      #8  0x000055dfe49a1a4d in mysql_execute_command (thd=thd@entry=0x14935c000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/preview-10.10-ddl_dbg/sql/sql_parse.cc:5996
      #9  0x000055dfe498a0cd in mysql_parse (thd=thd@entry=0x14935c000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1493a404f470) at /test/preview-10.10-ddl_dbg/sql/sql_parse.cc:8038
      #10 0x000055dfe49976b0 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14935c000db8, packet=packet@entry=0x14935c00b7f9 "CREATE TABLE t (a INT,KEY(a)) ENGINE=RocksDB", packet_length=packet_length@entry=44, blocking=blocking@entry=true) at /test/preview-10.10-ddl_dbg/sql/sql_class.h:1365
      #11 0x000055dfe4999dc1 in do_command (thd=0x14935c000db8, blocking=blocking@entry=true) at /test/preview-10.10-ddl_dbg/sql/sql_parse.cc:1407
      #12 0x000055dfe4afc7ba in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55dfe756b458, put_in_cache=put_in_cache@entry=true) at /test/preview-10.10-ddl_dbg/sql/sql_connect.cc:1418
      #13 0x000055dfe4afccc3 in handle_one_connection (arg=0x55dfe756b458) at /test/preview-10.10-ddl_dbg/sql/sql_connect.cc:1312
      #14 0x00001493bbd11609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #15 0x00001493bb8fd133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Debug can not be tested given the undefined opt_debug_sync_timeout symbol as described in MDEV-29393.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.