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

table with too much redundant key coz 10.5.9 crash signal kill 11

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.5.9
    • N/A
    • Server
    • None
    • ubuntu 20.04 and also mariadb docker

    Description

      after migrate to mariadb 10.5.9. docker ( default config)
      I found some sql can crash database (got signal 11).
      after scrutinize , found that coz old table with too much redundant key index and
      long IN condition sql.

      attachment
      1. sample of tables create (test_creat.sql)
      2. sql which got signal 11 ( test_kill.sql)
      3. similar sql just reduce IN one array which no problem ( test_notkill.sql)

      Attachments

        1. log
          17 kB
        2. test_creat.sql
          0.6 kB
        3. test_kill.sql
          7 kB
        4. test_notkill.sql
          7 kB

        Issue Links

          Activity

            densin densin added a comment -

            I also test with 10.2 , 10.3 , this bug not happen.

            densin densin added a comment - I also test with 10.2 , 10.3 , this bug not happen.
            alice Alice Sherepa added a comment -

            Thanks for the report!
            I repeated on 10.5.9, the bug is the same as MDEV-24953 (MDEV-24995).

            210503  9:57:12 [ERROR] mysqld got signal 11 ;
             
            Server version: 10.5.9-MariaDB
             
            sigaction.c:0(__restore_rt)[0x7f0f5371f3c0]
            sql/opt_range.cc:9816(and_all_keys(RANGE_OPT_PARAM*, SEL_ARG*, SEL_ARG*, unsigned int))[0x564c694ad8fd]
            sql/opt_range.cc:10066(and_range_trees(RANGE_OPT_PARAM*, SEL_TREE*, SEL_TREE*, SEL_TREE*))[0x564c694b6c5c]
            sql/opt_range.cc:9263(tree_and(RANGE_OPT_PARAM*, SEL_TREE*, SEL_TREE*))[0x564c694b8f5a]
            sql/opt_range.cc:8316(Item_cond_and::get_mm_tree(RANGE_OPT_PARAM*, Item**))[0x564c694bd64f]
            sql/opt_range.cc:2880(SQL_SELECT::test_quick_select(THD*, Bitmap<64u>, unsigned long long, unsigned long long, bool, bool, bool, bool))[0x564c694b9be1]
            sql/sql_select.cc:4763(JOIN::optimize_inner())[0x564c691d9f35]
            sql/sql_select.cc:1629(JOIN::optimize())[0x564c691dab35]
            sql/sql_select.cc:4705(mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x564c691dabf8]
            sql/sql_select.cc:429(handle_select(THD*, LEX*, select_result*, unsigned long))[0x564c691db7da]
            sql/sql_parse.cc:6283(execute_sqlcom_select(THD*, TABLE_LIST*))[0x564c6903fb65]
            sql/sql_parse.cc:3978(mysql_execute_command(THD*))[0x564c691800c4]
            sql/sql_parse.cc:8063(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x564c69183169]
            sql/sql_audit.h:169(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x564c69185215]
            sql/sql_parse.cc:1375(do_command(THD*))[0x564c69186bdb]
            sql/sql_connect.cc:1410(do_handle_one_connection(CONNECT*, bool))[0x564c69271bc2]
            sql/sql_connect.cc:1318(handle_one_connection)[0x564c69271e84]
            perfschema/pfs.cc:2204(pfs_spawn_thread)[0x564c695f528d]
            nptl/pthread_create.c:478(start_thread)[0x7f0f53713609]
            x86_64/clone.S:97(__GI___clone)[0x7f0f532b7293]
             
            Query (0x7f0ed80128d0): select * from `test`.`content` where `user_id` = 96 and (content_type, content_id) in (('PRODUCT', 5497), ('PRODUCT', 73344), ('PRODUCT', 83916), ('PRODUCT', 89140), ('PRODUCT', 90144), ('PRODUCT', 99079), ('REVIEW', 45251), ('REVIEW', 45758), ('REVIEW', 47700), ('REVIEW', 48645), ('REVIEW', 48651), ('REVIEW', 48790), ('REVIEW', 48898), ('REVIEW', 49003), ....
            

            alice Alice Sherepa added a comment - Thanks for the report! I repeated on 10.5.9, the bug is the same as MDEV-24953 ( MDEV-24995 ). 210503 9:57:12 [ERROR] mysqld got signal 11 ;   Server version: 10.5.9-MariaDB   sigaction.c:0(__restore_rt)[0x7f0f5371f3c0] sql/opt_range.cc:9816(and_all_keys(RANGE_OPT_PARAM*, SEL_ARG*, SEL_ARG*, unsigned int))[0x564c694ad8fd] sql/opt_range.cc:10066(and_range_trees(RANGE_OPT_PARAM*, SEL_TREE*, SEL_TREE*, SEL_TREE*))[0x564c694b6c5c] sql/opt_range.cc:9263(tree_and(RANGE_OPT_PARAM*, SEL_TREE*, SEL_TREE*))[0x564c694b8f5a] sql/opt_range.cc:8316(Item_cond_and::get_mm_tree(RANGE_OPT_PARAM*, Item**))[0x564c694bd64f] sql/opt_range.cc:2880(SQL_SELECT::test_quick_select(THD*, Bitmap<64u>, unsigned long long, unsigned long long, bool, bool, bool, bool))[0x564c694b9be1] sql/sql_select.cc:4763(JOIN::optimize_inner())[0x564c691d9f35] sql/sql_select.cc:1629(JOIN::optimize())[0x564c691dab35] sql/sql_select.cc:4705(mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x564c691dabf8] sql/sql_select.cc:429(handle_select(THD*, LEX*, select_result*, unsigned long))[0x564c691db7da] sql/sql_parse.cc:6283(execute_sqlcom_select(THD*, TABLE_LIST*))[0x564c6903fb65] sql/sql_parse.cc:3978(mysql_execute_command(THD*))[0x564c691800c4] sql/sql_parse.cc:8063(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x564c69183169] sql/sql_audit.h:169(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x564c69185215] sql/sql_parse.cc:1375(do_command(THD*))[0x564c69186bdb] sql/sql_connect.cc:1410(do_handle_one_connection(CONNECT*, bool))[0x564c69271bc2] sql/sql_connect.cc:1318(handle_one_connection)[0x564c69271e84] perfschema/pfs.cc:2204(pfs_spawn_thread)[0x564c695f528d] nptl/pthread_create.c:478(start_thread)[0x7f0f53713609] x86_64/clone.S:97(__GI___clone)[0x7f0f532b7293]   Query (0x7f0ed80128d0): select * from `test`.`content` where `user_id` = 96 and (content_type, content_id) in (('PRODUCT', 5497), ('PRODUCT', 73344), ('PRODUCT', 83916), ('PRODUCT', 89140), ('PRODUCT', 90144), ('PRODUCT', 99079), ('REVIEW', 45251), ('REVIEW', 45758), ('REVIEW', 47700), ('REVIEW', 48645), ('REVIEW', 48651), ('REVIEW', 48790), ('REVIEW', 48898), ('REVIEW', 49003), ....

            People

              Unassigned Unassigned
              densin densin
              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.