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

Non-debug assertion failure upon concurrent vector index creation and select

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • N/A
    • 11.7.1
    • Vector search
    • None

    Description

      The test case is non-deterministic and for reproducing purposes only, please don't put it into the regression suite.

      --source include/have_sequence.inc
       
      CREATE TABLE t (pk INT NOT NULL AUTO_INCREMENT, a INT, b DATE, c TIME(6), v BLOB NOT NULL DEFAULT x'00000000', PRIMARY KEY (pk), KEY (a), KEY (b), KEY (c)) ENGINE=MyISAM;
      INSERT INTO t (c) SELECT TIME(NOW(6)) FROM seq_1_to_500;
       
      --connect (con1,localhost,root,,)
      --let $conid= `select connection_id()`
      --delimiter $
      --send
      LOOP
        ALTER TABLE t ADD VECTOR INDEX (v);
        ALTER TABLE t DROP INDEX v;
      END LOOP $
      --delimiter ;
       
      --connection default
      --let $run=100
      while ($run)
      {
        SELECT * FROM t ORDER BY c LIMIT 1;
        --dec $run
      }
       
      # Cleanup
      --eval KILL $conid
      DROP TABLE t;
      

      bb-11.6-MDEV-32887-vector 6651768a1db08b3887c68c735688715697a38732

      Version: '11.7.0-MariaDB-debug-log'  socket: '/mnt8t/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/mysql-test/var/tmp/mysqld.1.sock'  port: 19000  Source distribution
      mariadbd: /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/perfschema/pfs.cc:4265: void pfs_end_table_io_wait_v1(PSI_table_locker*, ulonglong): Assertion `(state->m_index < table->m_share->m_key_count) || (state->m_index == MAX_INDEXES)' failed.
      241001 21:56:08 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007fed60a53e32 in __GI___assert_fail (assertion=0x560a59c0e4a0 "(state->m_index < table->m_share->m_key_count) || (state->m_index == MAX_INDEXES)", file=0x560a59c0b5e0 "/data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/perfschema/pfs.cc", line=4265, function=0x560a59c0e400 "void pfs_end_table_io_wait_v1(PSI_table_locker*, ulonglong)") at ./assert/assert.c:101
      #10 0x0000560a582625ad in pfs_end_table_io_wait_v1 (locker=0x61d0002265e0, numrows=1) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/perfschema/pfs.cc:4265
      #11 0x0000560a57a6a105 in handler::end_psi_batch_mode (this=0x61d0002260b8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/handler.cc:3560
      #12 0x0000560a57277f64 in sub_select (join=0x6290000e7c10, join_tab=0x62900028f238, end_of_records=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:23706
      #13 0x0000560a57274fff in do_select (join=0x6290000e7c10, procedure=0x0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:23164
      #14 0x0000560a571f3482 in JOIN::exec_inner (this=0x6290000e7c10) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:5025
      #15 0x0000560a571f080c in JOIN::exec (this=0x6290000e7c10) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:4808
      #16 0x0000560a571f4f3b in mysql_select (thd=0x62c0000c0218, tables=0x6290000e6968, fields=..., conds=0x0, og_num=1, order=0x6290000e7a48, group=0x0, having=0x0, proc_param=0x0, select_options=2164525824, result=0x6290000e7be0, unit=0x62c0000c4710, select_lex=0x6290000e62f0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:5341
      #17 0x0000560a571c35f3 in handle_select (thd=0x62c0000c0218, lex=0x62c0000c4630, result=0x6290000e7be0, setup_tables_done_option=0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:624
      #18 0x0000560a570e61a9 in execute_sqlcom_select (thd=0x62c0000c0218, all_tables=0x6290000e6968) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:6151
      #19 0x0000560a570d5dd4 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:3953
      #20 0x0000560a570f0bfa in mysql_parse (thd=0x62c0000c0218, rawbuf=0x6290000e6238 "SELECT * FROM t ORDER BY c LIMIT 1", length=34, parser_state=0x7fed557d69f0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:7873
      #21 0x0000560a570c7c1c in dispatch_command (command=COM_QUERY, thd=0x62c0000c0218, packet=0x629000253219 "", packet_length=34, blocking=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:1892
      #22 0x0000560a570c4930 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
      #23 0x0000560a575b4189 in do_handle_one_connection (connect=0x6080000034b8, put_in_cache=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_connect.cc:1448
      #24 0x0000560a575b3b4a in handle_one_connection (arg=0x608000003438) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_connect.cc:1350
      #25 0x0000560a58257520 in pfs_spawn_thread (arg=0x617000005b98) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/perfschema/pfs.cc:2198
      #26 0x00007fed60aa8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #27 0x00007fed60b2861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      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.