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

Service crashed on procedure call

    XMLWordPrintable

Details

    • Can result in hang or crash
    • Q3/2026 Server Maintenance

    Description

      Service crashed on procedure call. It was executing every 15 minutes by event and was fine. Now started the service, disabled event and execute procedure call manually. The service crash again. Here are some logs and procedure code.

      250626  9:04:51 [ERROR] mysqld got exception 0xc0000005 ;
      Sorry, we probably made a mistake, and this is a bug.
       
      Server version: 11.4.2-MariaDB source revision: 3fca5ed772fb75e3e57c507edef2985f8eba5b12
       
      Thread pointer: 0x20f37a12578
       
      server.dll!Field_row::sp_prepare_and_store_item()[field.cc:2764]
      server.dll!THD::sp_eval_expr()[sp_head.cc:448]
      server.dll!sp_rcontext::set_variable()[sp_rcontext.cc:642]
      server.dll!sp_instr_set::exec_core()[sp_instr.cc:994]
      server.dll!sp_lex_keeper::reset_lex_and_exec_core()[sp_instr.cc:296]
      server.dll!sp_lex_keeper::validate_lex_and_exec_core()[sp_instr.cc:478]
      server.dll!sp_instr_set_case_expr::execute()[sp_instr.cc:1362]
      server.dll!sp_head::execute()[sp_head.cc:1286]
      server.dll!sp_head::execute_procedure()[sp_head.cc:2302]
      server.dll!do_execute_sp()[sql_parse.cc:3060]
      server.dll!Sql_cmd_call::execute()[sql_parse.cc:3280]
      server.dll!mysql_execute_command()[sql_parse.cc:5848]
      server.dll!mysql_parse()[sql_parse.cc:7866]
      server.dll!dispatch_command()[sql_parse.cc:1895]
      server.dll!do_command()[sql_parse.cc:1406]
      server.dll!tp_callback()[threadpool_common.cc:249]
      KERNEL32.DLL!TermsrvSetKeySecurity()
      ntdll.dll!RtlEqualUnicodeString()
      ntdll.dll!TpReleaseCleanupGroupMembers()
      KERNEL32.DLL!BaseThreadInitThunk()
      ntdll.dll!RtlUserThreadStart()
       
      Query (0x20f363aff00): CALL update_plep(\N)
      

      A shorter reproducing script for the client

      set sql_mode='oracle';
       
      delimiter //
      create or replace procedure sp () as
       cursor c1 is select 1;
       
       cursor refreshed (d1 int) is select  1;
       r_refreshed refreshed%rowtype;
       
      begin
       open refreshed(0);
      end//
       
      delimiter ;
      call sp(); -- This statement crashes
      

      Attachments

        1. cdb_analyze.txt
          35 kB
          Vladislav Vaintroub

        Issue Links

          Activity

            People

              shulga Dmitry Shulga
              balta Tadas Balaišis
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 8.6d Original Estimate - 8.6d
                  8.6d
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 11d 6.5h
                  11d 6.5h

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.