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

SIGSEGV in THD::reset_db, Rows_log_event::Db_restore_ctx::Db_restore_ctx

    XMLWordPrintable

Details

    Description

      DROP TABLE IF EXISTS t1;
      BINLOG ' SOgWTg8CAAAAbgAAAHIAAAAAAAQANS42LjMtbTUtZGVidWctbG9nAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAABI6BZOEzgNAAgAEgAEBAQEEgAAVgAEGggAAAAICAgCAAAAAAVAYI8=';
      CREATE TABLE t1 (a INT,INDEX (a)) ENGINE=MERGE;
      BINLOG 'wlZOTxMBAAAAKgAAADwCAAAAACkAAAAAAAEABHRlc3QAAnQxAAIDAwAC wlZOTxcBAAAAJgAAAGICAAAAACkAAAAAAAEAAv/8AgAAAAgAAAA=';
      FLUSH TABLES;
      FLUSH LOCAL TABLES t1 FOR EXPORT;
      BINLOG 'wlZOTxMBAAAAKgAAADwCAAAAACkAAAAAAAEABHRlc3QAAnQxAAIDAwAC wlZOTxcBAAAAJgAAAGICAAAAACkAAAAAAAEAAv/8AgAAAAgAAAA=';
      

      Leads to:

      CS 10.6.20 231900e5bb15e5d6d90b8a6daf38a0b21d1a19e7 (Debug)

      Core was generated by `/test/MD260924-mariadb-10.6.20-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x00005569197c9394 in THD::reset_db (this=0x1467e8000d58, new_db=0xa5a5a5a5a5a5a97d) at /test/10.6_dbg/sql/sql_class.cc:1584
      1584	  if (new_db->str != db.str || new_db->length != db.length)
      [Current thread is 1 (LWP 3763337)]
      (gdb) bt
      #0  0x00005569197c9394 in THD::reset_db (this=0x1467e8000d58, new_db=0xa5a5a5a5a5a5a97d) at /test/10.6_dbg/sql/sql_class.cc:1584
      #1  0x0000556919c60cb1 in Rows_log_event::Db_restore_ctx::Db_restore_ctx (rev=0x1467e8064f78, this=0x146830111c50)at /test/10.6_dbg/sql/log_event.h:5256
      #2  Rows_log_event::do_apply_event (this=0x1467e8064f78, rgi=0x1467e8062c40)at /test/10.6_dbg/sql/log_event_server.cc:5773
      #3  0x0000556919963780 in Log_event::apply_event (rgi=0x1467e8062c40, this=0x1467e8064f78) at /test/10.6_dbg/sql/log_event.h:1512
      #4  mysql_client_binlog_statement (thd=thd@entry=0x1467e8000d58)at /test/10.6_dbg/sql/sql_binlog.cc:376
      #5  0x00005569198361d2 in mysql_execute_command (thd=thd@entry=0x1467e8000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false)at /test/10.6_dbg/sql/sql_parse.cc:6055
      #6  0x0000556919837e0c in mysql_parse (thd=thd@entry=0x1467e8000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x146830112300)at /test/10.6_dbg/sql/sql_parse.cc:8181
      #7  0x000055691983a2a3 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1467e8000d58, packet=packet@entry=0x1467e800b0c9 "BINLOG 'wlZOTxMBAAAAKgAAADwCAAAAACkAAAAAAAEABHRlc3QAAnQxAAIDAwAC wlZOTxcBAAAAJgAAAGICAAAAACkAAAAAAAEAAv/8AgAAAAgAAAA='", packet_length=packet_length@entry=118, blocking=blocking@entry=true)at /test/10.6_dbg/sql/sql_class.h:242
      #8  0x000055691983c4ca in do_command (thd=0x1467e8000d58, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1410
      #9  0x0000556919989358 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55691dd4d6a8, put_in_cache=put_in_cache@entry=true)at /test/10.6_dbg/sql/sql_connect.cc:1417
      #10 0x0000556919989658 in handle_one_connection (arg=arg@entry=0x55691dd4d6a8)at /test/10.6_dbg/sql/sql_connect.cc:1319
      #11 0x0000556919dd8644 in pfs_spawn_thread (arg=0x55691dd382a8)at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #12 0x0000146832a97b5a in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:444
      #13 0x0000146832b285fc in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug confirmed present in:
      MariaDB: 10.5.27 (dbg), 10.5.27 (opt), 10.6.20 (dbg), 10.6.20 (opt)

      Bug confirmed not present in:
      MariaDB: 10.11.10 (dbg), 10.11.10 (opt), 11.2.6 (dbg), 11.2.6 (opt), 11.4.4 (dbg), 11.4.4 (opt), 11.5.2 (dbg), 11.5.2 (opt), 11.6.2 (dbg), 11.6.2 (opt)

      Attachments

        Activity

          People

            Elkin Andrei Elkin
            susil.behera Susil Behera
            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.