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

Server Crash at cache_const_expr_analyzer

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 12.2.2
    • 10.11, 11.4, 11.8, 12.3
    • None

    Description

      I encountered a server crash (Signal 11) on MariaDB 12.2.2.

      How to repeat:

      SET SESSION optimizer_switch='index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,duplicateweedout=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=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off,hash_join_cardinality=on,cset_narrowing=on,sargable_casefold=on';
       
       
      DROP TABLE IF EXISTS `t0`;
      CREATE TABLE `t0` ( `c1` longtext  COMMENT 'asdf', KEY `i38` (`c1`(3)) ) CHARSET=utf8mb4;
      INSERT INTO `t0` VALUES (NULL),('1915555805'),(NULL);
      DROP TABLE IF EXISTS `t1`;
      CREATE TABLE `t1` ( `c0` float unsigned zerofill  DEFAULT NULL COMMENT 'asdf', UNIQUE KEY `c0` (`c0`) ) CHARSET=utf8mb4;
       
      PREPARE stmt1 FROM "SELECT `t_wrapper_0`.`ref0` AS `ref0` FROM ((SELECT `t_branch`.`ref0` AS `ref0` FROM (SELECT `t_derived_0`.`ref0` AS `ref0` FROM (SELECT DISTINCT '' AS `ref0` FROM `t1` AS `t1`, `t0` AS `t0` WHERE (0.01593741097079815) IS TRUE GROUP BY NOT (`t1`.`c0`) IS NULL) AS `t_derived_0` UNION ALL SELECT `t_filter_sub_0`.`ref0` AS `ref0` FROM (SELECT `t_filter_sub_0`.`ref0` AS `ref0` FROM (SELECT DISTINCT '' AS `ref0` FROM `t1` AS `t1`, `t0` AS `t0` WHERE (0.01593741097079815) IS TRUE GROUP BY NOT (`t1`.`c0`) IS NULL) AS `t_filter_sub_0` WHERE CAST((13 OR 'test') > `t_filter_sub_0`.`ref0` AS CHAR)) AS `t_filter_sub_0`) AS `t_branch` EXCEPT ALL SELECT t_align_0.ref0 AS ref0 FROM (SELECT t_wrapper_1.ref0 AS ref0 FROM ((SELECT ref0 AS ref0 FROM (SELECT t_derived_1.ref0 AS ref0 FROM (SELECT `t_filter_sub_1`.`ref0` AS `ref0` FROM (SELECT `t_filter_sub_1`.`ref0` AS `ref0` FROM (SELECT DISTINCT '' AS `ref0` FROM `t1` AS `t1`, `t0` AS `t0` WHERE (0.01593741097079815) IS TRUE GROUP BY NOT (`t1`.`c0`) IS NULL) AS `t_filter_sub_1` WHERE CAST((13 OR 'test') > `t_filter_sub_1`.`ref0` AS CHAR)) AS `t_filter_sub_1`) AS t_derived_1 UNION ALL SELECT t_filter_sub_2.ref0 AS ref0 FROM (SELECT * FROM (SELECT `t_filter_sub_1`.`ref0` AS `ref0` FROM (SELECT `t_filter_sub_1`.`ref0` AS `ref0` FROM (SELECT DISTINCT '' AS `ref0` FROM `t1` AS `t1`, `t0` AS `t0` WHERE (0.01593741097079815) IS TRUE GROUP BY NOT (`t1`.`c0`) IS NULL) AS `t_filter_sub_1` WHERE CAST((13 OR 'test') > `t_filter_sub_1`.`ref0` AS CHAR)) AS `t_filter_sub_1`) AS t_filter_sub_2 WHERE t_filter_sub_2.ref0 IN ((NOT t_filter_sub_2.ref0) = LOWER(0.01593741097079815), VERSION())) AS t_filter_sub_2) AS t_branch EXCEPT ALL SELECT t_filter_sub_3.ref0 AS ref0 FROM (SELECT * FROM (SELECT `t_filter_sub_1`.`ref0` AS `ref0` FROM (SELECT `t_filter_sub_1`.`ref0` AS `ref0` FROM (SELECT DISTINCT '' AS `ref0` FROM `t1` AS `t1`, `t0` AS `t0` WHERE (0.01593741097079815) IS TRUE GROUP BY NOT (`t1`.`c0`) IS NULL) AS `t_filter_sub_1` WHERE CAST((13 OR 'test') > `t_filter_sub_1`.`ref0` AS CHAR)) AS `t_filter_sub_1`) AS t_filter_sub_3 WHERE t_filter_sub_3.ref0 IN ((NOT t_filter_sub_3.ref0) = LOWER(0.01593741097079815), VERSION())) AS t_filter_sub_3)) AS t_wrapper_1) AS t_align_0)) AS `t_wrapper_0`";
       
      EXECUTE stmt1;
      
      

      Docker log:

      mariadbd(my_print_stacktrace+0x30)[0x5c3227fc2960]
      mariadbd(handle_fatal_signal+0x1f3)[0x5c3227b0e843]
      /lib/x86_64-linux-gnu/libc.so.6(+0x45330)[0x7964f91b8330]
      mariadbd(+0x71d92b)[0x5c322766c92b]
      mariadbd(+0x71db53)[0x5c322766cb53]
      mariadbd(+0x71db53)[0x5c322766cb53]
      mariadbd(_ZN4Item25cache_const_expr_analyzerEPPh+0x4b)[0x5c3227b39a8b]
      mariadbd(_ZN8Item_ref7compileEP3THDM4ItemFbPPhES4_MS2_FPS2_S1_S3_ES3_+0x5a)[0x5c3227b3fcfa]
      mariadbd(_ZN9Item_func7compileEP3THDM4ItemFbPPhES4_MS2_FPS2_S1_S3_ES3_+0xe5)[0x5c3227b9a7d5]
      mariadbd(_ZN8Item_ref7compileEP3THDM4ItemFbPPhES4_MS2_FPS2_S1_S3_ES3_+0xa2)[0x5c3227b3fd42]
      mariadbd(_ZN9Item_func7compileEP3THDM4ItemFbPPhES4_MS2_FPS2_S1_S3_ES3_+0xe5)[0x5c3227b9a7d5]
      mariadbd(_ZN4JOIN17cache_const_exprsEv+0xad)[0x5c3227870c9d]
      mariadbd(_ZN4JOIN15optimize_stage2Ev+0x85c)[0x5c32278383dc]
      mariadbd(_ZN4JOIN14optimize_innerEv+0x15fe)[0x5c322783d7de]
      mariadbd(_ZN4JOIN8optimizeEv+0x103)[0x5c322783db93]
      mariadbd(+0x846c1b)[0x5c3227795c1b]
      mariadbd(_Z27mysql_handle_single_derivedP3LEXP10TABLE_LISTj+0xa3)[0x5c3227784fe3]
      mariadbd(_ZN4JOIN14optimize_innerEv+0xf34)[0x5c322783d114]
      mariadbd(_ZN4JOIN8optimizeEv+0x103)[0x5c322783db93]
      mariadbd(_ZN18st_select_lex_unit8optimizeEv+0x3c2)[0x5c3227904602]
      mariadbd(+0x846d00)[0x5c3227795d00]
      mariadbd(_Z27mysql_handle_single_derivedP3LEXP10TABLE_LISTj+0xa3)[0x5c3227784fe3]
      mariadbd(_ZN4JOIN14optimize_innerEv+0xf34)[0x5c322783d114]
      mariadbd(_ZN4JOIN8optimizeEv+0x103)[0x5c322783db93]
      mariadbd(_ZN18st_select_lex_unit8optimizeEv+0x3c2)[0x5c3227904602]
      mariadbd(+0x846d00)[0x5c3227795d00]
      mariadbd(_Z27mysql_handle_single_derivedP3LEXP10TABLE_LISTj+0xa3)[0x5c3227784fe3]
      mariadbd(_ZN4JOIN14optimize_innerEv+0xf34)[0x5c322783d114]
      mariadbd(_ZN4JOIN8optimizeEv+0x103)[0x5c322783db93]
      mariadbd(_ZN18st_select_lex_unit8optimizeEv+0x3c2)[0x5c3227904602]
      mariadbd(+0x846d00)[0x5c3227795d00]
      mariadbd(_Z27mysql_handle_single_derivedP3LEXP10TABLE_LISTj+0xa3)[0x5c3227784fe3]
      mariadbd(_ZN4JOIN14optimize_innerEv+0xf34)[0x5c322783d114]
      mariadbd(_ZN4JOIN8optimizeEv+0x103)[0x5c322783db93]
      mariadbd(_Z12mysql_selectP3THDP10TABLE_LISTR4ListI4ItemEPS4_jP8st_orderS9_S7_S9_yP13select_resultP18st_select_lex_unitP13st_select_lex+0xdf)[0x5c322783dccf]
      mariadbd(_Z13handle_selectP3THDP3LEXP13select_resulty+0x17a)[0x5c322783e82a]
      mariadbd(+0x891ea1)[0x5c32277e0ea1]
      mariadbd(_Z21mysql_execute_commandP3THDb+0x37ca)[0x5c32277ebe1a]
      mariadbd(_ZN18Prepared_statement7executeEP6Stringb+0xa5d)[0x5c3227823ead]
      mariadbd(_ZN18Prepared_statement12execute_loopEP6StringbPhS2_+0xf1)[0x5c32278240a1]
      mariadbd(+0x8c2302)[0x5c3227811302]
      mariadbd(_Z16dispatch_command19enum_server_commandP3THDPcjb+0x1763)[0x5c32277e6f73]
      mariadbd(_Z10do_commandP3THDb+0x199)[0x5c32277e7de9]
      mariadbd(_Z24do_handle_one_connectionP7CONNECTb+0x6b3)[0x5c322798bd83]
      mariadbd(handle_one_connection+0x71)[0x5c3227974161]
      mariadbd(+0xdfa91e)[0x5c3227d4991e]
      /lib/x86_64-linux-gnu/libc.so.6(+0x9caa4)[0x7964f920faa4]
      /lib/x86_64-linux-gnu/libc.so.6(__clone+0x44)[0x7964f929ca64]
      

      Attachments

        Issue Links

          Activity

            People

              shulga Dmitry Shulga
              Yuxiao Guo Yuxiao Guo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.