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

Server crash in Item_field::print on ANALYZE FORMAT=JSON

    XMLWordPrintable

Details

    Description

      Server crashes while executing ANALYZE FORMAT=JSON for complex enough query having WITH RECURSIVE clause. Stack trace is:

      Server version: 10.3.14-MariaDB-log
      key_buffer_size=33554432
      read_buffer_size=2097152
      max_used_connections=18
      max_threads=5010
      thread_count=15
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 30832274 K bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x7f56400e1ae8
      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 = 0x7f56e34e2dd8 thread_stack 0x49000
      /usr/local/mysql/bin/mysqld(my_print_stacktrace+0x2b)[0x55b150cfa30b]
      /usr/local/mysql/bin/mysqld(handle_fatal_signal+0x537)[0x55b1507e7f47]
      /lib64/libpthread.so.0(+0xf5d0)[0x7f59792875d0]
      /usr/local/mysql/bin/mysqld(_ZN10Item_field5printEP6String15enum_query_type+0x14)[0x55b1507ffd24]
      /usr/local/mysql/bin/mysqld(_ZN19Item_func_isnotnull5printEP6String15enum_query_type+0x3d)[0x55b15081496d]
      sql/item.cc:7715(Item_field::print(String*, enum_query_type))[0x55b150714166]
      sql/item_cmpfunc.cc:5200(Item_func_isnotnull::print(String*, enum_query_type))[0x55b150717b36]
      sql/sql_string.h:218(String::c_ptr_safe())[0x55b15071862f]
      sql/sql_explain.cc:1550(Explain_table_access::print_explain_json(Explain_query*, Json_writer*, bool))[0x55b150718ae7]
      sql/sql_explain.cc:1058(Explain_basic_join::print_explain_json_interns(Explain_query*, Json_writer*, bool))[0x55b150715336]
      sql/sql_explain.cc:955(Explain_select::print_explain_json(Explain_query*, Json_writer*, bool))[0x55b150717f21]
      sql/sql_explain.cc:1753(Explain_table_access::print_explain_json(Explain_query*, Json_writer*, bool))[0x55b15071862f]
      sql/sql_explain.cc:1058(Explain_basic_join::print_explain_json_interns(Explain_query*, Json_writer*, bool))[0x55b1507189d7]
      sql/sql_explain.cc:955(Explain_select::print_explain_json(Explain_query*, Json_writer*, bool))[0x55b150717f21]
      sql/sql_explain.cc:1753(Explain_table_access::print_explain_json(Explain_query*, Json_writer*, bool))[0x55b15071862f]
      sql/sql_explain.cc:1058(Explain_basic_join::print_explain_json_interns(Explain_query*, Json_writer*, bool))[0x55b150718ae7]
      sql/sql_explain.cc:955(Explain_select::print_explain_json(Explain_query*, Json_writer*, bool))[0x55b150714a0c]
      sql/sql_explain.cc:229(Explain_query::print_explain_json(select_result_sink*, bool))[0x55b150714af0]
      sql/sql_explain.cc:179(Explain_query::send_explain(THD*))[0x55b1505447e1]
      sql/sql_parse.cc:6560(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55b15062da69]
      sql/sql_parse.cc:3821(mysql_execute_command(THD*))[0x55b15062fd19]
      sql/sql_class.h:1820(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55b150631e95]
      sql/sql_parse.cc:1857(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55b15063263e]
      sql/sql_parse.cc:1405(do_command(THD*))[0x55b1507331b7]
      sql/threadpool_common.cc:358(threadpool_process_request)[0x55b1507be2c8]
      sql/threadpool_generic.cc:1601(worker_main(void*))[0x55b15095f35d]
      /lib64/libpthread.so.0(+0x7dd5)[0x7f597927fdd5]
      /lib64/libc.so.6(clone+0x6d)[0x7f597815aead]
      

      It looks very similar to the one in MDEV-8864 fixed long time ago.

      Attachments

        Issue Links

          Activity

            People

              igor Igor Babaev
              valerii Valerii Kravchuk
              Votes:
              0 Vote for this issue
              Watchers:
              8 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.