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

Assertion failure in myrocks::ha_rocksdb::position_to_correct_key upon using unique hash key

    XMLWordPrintable

Details

    Description

      Not related directly to vectors, but caused by changes in the vector branch.

      --source include/have_rocksdb.inc
       
      CREATE TABLE t (s INT, UNIQUE(s) USING HASH) ENGINE=RocksDB;
      UPDATE t SET s = 1 WHERE s > 2;
       
      # Cleanup
      DROP TABLE t;
      

      bb-11.6-MDEV-32887-vector 77be73c489fb7c21ca58e78cef10e0c166f293d8

      mariadbd: /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/rocksdb/ha_rocksdb.cc:8121: int myrocks::ha_rocksdb::position_to_correct_key(const myrocks::Rdb_key_def&, const ha_rkey_function&, bool, const uchar*, const key_part_map&, const rocksdb::Slice&, bool*, int64_t): Assertion `0' failed.
      241004 14:51:39 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007fa86a053e32 in __GI___assert_fail (assertion=0x7fa8621b0140 "0", file=0x7fa8621a1880 "/data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/rocksdb/ha_rocksdb.cc", line=8121, function=0x7fa8621b2da0 "int myrocks::ha_rocksdb::position_to_correct_key(const myrocks::Rdb_key_def&, const ha_rkey_function&, bool, const uchar*, const key_part_map&, const rocksdb::Slice&, bool*, int64_t)") at ./assert/assert.c:101
      #10 0x00007fa860fd96f7 in myrocks::ha_rocksdb::position_to_correct_key (this=0x61d000267ab8, kd=..., find_flag=@0x7fa85972c920: 134, full_key_match=false, key=0x6210001a3000 "", keypart_map=@0x7fa85972c950: 1, key_slice=..., move_forward=0x7fa85972c8e0, ttl_filter_ts=1728042829) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/rocksdb/ha_rocksdb.cc:8121
      #11 0x00007fa860fdd2f9 in myrocks::ha_rocksdb::index_read_map_impl (this=0x61d000267ab8, buf=0x6190000ccbc8 "\377", key=0x6210001a3000 "", keypart_map=1, find_flag=134, end_key=0x0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/rocksdb/ha_rocksdb.cc:8629
      #12 0x00007fa860fdbfaf in myrocks::ha_rocksdb::index_read_map (this=0x61d000267ab8, buf=0x6190000ccbc8 "\377", key=0x6210001a3000 "", keypart_map=1, find_flag=134) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/rocksdb/ha_rocksdb.cc:8463
      #13 0x0000565226838a44 in handler::ha_index_read_map (this=0x61d000267ab8, buf=0x6190000ccbc8 "\377", key=0x6210001a3000 "", keypart_map=1, find_flag=134) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/handler.cc:3802
      #14 0x0000565225b57945 in QUICK_RANGE_SELECT_GEOM::get_next (this=0x613000061240) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/opt_range.cc:13388
      #15 0x0000565225bb4b5a in rr_quick (info=0x7fa85972d120) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/records.cc:398
      #16 0x0000565225b7efc8 in READ_RECORD::read_record (this=0x7fa85972d120) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/records.h:77
      #17 0x0000565226241127 in Sql_cmd_update::update_single_table (this=0x62900004bc88, thd=0x62c0000c0218) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_update.cc:785
      #18 0x00005652262574b7 in Sql_cmd_update::execute_inner (this=0x62900004bc88, thd=0x62c0000c0218) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_update.cc:3102
      #19 0x000056522608a2ee in Sql_cmd_dml::execute (this=0x62900004bc88, thd=0x62c0000c0218) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:33798
      #20 0x0000565225ea2790 in mysql_execute_command (thd=0x62c0000c0218, is_called_from_prepared_stmt=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:4402
      #21 0x0000565225ebabfa in mysql_parse (thd=0x62c0000c0218, rawbuf=0x62900004b238 "UPDATE t SET s = 1 WHERE s > 2", length=30, parser_state=0x7fa85972e9f0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:7873
      #22 0x0000565225e91c1c in dispatch_command (command=COM_QUERY, thd=0x62c0000c0218, packet=0x62900026c219 "UPDATE t SET s = 1 WHERE s > 2", packet_length=30, blocking=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:1892
      #23 0x0000565225e8e930 in do_command (thd=0x62c0000c0218, blocking=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:1405
      #24 0x000056522637e189 in do_handle_one_connection (connect=0x6080000061b8, put_in_cache=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_connect.cc:1448
      #25 0x000056522637db4a in handle_one_connection (arg=0x608000006138) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_connect.cc:1350
      #26 0x0000565227021672 in pfs_spawn_thread (arg=0x617000008c98) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/perfschema/pfs.cc:2198
      #27 0x00007fa86a0a8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #28 0x00007fa86a12861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      The failure started happening after this commit:

      commit 8d2bd8dd714e94a2df7ab6566d1f4c465a79ef9a
      Author: Sergei Golubchik
      Date:   Sun Jan 14 11:43:43 2024 +0100
       
          cleanup: key algorithm vs key flags
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              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.