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

Server crashes at find_field_in_table

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 11.1.2, 11.2.1
    • N/A
    • Optimizer
    • None
    • Ubuntu 20.04 x86-64, docker image mariadb:11.1.2

    Description

      PoC:

      SELECT * FROM ( ( WITH RECURSIVE x AS ( WITH x AS ( WITH x AS ( SELECT * FROM x ) SELECT 1 ) SELECT 1 UNION SELECT x FROM x ) SELECT x FROM x ) t1a ) ;
      

      docker log:

      mariadbd(my_print_stacktrace+0x32)[0x55c42f3427c2]
      mariadbd(handle_fatal_signal+0x488)[0x55c42ee1bcf8]
      /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7fb95890c520]
      mariadbd(_Z19find_field_in_tableP3THDP5TABLEPKcmbPt+0x21)[0x55c42eb39641]
      mariadbd(_Z23find_field_in_table_refP3THDP10TABLE_LISTPKcmS4_S4_S4_P4ListIS1_EPP4ItembbPtbPS2_+0x6b2)[0x55c42eb39f52]
      mariadbd(_Z20find_field_in_tablesP3THDP10Item_identP10TABLE_LISTS4_P4ListIS3_EPP4Item27find_item_error_report_typebb+0x32e)[0x55c42eb3a4de]
      mariadbd(_ZN10Item_field10fix_fieldsEP3THDPP4Item+0x293)[0x55c42ee474f3]
      mariadbd(_Z12setup_fieldsP3THD20Bounds_checked_arrayIP4ItemER4ListIS2_E17enum_column_usagePS6_S9_b+0x147)[0x55c42eb3b0a7]
      mariadbd(_ZN4JOIN7prepareEP10TABLE_LISTP4ItemjP8st_orderbS5_S3_S5_P13st_select_lexP18st_select_lex_unit+0x52d)[0x55c42ec14d1d]
      mariadbd(_ZN18st_select_lex_unit12prepare_joinEP3THDP13st_select_lexP13select_resultyb+0x414)[0x55c42ec7bc14]
      mariadbd(_ZN18st_select_lex_unit7prepareEP10TABLE_LISTP13select_resulty+0x10c7)[0x55c42ec7f357]
      mariadbd(+0x7ed21f)[0x55c42eb6321f]
      mariadbd(_Z27mysql_handle_single_derivedP3LEXP10TABLE_LISTj+0xda)[0x55c42eb61e7a]
      mariadbd(_ZN13st_select_lex14handle_derivedEP3LEXj+0x47)[0x55c42eb80697]
      mariadbd(_ZN4JOIN7prepareEP10TABLE_LISTP4ItemjP8st_orderbS5_S3_S5_P13st_select_lexP18st_select_lex_unit+0x20f)[0x55c42ec149ff]
      mariadbd(_ZN18st_select_lex_unit12prepare_joinEP3THDP13st_select_lexP13select_resultyb+0x414)[0x55c42ec7bc14]
      mariadbd(_ZN18st_select_lex_unit7prepareEP10TABLE_LISTP13select_resulty+0x79b)[0x55c42ec7ea2b]
      mariadbd(_ZN12With_element20prepare_unreferencedEP3THD+0x88)[0x55c42ed86598]
      mariadbd(_ZN11With_clause29prepare_unreferenced_elementsEP3THD+0x5c)[0x55c42ed8663c]
      mariadbd(_ZN4JOIN7prepareEP10TABLE_LISTP4ItemjP8st_orderbS5_S3_S5_P13st_select_lexP18st_select_lex_unit+0xd56)[0x55c42ec15546]
      mariadbd(_ZN18st_select_lex_unit12prepare_joinEP3THDP13st_select_lexP13select_resultyb+0x414)[0x55c42ec7bc14]
      mariadbd(_ZN18st_select_lex_unit7prepareEP10TABLE_LISTP13select_resulty+0x79b)[0x55c42ec7ea2b]
      mariadbd(+0x7ed21f)[0x55c42eb6321f]
      mariadbd(_Z27mysql_handle_single_derivedP3LEXP10TABLE_LISTj+0xda)[0x55c42eb61e7a]
      mariadbd(_ZN13st_select_lex14handle_derivedEP3LEXj+0x47)[0x55c42eb80697]
      mariadbd(_ZN10TABLE_LIST14handle_derivedEP3LEXj+0x56)[0x55c42ecab776]
      mariadbd(_ZN13st_select_lex14handle_derivedEP3LEXj+0x47)[0x55c42eb80697]
      mariadbd(_ZN10TABLE_LIST14handle_derivedEP3LEXj+0x56)[0x55c42ecab776]
      mariadbd(_ZN13st_select_lex14handle_derivedEP3LEXj+0x47)[0x55c42eb80697]
      mariadbd(_ZN4JOIN7prepareEP10TABLE_LISTP4ItemjP8st_orderbS5_S3_S5_P13st_select_lexP18st_select_lex_unit+0x20f)[0x55c42ec149ff]
      mariadbd(_Z12mysql_selectP3THDP10TABLE_LISTR4ListI4ItemEPS4_jP8st_orderS9_S7_S9_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x624)[0x55c42ec29474]
      mariadbd(_Z13handle_selectP3THDP3LEXP13select_resulty+0x154)[0x55c42ec29774]
      mariadbd(+0x826f55)[0x55c42eb9cf55]
      mariadbd(_Z21mysql_execute_commandP3THDb+0x419e)[0x55c42ebabf0e]
      mariadbd(_Z11mysql_parseP3THDPcjP12Parser_state+0x1e7)[0x55c42ebad237]
      mariadbd(_Z16dispatch_command19enum_server_commandP3THDPcjb+0x14bd)[0x55c42ebafa1d]
      mariadbd(_Z10do_commandP3THDb+0x138)[0x55c42ebb1818]
      mariadbd(_Z24do_handle_one_connectionP7CONNECTb+0x3bf)[0x55c42ecd93af]
      mariadbd(handle_one_connection+0x5d)[0x55c42ecd96fd]
      mariadbd(+0xcd1906)[0x55c42f047906]
      /lib/x86_64-linux-gnu/libc.so.6(+0x94b43)[0x7fb95895eb43]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x44)[0x7fb9589efbb4]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7fb8fc0130d8): SELECT * FROM ( ( WITH RECURSIVE x AS ( WITH x AS ( WITH x AS ( SELECT * FROM x ) SELECT 1 ) SELECT 1 UNION SELECT x FROM x ) SELECT x FROM x ) t1a )
       
      Connection ID (thread ID): 4
      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=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
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              fuboat Jingzhou Fu
              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.