Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-7485

Regression crash on MySQl 8.0.22 when executing SP

Details

    • Bug
    • Status: Done
    • High
    • Resolution: Fixed
    • Not 5.6.x, Not 5.7.x, 8.0.22-13
    • None
    • None

    Description

      MySQL 8.0.22 crashes with the following stack trace:

       

      Build ID: e8de225be5945e9ad0279fcd08607fdf7a4b6c92
      Server Version: 8.0.22-13 Percona Server (GPL), Release 13, Revision 6f7822f
      Thread pointer: 0x7fea50000d40
      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...
      stack_bottom = 7feabc754c70 thread_stack 0x46000
      /usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x3d) [0x210c1ed]
      /usr/sbin/mysqld(handle_fatal_signal+0x3c3) [0x1260d53]
      /lib64/libpthread.so.0(+0xf630) [0x7feacf751630]
      /usr/sbin/mysqld(Query_result_update::do_updates(THD*)+0x35) [0x11e5b05]
      /usr/sbin/mysqld(Query_result_update::send_eof(THD*)+0x1bb) [0x11e655b]
      /usr/sbin/mysqld(SELECT_LEX_UNIT::ExecuteIteratorQuery(THD*)+0x474) [0x11e0824]
      /usr/sbin/mysqld(SELECT_LEX_UNIT::execute(THD*)+0x2c) [0x11e097c]
      /usr/sbin/mysqld(Sql_cmd_dml::execute_inner(THD*)+0x3cb) [0x1164b6b]
      /usr/sbin/mysqld(Sql_cmd_update::execute_inner(THD*)+0xcb) [0x11ec60b]
      /usr/sbin/mysqld(Sql_cmd_dml::execute(THD*)+0x6c0) [0x116f5b0]
      /usr/sbin/mysqld(mysql_execute_command(THD*, bool)+0xaf8) [0x110e5a8]
      /usr/sbin/mysqld(sp_instr_stmt::exec_core(THD*, unsigned int*)+0x51) [0x106f3c1]
      /usr/sbin/mysqld(sp_lex_instr::reset_lex_and_exec_core(THD*, unsigned int*, bool)+0x1bb) [0x107135b]
      /usr/sbin/mysqld(sp_lex_instr::validate_lex_and_execute_core(THD*, unsigned int*, bool)+0xa1) [0x1072251]
      /usr/sbin/mysqld(sp_instr_stmt::execute(THD*, unsigned int*)+0xee) [0x1073b1e]
      /usr/sbin/mysqld(sp_head::execute(THD*, bool)+0x5c7) [0x1068e57]
      /usr/sbin/mysqld(sp_head::execute_procedure(THD*, mem_root_deque<Item*>*)+0x838) [0x106bec8]
      /usr/sbin/mysqld(Sql_cmd_call::execute_inner(THD*)+0x148) [0x109ef28]
      /usr/sbin/mysqld(Sql_cmd_dml::execute(THD*)+0x6c0) [0x116f5b0]
      /usr/sbin/mysqld(mysql_execute_command(THD*, bool)+0xaf8) [0x110e5a8]
      /usr/sbin/mysqld(mysql_parse(THD*, Parser_state*, bool)+0x4ec) [0x111329c]
      /usr/sbin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x1be5) [0x1115345]
      /usr/sbin/mysqld(do_command(THD*)+0x204) [0x1116574]
      /usr/sbin/mysqld() [0x1251c40]
      /usr/sbin/mysqld() [0x2620ea4]
      /lib64/libpthread.so.0(+0x7ea5) [0x7feacf749ea5]
      /lib64/libc.so.6(clone+0x6d) [0x7feacd89896d]
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (7fea501ed6c8): UPDATE `tbFoo` JOIN (SELECT 1) AS T(n) SET `tbFoo`.`dummy` = 1 WHERE `tbFoo`.`id` = 1 AND `arg` >= 2
      Connection ID (thread ID): 8
      Status: NOT_KILLED
      

       

       

      How to repeat on 8.0.22:

      DROP DATABASE IF EXISTS U; 
       CREATE DATABASE U; 
       USE U; 
       DELIMITER $$
       CREATE PROCEDURE `spCrasher`(
       `arg`INT
       )
       BEGIN
       UPDATE
       `tbFoo`
       JOIN (SELECT 1) AS T
       SET
       `tbFoo`.`dummy` = 1
       WHERE
       `tbFoo`.`id` = 1 AND
       `arg` >= 2
       ;
       END$$
       DELIMITER ;
      DROP TEMPORARY TABLE IF EXISTS `tbFoo`;
       CREATE TEMPORARY TABLE `tbFoo`( `id` INT, `dummy` INT);
       INSERT INTO `tbFoo`( `id` ) VALUES( 1 );
       CALL `spCrasher`(2);
       CALL `spCrasher`(1);
      

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              carlos.tutte Carlos Tutte
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Smart Checklist