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

main.sp-error stack overflow on MSAN-debug and UBASAN debug builders

    XMLWordPrintable

Details

    • Not for Release Notes

    Description

      The failures are of the form:

      CURRENT_TEST: main.sp-error
      mysqltest: At line 2246: query 'call p1(1)' failed with wrong errno <Unknown> (2013): 'Lost connection to server during query', instead of  (0)...
      The result from queries just before the failure was:
      < snip >
      create procedure proc_36510()
      begin
      declare should_be_illegal condition for 0;
      declare continue handler for should_be_illegal set @x=0;
      end$$
      ERROR HY000: Incorrect CONDITION value: '0'
      create procedure proc_36510()
      begin
      declare continue handler for 0 set @x=0;
      end$$
      ERROR HY000: Incorrect CONDITION value: '0'
      set @old_recursion_depth = @@max_sp_recursion_depth;
      set @@max_sp_recursion_depth = 255;
      create procedure p1(a int)
      begin
      declare continue handler for 1436 -- ER_STACK_OVERRUN_NEED_MORE
      select 'exception';
      call p1(a+1);
      end|
      call p1(1);
      More results from queries before failure can be found in /dev/shm/normal/4/log/sp-error.log
      

      The stack depth in msan builders is ~239 of which 39 where do_execute_sp (the assumption of recursion level).

      ubasan stack depth of ~1996 corresponding to 247 as a recursion level.

      The bug Bug#15192 test in sp-error uses a 255 recursion depth.

      Raising the stack size in MDEV-37705 on MSAN debug wasn't sufficient for this test.

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              danblack Daniel Black
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.