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

Aria Engine crashes MYSQL during Full Text IN BOOLEAN MODE Search

    Details

      Description

      When attempting to execute this query

      SELECT SQL_NO_CACHE data1, data2, data3 FROM table WHERE MATCH (index) AGAINST('"phrase"' IN BOOLEAN MODE) AND data2 > 0 ORDER BY data2 DESC
      

      if any results are found, the entire mysql instance simply crashes.

      There is no crash log, note it only crashes IF you find results. Table cooloation is utf8 unicode

      My table is 2gb large with 6.3m rows.

      EDIT:

      I was able to produce a stack trace

      Thread pointer: 0x0x1fe234c088
      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...
      mysqld.exe!maria_ft_boolean_read_next()[ma_ft_boolean_search.c:833]
      mysqld.exe!ha_maria::ft_read()[ha_maria.cc:3270]
      mysqld.exe!FT_SELECT::get_next()[opt_range.h:1042]
      mysqld.exe!find_all_keys()[filesort.cc:745]
      mysqld.exe!filesort()[filesort.cc:298]
      mysqld.exe!create_sort_index()[sql_select.cc:20760]
      mysqld.exe!JOIN::exec_inner()[sql_select.cc:3051]
      mysqld.exe!JOIN::exec()[sql_select.cc:2372]
      mysqld.exe!mysql_select()[sql_select.cc:3312]
      mysqld.exe!handle_select()[sql_select.cc:373]
      mysqld.exe!execute_sqlcom_select()[sql_parse.cc:5258]
      mysqld.exe!mysql_execute_command()[sql_parse.cc:2546]
      mysqld.exe!mysql_parse()[sql_parse.cc:6518]
      mysqld.exe!dispatch_command()[sql_parse.cc:1303]
      mysqld.exe!do_command()[sql_parse.cc:1003]
      mysqld.exe!threadpool_process_request()[threadpool_common.cc:233]
      mysqld.exe!io_completion_callback()[threadpool_win.cc:568]
      KERNEL32.DLL!VirtualUnlock()
      ntdll.dll!LdrResolveDelayLoadedAPI()
      ntdll.dll!RtlFreeUnicodeString()
      KERNEL32.DLL!BaseThreadInitThunk()
      ntdll.dll!RtlUserThreadStart()
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            Hi,

            Please specify which MariaDB version you are using, attach your cnf file(s), and paste the result of SHOW CREATE TABLE `table`, {SHOW TABLE STATUS LIKE 'table'}}, SHOW INDEX IN `table`. Feel free to obfuscate the output any way you want, as long as we can still see the general structure of the table and data.

            Primitive test doesn't cause the crash:

            MariaDB [test]> drop table if exists t;
            Query OK, 0 rows affected (0.43 sec)
            
            MariaDB [test]> create table t (f varchar(1024), fulltext index(f), data1 int, data2 int, data3 int) engine=Aria default charset utf8;
            Query OK, 0 rows affected (0.62 sec)
            
            MariaDB [test]> insert into t values ('"phrase" 1',1,1,1),('"phrase" 2',2,2,2);
            Query OK, 2 rows affected (0.03 sec)
            Records: 2  Duplicates: 0  Warnings: 0
            
            MariaDB [test]> 
            MariaDB [test]> SELECT SQL_NO_CACHE data1, data2, data3 FROM t WHERE MATCH (f) AGAINST('"phrase"' IN BOOLEAN MODE) AND data2 > 0 ORDER BY data2 DESC;
            +-------+-------+-------+
            | data1 | data2 | data3 |
            +-------+-------+-------+
            |     2 |     2 |     2 |
            |     1 |     1 |     1 |
            +-------+-------+-------+
            2 rows in set (0.00 sec)
            
            Show
            elenst Elena Stepanova added a comment - Hi, Please specify which MariaDB version you are using, attach your cnf file(s), and paste the result of SHOW CREATE TABLE `table` , {SHOW TABLE STATUS LIKE 'table'}}, SHOW INDEX IN `table` . Feel free to obfuscate the output any way you want, as long as we can still see the general structure of the table and data. Primitive test doesn't cause the crash: MariaDB [test]> drop table if exists t; Query OK, 0 rows affected (0.43 sec) MariaDB [test]> create table t (f varchar(1024), fulltext index(f), data1 int, data2 int, data3 int) engine=Aria default charset utf8; Query OK, 0 rows affected (0.62 sec) MariaDB [test]> insert into t values (' "phrase" 1',1,1,1),(' "phrase" 2',2,2,2); Query OK, 2 rows affected (0.03 sec) Records: 2 Duplicates: 0 Warnings: 0 MariaDB [test]> MariaDB [test]> SELECT SQL_NO_CACHE data1, data2, data3 FROM t WHERE MATCH (f) AGAINST(' "phrase" ' IN BOOLEAN MODE) AND data2 > 0 ORDER BY data2 DESC; +-------+-------+-------+ | data1 | data2 | data3 | +-------+-------+-------+ | 2 | 2 | 2 | | 1 | 1 | 1 | +-------+-------+-------+ 2 rows in set (0.00 sec)
            Hide
            Codeusa Andrew added a comment - - edited

            Hi Elena,

            I'm using the latest version of Maria, i've attached my config

            http://andrew.im/my.ini

            I can't run any querys on the plane, but here is a screenshot of the structure

            http://i.imgur.com/d8NnsNN.png

            I ran a similar query on a smaller Aria table and it was fine, i'm thinking it is a table issue, i dropped it completely and repopulated its data and it is still crashing.

            Show
            Codeusa Andrew added a comment - - edited Hi Elena, I'm using the latest version of Maria, i've attached my config http://andrew.im/my.ini I can't run any querys on the plane, but here is a screenshot of the structure http://i.imgur.com/d8NnsNN.png I ran a similar query on a smaller Aria table and it was fine, i'm thinking it is a table issue, i dropped it completely and repopulated its data and it is still crashing.
            Hide
            elenst Elena Stepanova added a comment -

            Hi Andrew,

            Thanks for the config and the structure.
            Regarding the version, MariaDB currently provides 6 major server versions, each of which has a latest version (5.1.67, 5.2.14, 5.3.12, 5.5.42, 10.0.17, 10.1.3), not counting Enterprise builds. So, could you please be more specific?

            Thank you.

            Show
            elenst Elena Stepanova added a comment - Hi Andrew, Thanks for the config and the structure. Regarding the version, MariaDB currently provides 6 major server versions, each of which has a latest version (5.1.67, 5.2.14, 5.3.12, 5.5.42, 10.0.17, 10.1.3), not counting Enterprise builds. So, could you please be more specific? Thank you.
            Hide
            Codeusa Andrew added a comment -

            I'm using 10.0.17

            Show
            Codeusa Andrew added a comment - I'm using 10.0.17
            Hide
            elenst Elena Stepanova added a comment - - edited

            I couldn't reproduce the crash with artificial data, even the same 6+M rows, so I agree, the data is important here.
            Would you be able to upload your table (as a set of binary files or as a datadump) to our ftp.askmonty.org/private?

            Show
            elenst Elena Stepanova added a comment - - edited I couldn't reproduce the crash with artificial data, even the same 6+M rows, so I agree, the data is important here. Would you be able to upload your table (as a set of binary files or as a datadump) to our ftp.askmonty.org/private?
            Hide
            elenst Elena Stepanova added a comment -

            Hi Andrew,

            Any news on uploading the data?

            Show
            elenst Elena Stepanova added a comment - Hi Andrew, Any news on uploading the data?
            Hide
            elenst Elena Stepanova added a comment -

            Sadly, since it's so dependent on the data, I have to close it as 'can't reproduce'; but please, if you can share the data or somehow else help as to narrow it down, by all means do so, comment on this issue and it will be re-opened.

            Show
            elenst Elena Stepanova added a comment - Sadly, since it's so dependent on the data, I have to close it as 'can't reproduce'; but please, if you can share the data or somehow else help as to narrow it down, by all means do so, comment on this issue and it will be re-opened.

              People

              • Assignee:
                Unassigned
                Reporter:
                Codeusa Andrew
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: