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

Executing EXPLAIN of complex query over join limit causes server to crash

    XMLWordPrintable

Details

    • 10.0.34

    Description

      A user saw the following crash when executing EXPLAIN for a complex query that exceeds the 61 table join limit:

      Nov 11 13:50:44 ip-172-30-0-32 mysqld: 161111 13:50:44 [ERROR] mysqld got signal 11 ;
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: This could be because you hit a bug. It is also possible that this binary
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: or one of the libraries it was linked against is corrupt, improperly built,
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: or misconfigured. This error can also be caused by malfunctioning hardware.
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: To report this bug, see https://mariadb.com/kb/en/reporting-bugs
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: We will try our best to scrape up some info that will hopefully help
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: diagnose the problem, but since we have already crashed,
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: something is definitely wrong and this may fail.
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: Server version: 10.1.18-MariaDB
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: key_buffer_size=134217728
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: read_buffer_size=131072
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: max_used_connections=1
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: max_threads=153
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: thread_count=1
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: It is possible that mysqld could use up to
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467121 K  bytes of memory
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: Hope that's ok; if not, decrease some variables in the equation.
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: Thread pointer: 0x0x7fdab1c0e008
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: Attempting backtrace. You can use the following information to find out
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: where mysqld died. If you see no messages after this, something went
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: terribly wrong...
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: stack_bottom = 0x7fdad8f9c130 thread_stack 0x48400
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: /usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x7fdad9b46a6e]
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: /usr/sbin/mysqld(handle_fatal_signal+0x2d5)[0x7fdad966c8d5]
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: /lib64/libpthread.so.0(+0xf100)[0x7fdad8c87100]
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: /usr/sbin/mysqld(_ZN10TABLE_LIST20fetch_number_of_rowsEv+0x30)[0x7fdad9599d70]
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: /usr/sbin/mysqld(+0x47df05)[0x7fdad9535f05]
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: /usr/sbin/mysqld(_ZN4JOIN14optimize_innerEv+0x72f)[0x7fdad953e6af]
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: /usr/sbin/mysqld(_ZN4JOIN8optimizeEv+0x2f)[0x7fdad9540faf]
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: /usr/sbin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x8f)[0x7fdad95410ef]
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: /usr/sbin/mysqld(_Z19mysql_explain_unionP3THDP18st_select_lex_unitP13select_result+0x120)[0x7fdad9541dd0]
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: /usr/sbin/mysqld(+0x428e8b)[0x7fdad94e0e8b]
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: /usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x5f8f)[0x7fdad94ecfaf]
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: /usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x352)[0x7fdad94f0952]
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: /usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x25db)[0x7fdad94f3e2b]
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: /usr/sbin/mysqld(_Z10do_commandP3THD+0x169)[0x7fdad94f46a9]
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: /usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x18a)[0x7fdad95bb19a]
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: /usr/sbin/mysqld(handle_one_connection+0x40)[0x7fdad95bb370]
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: /lib64/libpthread.so.0(+0x7dc5)[0x7fdad8c7fdc5]
      Nov 11 13:50:44 ip-172-30-0-32 mysqld: /lib64/libc.so.6(clone+0x6d)[0x7fdad70a21cd]
      

      Attachments

        Issue Links

          Activity

            People

              varun Varun Gupta (Inactive)
              GeoffMontee Geoff Montee (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              7 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.