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

SIGSEGV in ha_storage_engine_is_enabled on slave on CREATE TABLE after dropping view

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.5, 10.6, 10.11, 11.0(EOL), 11.1(EOL), 11.2, 11.3(EOL), 11.4, 11.5(EOL)
    • 10.5, 10.6, 10.11, 11.2, 11.4
    • Replication, Views
    • None

    Description

      Seems to relate to the previously fixed MDEV-23764 (though stack differs at fr 3 create_table_impl). serg FYI as you fixed that one.

      --source include/master-slave.inc
      CREATE VIEW c AS SELECT 1 c;
      --error ER_SIGNAL_EXCEPTION
      CALL sys.statement_performance_analyzer (1,1,1);
      DROP VIEW c;
      SET sql_log_bin=1;
      CREATE TABLE c (a INT);
      --source include/rpl_end.inc
      

      Leads to:

      11.5.0 eeba940311ed17d160023280783fd2bbb64abef3 (Optimized)

      Core was generated by `/test/MD190224-mariadb-11.5.0-linux-x86_64-opt/bin/mariadbd --no-defaults --gti'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x0000556efc9cb0e9 in ha_storage_engine_is_enabled (db_type=0x1) at /test/11.5_opt/sql/handler.h:5568
      [Current thread is 1 (LWP 1510345)]
      (gdb) bt
      #0  0x0000556efc9cb0e9 in ha_storage_engine_is_enabled (db_type=0x1) at /test/11.5_opt/sql/handler.h:5568
      #1  ha_checktype (thd=0x15118c000c68, hton=0x1, no_substitute=true) at /test/11.5_opt/sql/handler.cc:362
      #2  0x0000556efc9d59d5 in ha_check_if_updates_are_ignored ( thd=thd@entry=0x15118c000c68, hton=<optimized out>, op=op@entry=0x556efd25eb38 "CREATE") at /test/11.5_opt/sql/handler.cc:6592
      #3  0x0000556efc800e3f in create_table_impl (thd=thd@entry=0x15118c000c68, ddl_log_state_create=ddl_log_state_create@entry=0x1511e40ca490, ddl_log_state_rm=ddl_log_state_rm@entry=0x1511e40ca6a0, orig_db=@0x15118c0086c0: {str = 0x15118c008db8 "test", length = 4}, orig_table_name=@0x15118c0086d0: {str = 0x15118c008670 "c", length = 1}, db=@0x15118c0086c0: {str = 0x15118c008db8 "test", length = 4}, table_name=@0x15118c0086d0: {str = 0x15118c008670 "c", length = 1}, path=@0x1511e40ca160: {str = 0x1511e40ca180 "./test/c", length = 8}, options={m_options = (DDL_options_st::OPT_OR_REPLACE | DDL_options_st::OPT_OR_REPLACE_SLAVE_GENERATED)}, create_info=0x1511e40ca810, alter_info=0x1511e40ca530, create_table_mode=0, is_trans=0x1511e40ca450, key_info=0x1511e40ca158, key_count=0x1511e40ca154, frm=0x1511e40ca170) at /test/11.5_opt/sql/sql_table.cc:4483
      #4  0x0000556efc801766 in mysql_create_table_no_lock ( thd=thd@entry=0x15118c000c68, ddl_log_state_create=ddl_log_state_create@entry=0x1511e40ca490, ddl_log_state_rm=ddl_log_state_rm@entry=0x1511e40ca6a0, create_info=create_info@entry=0x1511e40ca810, alter_info=alter_info@entry=0x1511e40ca530, is_trans=is_trans@entry=0x1511e40ca450, create_table_mode=0, table_list=0x15118c0086a8) at /test/11.5_opt/sql/sql_table.cc:4753
      #5  0x0000556efc806c64 in mysql_create_table (alter_info=0x1511e40ca530, create_info=0x1511e40ca810, create_table=0x15118c0086a8, thd=0x15118c000c68) at /test/11.5_opt/sql/sql_table.cc:4934
      #6  Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x15118c000c68) at /test/11.5_opt/sql/sql_table.cc:13043
      #7  0x0000556efc746818 in mysql_execute_command (thd=thd@entry=0x15118c000c68, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.5_opt/sql/sql_parse.cc:5803
      #8  0x0000556efc747796 in mysql_parse (thd=0x15118c000c68, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1511e40cc850) at /test/11.5_opt/sql/sql_parse.cc:7815
      #9  0x0000556efcb1249a in Query_log_event::do_apply_event ( this=<optimized out>, rgi=<optimized out>, query_arg=0x1511b0027413 "CREATE TABLE c (a INT)", q_len_arg=<optimized out>) at /test/11.5_opt/sql/sql_class.h:254
      #10 0x0000556efcb04dc1 in Log_event::apply_event (this=0x1511b00245b8, rgi=rgi@entry=0x1511b0022870) at /test/11.5_opt/sql/log_event.cc:3917
      #11 0x0000556efc678410 in apply_event_and_update_pos_apply ( ev=ev@entry=0x1511b00245b8, thd=thd@entry=0x15118c000c68, rgi=rgi@entry=0x1511b0022870, reason=reason@entry=0) at /test/11.5_opt/sql/slave.cc:3918
      #12 0x0000556efc680888 in apply_event_and_update_pos_for_parallel ( ev=ev@entry=0x1511b00245b8, thd=thd@entry=0x15118c000c68, rgi=rgi@entry=0x1511b0022870) at /test/11.5_opt/sql/slave.cc:4125
      #13 0x0000556efc8f60fc in rpt_handle_event (qev=qev@entry=0x1511b0023508, rpt=0x1511b000cac8) at /test/11.5_opt/sql/rpl_parallel.cc:64
      #14 0x0000556efc8fad8d in handle_rpl_parallel_thread ( arg=arg@entry=0x1511b000cac8) at /test/11.5_opt/sql/rpl_parallel.cc:1541
      #15 0x0000556efcc27711 in pfs_spawn_thread (arg=0x1511b000fb88) at /test/11.5_opt/storage/perfschema/pfs.cc:2201
      #16 0x0000151205c8f18a in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:444
      #17 0x0000151205d1dbd0 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Present in dbg+opt, tested 10.5+. Bug is lightly sporadic.

      Attachments

        Issue Links

          Activity

            People

              Elkin Andrei Elkin
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.