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

SIGSEGV in Explain_union::print_explain_regular | Explain_node::print_explain_for_children

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2, 11.3, 11.4, 11.5
    • 10.4, 10.5, 10.6, 10.11, 11.1, 11.2, 11.4
    • None
    • None

    Description

      SET SQL_MODE='';
      SET SESSION log_slow_verbosity=5;
      set slow_query_log=on;
      SET @@long_query_time=0;
      SET @@GLOBAL.slow_query_log=ON;
      set global log_output=FILE;
      SET @@MAX_STATEMENT_TIME=0.0001;
      --error ER_STATEMENT_TIMEOUT
      values((values (1)union values (1) union values (1)));
      --error ER_STATEMENT_TIMEOUT
      values((values (1)union values (1) union values (1)));
      

      Leads to:

      11.5.0 e0b6db2de779320855d90a82bf56da0414de2154 (Optimized)

      Core was generated by `/test/MD110424-mariadb-11.5.0-linux-x86_64-opt/bin/mariadbd --no-defaults --max'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x0000558eda1ad085 in Explain_union::print_explain_regular (this=0x145fa8037240, query=0x145fa80477e0, output=0x145ff008f930, explain_flags=0 '\000', is_analyze=true)at /test/server_opt/sql/sql_explain.cc:611
      [Current thread is 1 (Thread 0x145ff0091700 (LWP 2295334))]
      (gdb) bt
      #0  0x0000558eda1ad085 in Explain_union::print_explain_regular (this=0x145fa8037240, query=0x145fa80477e0, output=0x145ff008f930, explain_flags=0 '\000', is_analyze=true) at /test/server_opt/sql/sql_explain.cc:611
      #1  0x0000558eda1acf1c in Explain_node::print_explain_for_children (this=this@entry=0x145fa80426d0, query=query@entry=0x145fa80477e0, output=output@entry=0x145ff008f930, explain_flags=explain_flags@entry=0 '\000', is_analyze=is_analyze@entry=true) at /test/server_opt/sql/sql_explain.cc:888
      #2  0x0000558eda1b0c67 in Explain_select::print_explain (this=<optimized out>, query=0x145fa80477e0, output=<optimized out>, explain_flags=<optimized out>, is_analyze=<optimized out>) at /test/server_opt/sql/sql_explain.cc:1087
      #3  0x0000558eda1ad9f6 in Explain_query::print_explain_str (this=0x145fa80477e0, thd=thd@entry=0x145fa8000c58, out_str=out_str@entry=0x145ff008fae0, is_analyze=is_analyze@entry=true) at /test/server_opt/sql/sql_explain.cc:358
      #4  0x0000558eda1ada35 in print_explain_for_slow_log (lex=<optimized out>, thd=thd@entry=0x145fa8000c58, str=str@entry=0x145ff008fae0) at /test/server_opt/sql/sql_explain.cc:342
      #5  0x0000558eda3fd52d in MYSQL_QUERY_LOG::write (this=0x558edd905078, thd=0x145fa8000c58, current_time=<optimized out>, user_host=<optimized out>, user_host_len=<optimized out>, query_utime=<optimized out>, lock_utime=0, is_command=false, sql_text=0x145fa8018400 "values((values (1)union values (1) union values (1)))", sql_text_len=53) at /test/server_opt/sql/log.cc:3310
      #6  0x0000558eda3fded6 in Log_to_file_event_handler::log_slow (this=0x558edd904c50, thd=0x145fa8000c58, current_time=<optimized out>, user_host=0x145ff0090040 "root[root] @ localhost []", user_host_len=25, query_utime=234, lock_utime=0, is_command=false, sql_text=0x145fa8018400 "values((values (1)union values (1) union values (1)))", sql_text_len=53) at /test/server_opt/sql/log.cc:1047
      #7  0x0000558eda3f61b2 in LOGGER::slow_log_print (this=0x558edb3e6040 <logger>, thd=0x145fa8000c58, query=0x145fa8018400 "values((values (1)union values (1) union values (1)))", query_length=53, current_utime=<optimized out>) at /test/server_opt/sql/log.cc:1324
      #8  0x0000558eda0508c4 in log_slow_statement (thd=thd@entry=0x145fa8000c58) at /test/server_opt/sql/sql_class.h:1604
      #9  0x0000558eda0562e1 in dispatch_command (command=COM_QUERY, thd=0x145fa8000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/server_opt/sql/sql_parse.cc:2444
      #10 0x0000558eda05928e in do_command (thd=0x145fa8000c58, blocking=blocking@entry=true) at /test/server_opt/sql/sql_parse.cc:1406
      #11 0x0000558eda18a1a7 in do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /test/server_opt/sql/sql_connect.cc:1438
      #12 0x0000558eda18a4ed in handle_one_connection (arg=arg@entry=0x558eddfcbbe8) at /test/server_opt/sql/sql_connect.cc:1340
      #13 0x0000558eda53b55c in pfs_spawn_thread (arg=0x558eddff1ea8) at /test/server_opt/storage/perfschema/pfs.cc:2201
      #14 0x0000145ff3dce609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #15 0x0000145ff39ba133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.34 (dbg), 10.4.34 (opt), 10.5.25 (dbg), 10.5.25 (opt), 10.6.18 (dbg), 10.6.18 (opt), 10.11.8 (dbg), 10.11.8 (opt), 11.0.6 (dbg), 11.0.6 (opt), 11.1.5 (dbg), 11.1.5 (opt), 11.2.4 (dbg), 11.2.4 (opt), 11.3.3 (dbg), 11.3.3 (opt), 11.4.2 (dbg), 11.4.2 (opt), 11.5.0 (dbg), 11.5.0

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.