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

Crash at JOIN::reinit - calling stored procedure

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Duplicate
    • 10.5, 10.4.17, 10.5.9, 10.4(EOL)
    • N/A
    • Server
    • None

    Description

      One of our customers reported that the execution of stored procedure involving "CONNECT"/"MEMORY" engine tables, table_type=WMI, CTE, JOIN, UNION ALL QUERY, causing MariaDB server running on Windows platform to crash.

      I can locally able to reproduce the crash, at 10.4.17 (customer version) and 10.5.9 (latest release).

      Repro Steps:
      1. Install MariaDB server 10.4.17/10.5.9 at the Window Machine.
      2. Install connect plugin.
      3. Restore the dump file - proc_monitor_values_prtg_new.sql
      4. call the procedure - server_monitoring.query_monitor_values_prtg.
      call server_monitoring.query_monitor_values_prtg;

      First time execution, will work. 2nd time it will crash the server.

      ERROR log:

      2021-03-10 15:02:06 5 [Note] CONNECT: Version 1.07.0002 Feb 19 2021 10:36:16
      210310 15:02:52 [ERROR] mysqld got exception 0xc0000005 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
       
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed, 
      something is definitely wrong and this may fail.
       
      Server version: 10.5.9-MariaDB
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=2
      max_threads=65537
      thread_count=2
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 136467 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x25c638b9318
      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...
      server.dll!JOIN::reinit()[sql_select.cc:4067]
      server.dll!st_select_lex_unit::optimize()[sql_union.cc:2099]
      server.dll!st_select_lex_unit::exec()[sql_union.cc:2157]
      server.dll!mysql_union()[sql_union.cc:41]
      server.dll!handle_select()[sql_select.cc:433]
      server.dll!execute_sqlcom_select()[sql_parse.cc:6282]
      server.dll!mysql_execute_command()[sql_parse.cc:3978]
      server.dll!sp_instr_stmt::exec_core()[sp_head.cc:3770]
      server.dll!sp_lex_keeper::reset_lex_and_exec_core()[sp_head.cc:3495]
      server.dll!sp_instr_stmt::execute()[sp_head.cc:3674]
      server.dll!sp_head::execute()[sp_head.cc:1437]
      server.dll!sp_head::execute_procedure()[sp_head.cc:2449]
      server.dll!do_execute_sp()[sql_parse.cc:3088]
      server.dll!Sql_cmd_call::execute()[sql_parse.cc:3334]
      server.dll!mysql_execute_command()[sql_parse.cc:6036]
      server.dll!mysql_parse()[sql_parse.cc:8067]
      server.dll!dispatch_command()[sql_parse.cc:1892]
      server.dll!do_command()[sql_parse.cc:1370]
      server.dll!threadpool_process_request()[threadpool_common.cc:363]
      server.dll!tp_callback()[threadpool_common.cc:194]
      ntdll.dll!TpReleaseWait()
      ntdll.dll!RtlInitializeResource()
      KERNEL32.DLL!BaseThreadInitThunk()
      ntdll.dll!RtlUserThreadStart()
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x25c982d6480): WITH CheckTableEngines AS (
      

      Thank You,
      Suresh

      Attachments

        Issue Links

          Activity

            People

              igor Igor Babaev
              suresh.ramagiri@mariadb.com suresh ramagiri
              Votes:
              0 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.