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

Assertion in InnoDB's FTS code may be triggered by a repeated words fed to simple_parser plugin

    XMLWordPrintable

    Details

      Description

      It's possible to trigger an assertion in debug builds by executing the following statements:

      INSTALL PLUGIN simple_parser SONAME 'mypluglib';
      CREATE TABLE articles(
       a TEXT DEFAULT NULL,
       b TEXT DEFAULT NULL,
       FULLTEXT (a, b) WITH PARSER simple_parser
      ) ENGINE=InnoDB;
      INSERT INTO articles VALUES ('111', '1234 1234 1234');
      DROP TABLE articles;
      UNINSTALL PLUGIN simple_parser;
      

      Here is what the stack trace looks like:

      Thread pointer: 0x7f9f6c000d90
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7f9fc6bdedd0 thread_stack 0x49000
      /work/mariadb/build/sql/mysqld(my_print_stacktrace+0x3c)[0x55c52cc99c12]
      mysys/stacktrace.c:268(my_print_stacktrace)[0x55c52c35a24a]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x15540)[0x7f9fcd704540]
      /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f9fcc8e93eb]
      /lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7f9fcc8c8899]
      /lib/x86_64-linux-gnu/libc.so.6(+0x25769)[0x7f9fcc8c8769]
      /lib/x86_64-linux-gnu/libc.so.6(+0x37006)[0x7f9fcc8da006]
      fts/fts0fts.cc:1274(fts_cache_node_add_positions(fts_cache_t*, fts_node_t*, unsigned long, ib_vector_t*))[0x55c52c85b3c9]
      fts/fts0fts.cc:1409(fts_cache_add_doc(fts_cache_t*, fts_index_cache_t*, unsigned long, ib_rbt_t*))[0x55c52c85b849]
      fts/fts0fts.cc:3581(fts_add_doc_by_id(fts_trx_table_t*, unsigned long, ib_vector_t*))[0x55c52c85fffa]
      fts/fts0fts.cc:2871(fts_add(fts_trx_table_t*, fts_trx_row_t*))[0x55c52c85e63b]
      fts/fts0fts.cc:3042(fts_commit_table(fts_trx_table_t*))[0x55c52c85edf6]
      fts/fts0fts.cc:3090(fts_commit(trx_t*))[0x55c52c85eeed]
      trx/trx0trx.cc:1863(trx_commit_low(trx_t*, mtr_t*))[0x55c52cab4bcc]
      trx/trx0trx.cc:1940(trx_commit(trx_t*))[0x55c52cab4da1]
      trx/trx0trx.cc:2164(trx_commit_for_mysql(trx_t*))[0x55c52cab5690]
      handler/ha_innodb.cc:4424(innobase_commit_low(trx_t*))[0x55c52c744cac]
      handler/ha_innodb.cc:4550(innobase_commit_ordered_2(trx_t*, THD*))[0x55c52c744ff8]
      handler/ha_innodb.cc:4674(innobase_commit(handlerton*, THD*, bool))[0x55c52c74545e]
      sql/handler.cc:1604(commit_one_phase_2(THD*, bool, THD_TRANS*, bool))[0x55c52c1db56b]
      sql/handler.cc:1585(ha_commit_one_phase(THD*, bool))[0x55c52c1db461]
      sql/handler.cc:1452(ha_commit_trans(THD*, bool))[0x55c52c1dad09]
      sql/transaction.cc:510(trans_commit_stmt(THD*))[0x55c52c63659a]
      sql/sql_parse.cc:6036(mysql_execute_command(THD*))[0x55c52c4aec16]
      sql/sql_parse.cc:7733(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55c52c4b366f]
      sql/sql_parse.cc:1826(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55c52c4a197e]
      sql/sql_parse.cc:1377(do_command(THD*))[0x55c52c4a0479]
      sql/sql_connect.cc:1336(do_handle_one_connection(CONNECT*))[0x55c52c6205d5]
      sql/sql_connect.cc:1242(handle_one_connection)[0x55c52c62033a]
      perfschema/pfs.cc:1871(pfs_spawn_thread)[0x55c52cc18296]
      nptl/pthread_create.c:480(start_thread)[0x7f9fcd6f8669]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x43)[0x7f9fcc9c5323]
      
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              serg Sergei Golubchik
              Reporter:
              rinat.ibragimov Rinat Ibragimov
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated: