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

Full-text search of the utf8mb4 column causes crash

Details

    Description

      A user saw the following crash:

      160422 12:27:27 [ERROR] mysqld got signal 11 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
       
      To report this bug, see http://kb.askmonty.org/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed,
      something is definitely wrong and this may fail.
       
      Server version: 10.0.24-MariaDB-1~trusty-wsrep
      key_buffer_size=16777216
      read_buffer_size=131072
      max_used_connections=10
      max_threads=502
      thread_count=3
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 122893 K bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x0x7f8bb9ddb008
      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 = 0x7f8d27a99df0 thread_stack 0x48000
      (my_addr_resolve failure: fork)
      /usr/sbin/mysqld(my_print_stacktrace+0x2e) [0x7f8d285e544e]
      /usr/sbin/mysqld(handle_fatal_signal+0x457) [0x7f8d281145f7]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x10340) [0x7f8d268b4340]
      /usr/sbin/mysqld(Item_func_match::fix_index()+0x192) [0x7f8d28183712]
      /usr/sbin/mysqld(setup_ftfuncs(st_select_lex*)+0x34) [0x7f8d27f3b314]
      /usr/sbin/mysqld(JOIN::optimize()+0x294) [0x7f8d27fde334]
      /usr/sbin/mysqld(handle_select(THD*, LEX*, select_result*, unsigned long)+0x2e5) [0x7f8d27fe32d5]
      /usr/sbin/mysqld(+0x401c59) [0x7f8d27f7ac59]
      /usr/sbin/mysqld(mysql_execute_command(THD*)+0x5d25) [0x7f8d27f8a4a5]
      /usr/sbin/mysqld(+0x415feb) [0x7f8d27f8efeb]
      /usr/sbin/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0x1fa1) [0x7f8d27f915f1]
      /usr/sbin/mysqld(do_command(THD*)+0x28f) [0x7f8d27f922ff]
      /usr/sbin/mysqld(do_handle_one_connection(THD*)+0x32b) [0x7f8d2806242b]
      /usr/sbin/mysqld(handle_one_connection+0x40) [0x7f8d28062510]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x8182) [0x7f8d268ac182]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f8d25fcf47d]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f8a6a064020): is an invalid pointer
      Connection ID (thread ID): 26348
      Status: NOT_KILLED
       
      Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on
       
      The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
      information that should help you find out what is causing the crash
      

      To reproduce, create the following table:

      CREATE TABLE `fts_table` (
      	`id` VARCHAR(255) NOT NULL COLLATE 'utf8_general_ci',
      	`BUSINESS_NAME` TEXT NULL COLLATE 'utf8mb4_unicode_ci',
      	`STREET_ADDRESS` TEXT NULL COLLATE 'utf8_unicode_ci',
      	PRIMARY KEY (`id`),
      	INDEX `name` (`BUSINESS_NAME`(191)),
      	INDEX `addr` (`STREET_ADDRESS`(255)),
      	FULLTEXT INDEX `ft` (`BUSINESS_NAME`),
      	FULLTEXT INDEX `ft2` (`STREET_ADDRESS`)
      )
      COLLATE='utf8_unicode_ci'
      ENGINE=InnoDB;
      

      And then query it with the following:

      select * from fts_table where MATCH (BUSINESS_NAME, STREET_ADDRESS) AGAINST ('Some business name and address here');
      

      Attachments

        Activity

          Stack trace from 10.0 commit ce38adddfa91949b30956abd0e4cab201effcdef

          #2  0x000000000085af22 in handle_fatal_signal (sig=11) at /src/10.0/sql/signal_handler.cc:262
          #3  <signal handler called>
          #4  0x00000000008d0719 in Item_func_match::fix_index (this=0x7f8dc6445ce8) at /src/10.0/sql/item_func.cc:6316
          #5  0x0000000000619ac8 in setup_ftfuncs (select_lex=0x7f8dd11bf010) at /src/10.0/sql/sql_base.cc:9080
          #6  0x00000000006a22bd in JOIN::optimize_inner (this=0x7f8dc6445f10) at /src/10.0/sql/sql_select.cc:1134
          #7  0x00000000006a1dca in JOIN::optimize (this=0x7f8dc6445f10) at /src/10.0/sql/sql_select.cc:1024
          #8  0x00000000006a9b66 in mysql_select (thd=0x7f8dd11bafb0, rref_pointer_array=0x7f8dd11bf288, tables=0x7f8dc6445348, wild_num=1, fields=..., conds=0x7f8dc6445ce8, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f8dc6445ef0, unit=0x7f8dd11be920, select_lex=0x7f8dd11bf010) at /src/10.0/sql/sql_select.cc:3294
          #9  0x000000000069ff75 in handle_select (thd=0x7f8dd11bafb0, lex=0x7f8dd11be858, result=0x7f8dc6445ef0, setup_tables_done_option=0) at /src/10.0/sql/sql_select.cc:373
          #10 0x0000000000674829 in execute_sqlcom_select (thd=0x7f8dd11bafb0, all_tables=0x7f8dc6445348) at /src/10.0/sql/sql_parse.cc:5293
          #11 0x000000000066cd43 in mysql_execute_command (thd=0x7f8dd11bafb0) at /src/10.0/sql/sql_parse.cc:2562
          #12 0x00000000006773af in mysql_parse (thd=0x7f8dd11bafb0, rawbuf=0x7f8dc6445088 "select * from fts_table where MATCH (BUSINESS_NAME, STREET_ADDRESS) AGAINST ('Some business name and address here')", length=115, parser_state=0x7f8dd96ac650) at /src/10.0/sql/sql_parse.cc:6554
          #13 0x0000000000669fad in dispatch_command (command=COM_QUERY, thd=0x7f8dd11bafb0, packet=0x7f8dc65c5f71 "select * from fts_table where MATCH (BUSINESS_NAME, STREET_ADDRESS) AGAINST ('Some business name and address here')", packet_length=115) at /src/10.0/sql/sql_parse.cc:1308
          #14 0x000000000066927a in do_command (thd=0x7f8dd11bafb0) at /src/10.0/sql/sql_parse.cc:998
          #15 0x00000000007877dd in do_handle_one_connection (thd_arg=0x7f8dd11bafb0) at /src/10.0/sql/sql_connect.cc:1377
          #16 0x000000000078754f in handle_one_connection (arg=0x7f8dd11bafb0) at /src/10.0/sql/sql_connect.cc:1292
          #17 0x0000000000df4574 in pfs_spawn_thread (arg=0x7f8dd130c770) at /src/10.0/storage/perfschema/pfs.cc:1860
          #18 0x00007f8dd93270a4 in start_thread () from /lib64/libpthread.so.0
          #19 0x00007f8dd76bb04d in clone () from /lib64/libc.so.6
          

          Also reproducible with MyISAM:

          Stack trace from 5.5 commit bd75ee748ba9c2f7a06481668ff064cb5217d265

          #3  <signal handler called>
          #4  0x0000000000842bfd in Item_func_match::fix_index (this=0x7f1646186cc8) at /src/5.5/sql/item_func.cc:6377
          #5  0x00000000005d2705 in setup_ftfuncs (select_lex=0x7f16489a59f0) at /src/5.5/sql/sql_base.cc:9524
          #6  0x0000000000652087 in JOIN::optimize (this=0x7f1646186ef0) at /src/5.5/sql/sql_select.cc:1025
          #7  0x0000000000659616 in mysql_select (thd=0x7f16489a1fe0, rref_pointer_array=0x7f16489a5c60, tables=0x7f1646186338, wild_num=1, fields=..., conds=0x7f1646186cc8, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f1646186ed0, unit=0x7f16489a5310, select_lex=0x7f16489a59f0) at /src/5.5/sql/sql_select.cc:3080
          #8  0x000000000064ff47 in handle_select (thd=0x7f16489a1fe0, lex=0x7f16489a5260, result=0x7f1646186ed0, setup_tables_done_option=0) at /src/5.5/sql/sql_select.cc:319
          #9  0x0000000000629448 in execute_sqlcom_select (thd=0x7f16489a1fe0, all_tables=0x7f1646186338) at /src/5.5/sql/sql_parse.cc:4689
          #10 0x000000000062277b in mysql_execute_command (thd=0x7f16489a1fe0) at /src/5.5/sql/sql_parse.cc:2234
          #11 0x000000000062bf28 in mysql_parse (thd=0x7f16489a1fe0, rawbuf=0x7f1646186078 "select * from fts_table where MATCH (BUSINESS_NAME, STREET_ADDRESS) AGAINST ('Some business name and address here')", length=115, parser_state=0x7f164bec2650) at /src/5.5/sql/sql_parse.cc:5914
          #12 0x000000000061fd1a in dispatch_command (command=COM_QUERY, thd=0x7f16489a1fe0, packet=0x7f1648bf4561 "select * from fts_table where MATCH (BUSINESS_NAME, STREET_ADDRESS) AGAINST ('Some business name and address here')", packet_length=115) at /src/5.5/sql/sql_parse.cc:1079
          #13 0x000000000061eead in do_command (thd=0x7f16489a1fe0) at /src/5.5/sql/sql_parse.cc:793
          #14 0x0000000000721a29 in do_handle_one_connection (thd_arg=0x7f16489a1fe0) at /src/5.5/sql/sql_connect.cc:1269
          #15 0x00000000007217b6 in handle_one_connection (arg=0x7f16489a1fe0) at /src/5.5/sql/sql_connect.cc:1185
          #16 0x0000000000c8b10f in pfs_spawn_thread (arg=0x7f1648babfc0) at /src/5.5/storage/perfschema/pfs.cc:1015
          #17 0x00007f164bb3a0a4 in start_thread () from /lib64/libpthread.so.0
          #18 0x00007f164a52904d in clone () from /lib64/libc.so.6
          

          No crash on MySQL, it returns ER_CANT_AGGREGATE_2COLLATIONS:

          1267: Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation 'match'
          

          elenst Elena Stepanova added a comment - Stack trace from 10.0 commit ce38adddfa91949b30956abd0e4cab201effcdef #2 0x000000000085af22 in handle_fatal_signal (sig=11) at /src/10.0/sql/signal_handler.cc:262 #3 <signal handler called> #4 0x00000000008d0719 in Item_func_match::fix_index (this=0x7f8dc6445ce8) at /src/10.0/sql/item_func.cc:6316 #5 0x0000000000619ac8 in setup_ftfuncs (select_lex=0x7f8dd11bf010) at /src/10.0/sql/sql_base.cc:9080 #6 0x00000000006a22bd in JOIN::optimize_inner (this=0x7f8dc6445f10) at /src/10.0/sql/sql_select.cc:1134 #7 0x00000000006a1dca in JOIN::optimize (this=0x7f8dc6445f10) at /src/10.0/sql/sql_select.cc:1024 #8 0x00000000006a9b66 in mysql_select (thd=0x7f8dd11bafb0, rref_pointer_array=0x7f8dd11bf288, tables=0x7f8dc6445348, wild_num=1, fields=..., conds=0x7f8dc6445ce8, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f8dc6445ef0, unit=0x7f8dd11be920, select_lex=0x7f8dd11bf010) at /src/10.0/sql/sql_select.cc:3294 #9 0x000000000069ff75 in handle_select (thd=0x7f8dd11bafb0, lex=0x7f8dd11be858, result=0x7f8dc6445ef0, setup_tables_done_option=0) at /src/10.0/sql/sql_select.cc:373 #10 0x0000000000674829 in execute_sqlcom_select (thd=0x7f8dd11bafb0, all_tables=0x7f8dc6445348) at /src/10.0/sql/sql_parse.cc:5293 #11 0x000000000066cd43 in mysql_execute_command (thd=0x7f8dd11bafb0) at /src/10.0/sql/sql_parse.cc:2562 #12 0x00000000006773af in mysql_parse (thd=0x7f8dd11bafb0, rawbuf=0x7f8dc6445088 "select * from fts_table where MATCH (BUSINESS_NAME, STREET_ADDRESS) AGAINST ('Some business name and address here')", length=115, parser_state=0x7f8dd96ac650) at /src/10.0/sql/sql_parse.cc:6554 #13 0x0000000000669fad in dispatch_command (command=COM_QUERY, thd=0x7f8dd11bafb0, packet=0x7f8dc65c5f71 "select * from fts_table where MATCH (BUSINESS_NAME, STREET_ADDRESS) AGAINST ('Some business name and address here')", packet_length=115) at /src/10.0/sql/sql_parse.cc:1308 #14 0x000000000066927a in do_command (thd=0x7f8dd11bafb0) at /src/10.0/sql/sql_parse.cc:998 #15 0x00000000007877dd in do_handle_one_connection (thd_arg=0x7f8dd11bafb0) at /src/10.0/sql/sql_connect.cc:1377 #16 0x000000000078754f in handle_one_connection (arg=0x7f8dd11bafb0) at /src/10.0/sql/sql_connect.cc:1292 #17 0x0000000000df4574 in pfs_spawn_thread (arg=0x7f8dd130c770) at /src/10.0/storage/perfschema/pfs.cc:1860 #18 0x00007f8dd93270a4 in start_thread () from /lib64/libpthread.so.0 #19 0x00007f8dd76bb04d in clone () from /lib64/libc.so.6 Also reproducible with MyISAM: Stack trace from 5.5 commit bd75ee748ba9c2f7a06481668ff064cb5217d265 #3 <signal handler called> #4 0x0000000000842bfd in Item_func_match::fix_index (this=0x7f1646186cc8) at /src/5.5/sql/item_func.cc:6377 #5 0x00000000005d2705 in setup_ftfuncs (select_lex=0x7f16489a59f0) at /src/5.5/sql/sql_base.cc:9524 #6 0x0000000000652087 in JOIN::optimize (this=0x7f1646186ef0) at /src/5.5/sql/sql_select.cc:1025 #7 0x0000000000659616 in mysql_select (thd=0x7f16489a1fe0, rref_pointer_array=0x7f16489a5c60, tables=0x7f1646186338, wild_num=1, fields=..., conds=0x7f1646186cc8, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f1646186ed0, unit=0x7f16489a5310, select_lex=0x7f16489a59f0) at /src/5.5/sql/sql_select.cc:3080 #8 0x000000000064ff47 in handle_select (thd=0x7f16489a1fe0, lex=0x7f16489a5260, result=0x7f1646186ed0, setup_tables_done_option=0) at /src/5.5/sql/sql_select.cc:319 #9 0x0000000000629448 in execute_sqlcom_select (thd=0x7f16489a1fe0, all_tables=0x7f1646186338) at /src/5.5/sql/sql_parse.cc:4689 #10 0x000000000062277b in mysql_execute_command (thd=0x7f16489a1fe0) at /src/5.5/sql/sql_parse.cc:2234 #11 0x000000000062bf28 in mysql_parse (thd=0x7f16489a1fe0, rawbuf=0x7f1646186078 "select * from fts_table where MATCH (BUSINESS_NAME, STREET_ADDRESS) AGAINST ('Some business name and address here')", length=115, parser_state=0x7f164bec2650) at /src/5.5/sql/sql_parse.cc:5914 #12 0x000000000061fd1a in dispatch_command (command=COM_QUERY, thd=0x7f16489a1fe0, packet=0x7f1648bf4561 "select * from fts_table where MATCH (BUSINESS_NAME, STREET_ADDRESS) AGAINST ('Some business name and address here')", packet_length=115) at /src/5.5/sql/sql_parse.cc:1079 #13 0x000000000061eead in do_command (thd=0x7f16489a1fe0) at /src/5.5/sql/sql_parse.cc:793 #14 0x0000000000721a29 in do_handle_one_connection (thd_arg=0x7f16489a1fe0) at /src/5.5/sql/sql_connect.cc:1269 #15 0x00000000007217b6 in handle_one_connection (arg=0x7f16489a1fe0) at /src/5.5/sql/sql_connect.cc:1185 #16 0x0000000000c8b10f in pfs_spawn_thread (arg=0x7f1648babfc0) at /src/5.5/storage/perfschema/pfs.cc:1015 #17 0x00007f164bb3a0a4 in start_thread () from /lib64/libpthread.so.0 #18 0x00007f164a52904d in clone () from /lib64/libc.so.6 No crash on MySQL, it returns ER_CANT_AGGREGATE_2COLLATIONS: 1267: Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation 'match'

          People

            serg Sergei Golubchik
            GeoffMontee Geoff Montee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.