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

SIGSEGV in sp_instr_set::print | sp_head::show_routine_code

    XMLWordPrintable

Details

    Description

      INSTALL SONAME 'ha_rocksdb';
      SET GLOBAL transaction_isolation=0;
      SET SESSION tx_isolation=DEFAULT;
       
      --delimiter $
      CREATE PROCEDURE p()
      BEGIN
        DECLARE cur CURSOR FOR SELECT * FROM t;
        BEGIN
          DECLARE rec ROW TYPE OF cur DEFAULT ROW(0,0);
        END;
      END; $
      --delimiter ;
      CREATE TABLE t (c1 INT, c2 INT) ENGINE=RocksDB;
      --ERROR ER_ISOLATION_MODE_NOT_SUPPORTED
      CALL p;
      CREATE OR REPLACE TABLE t (c1 INT, c2 INT) ENGINE=RocksDB;
      --ERROR ER_ISOLATION_MODE_NOT_SUPPORTED
      CALL p();
      SHOW PROCEDURE CODE p;
       
      # Cleanup
      DROP PROCEDURE p;
      DROP TABLE t;
      

      Leads to:

      CS 11.8.1 f9125dffc624809731e22fd64e4158fb3a76da69 (Debug) Build 16/04/2025

      Core was generated by `/test/MD160425-mariadb-11.8.1-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x0000557f8ed77a70 in sp_instr_set::print (this=0x14cbf027b720, str=0x14cc456809f0) at /test/11.8_dbg/sql/sp_instr.cc:1136
       
      [Current thread is 1 (Thread 0x14cc456846c0 (LWP 644881))]
      (gdb) bt
      #0  0x0000557f8ed77a70 in sp_instr_set::print (this=0x14cbf027b720, str=0x14cc456809f0) at /test/11.8_dbg/sql/sp_instr.cc:1136
      #1  0x0000557f8e9b30b6 in sp_head::show_routine_code (this=0x14cbf0076300, thd=0x14cbf0000d58) at /test/11.8_dbg/sql/sp_head.cc:3460
      #2  0x0000557f8eacbfac in mysql_execute_command (thd=0x14cbf0000d58, is_called_from_prepared_stmt=false) at /test/11.8_dbg/sql/sql_parse.cc:5664
      #3  0x0000557f8eabbec4 in mysql_parse (thd=0x14cbf0000d58, rawbuf=0x14cbf0019d20 "SHOW PROCEDURE CODE p", length=21, parser_state=0x14cc45682a20) at /test/11.8_dbg/sql/sql_parse.cc:7915
      #4  0x0000557f8eab9294 in dispatch_command (command=COM_QUERY, thd=0x14cbf0000d58, packet=0x14cbf000b099 "", packet_length=21, blocking=true) at /test/11.8_dbg/sql/sql_parse.cc:1902
      #5  0x0000557f8eabca73 in do_command (thd=0x14cbf0000d58, blocking=true)at /test/11.8_dbg/sql/sql_parse.cc:1415
      #6  0x0000557f8eca6289 in do_handle_one_connection (connect=0x557fce37a0f8, put_in_cache=true) at /test/11.8_dbg/sql/sql_connect.cc:1415
      #7  0x0000557f8eca602e in handle_one_connection (arg=0x557fce393308)at /test/11.8_dbg/sql/sql_connect.cc:1327
      #8  0x000014cc5189caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #9  0x000014cc51929c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug Detection Matrix

          Rel    o/d  Build   Commit                                    UniqueID observed                          
      CS  10.5   dbg  210425  952ffb55f93bf6a6c5d1c9617e5a2a56207ee674  No bug found                                
      CS  10.5   opt  210425  952ffb55f93bf6a6c5d1c9617e5a2a56207ee674  No bug found                  
      CS  10.6   dbg  150425  ee947fae80dc5f82d2c964cd0d8e897e9c244002  No bug found                                 
      CS  10.6   opt  150425  ee947fae80dc5f82d2c964cd0d8e897e9c244002  No bug found                   
      CS  10.11  dbg  210425  7d9660ed93c6bcf56a6dafd0872b27ac1709778a  No bug found                  
      CS  10.11  opt  210425  7d9660ed93c6bcf56a6dafd0872b27ac1709778a  No bug found                  
      CS  11.4   dbg  010425  30140c066d50f7e4ac4f490a9e081d9d605aea07  SIGSEGV|sp_instr_set::print|sp_head::show_routine_code|mysql_execute_command|mysql_parse
      CS  11.4   opt  010425  30140c066d50f7e4ac4f490a9e081d9d605aea07  No bug found                  
      CS  11.8   dbg  160425  f9125dffc624809731e22fd64e4158fb3a76da69  SIGSEGV|sp_instr_set::print|sp_head::show_routine_code|mysql_execute_command|mysql_parse
      CS  11.8   opt  160425  f9125dffc624809731e22fd64e4158fb3a76da69  No bug found                  
      CS  12.0   dbg  010425  22efc2c784e1b7199fb5804e6330168277ea7dce  SIGSEGV|sp_instr_set::print|sp_head::show_routine_code|mysql_execute_command|mysql_parse
      CS  12.0   opt  010425  22efc2c784e1b7199fb5804e6330168277ea7dce  No bug found                  
      CS  12.0   opt  230325  5f7e88333682877ad0368b53575511ab02c7365a  No bug found                  
      ES  10.5   dbg  170325  e99e19fae843c6ab174d0793e82b76bf6d980147  No bug found                  
      ES  10.5   opt  170325  e99e19fae843c6ab174d0793e82b76bf6d980147  No bug found                  
      ES  10.6   dbg  170325  ee1d68c27bc578f7750b898d7c65acfec33dc30b  No bug found                  
      ES  10.6   opt  170325  ee1d68c27bc578f7750b898d7c65acfec33dc30b  No bug found                  
      ES  11.4   dbg  170325  c623275dc5fb705004d716e4c32386cf89649b9d  SIGSEGV|sp_instr_set::print|sp_head::show_routine_code|mysql_execute_command|mysql_parse
      ES  11.4   opt  170325  c623275dc5fb705004d716e4c32386cf89649b9d  No bug found                              
      

      Attachments

        Activity

          People

            shulga Dmitry Shulga
            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.