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

SIGSEGV in dict_table_t::is_active_ddl during XA ... INSERT IGNORE

    XMLWordPrintable

Details

    Description

      Testcase (highly sporadic):

      CREATE TABLE t (a1 VARCHAR(1), a2 VARCHAR(1)) ENGINE=InnoDB;
      XA START 'a';
      CREATE TEMPORARY TABLE t (c1 INT) ENGINE=InnoDB;
      INSERT INTO t VALUES (1),(2),(3),(4),(5),(6),(7);
      INSERT IGNORE INTO t VALUES (@inserted_value);
      XA END 'a';
      XA ROLLBACK 'a';
      SET SESSION gtid_domain_id=10;
      

      Leads to:

      10.6.18 0ccdf54b644352f42e1768bc660be7ab50c1e9d2 (Debug, Slave)

      Core was generated by `/test/MD240424-mariadb-10.6.18-linux-x86_64-dbg/bin/mariadbd --no-defaults --ba'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x0000560f75725785 in dict_table_t::is_active_ddl (this=<optimized out>)at /test/10.6_dbg/storage/innobase/include/dict0mem.h:2433
      [Current thread is 1 (LWP 103187)]
      (gdb) bt
      #0  0x0000560f75725785 in dict_table_t::is_active_ddl (this=<optimized out>)at /test/10.6_dbg/storage/innobase/include/dict0mem.h:2433
      #1  trx_t::rollback_low (this=this@entry=0x14972d2e5c80, savept=savept@entry=0x14972d2e65c0)at /test/10.6_dbg/storage/innobase/trx/trx0roll.cc:152
      #2  0x0000560f757233ee in trx_t::rollback (this=this@entry=0x14972d2e5c80, savept=savept@entry=0x14972d2e65c0)at /test/10.6_dbg/storage/innobase/trx/trx0roll.cc:176
      #3  0x0000560f7572353f in trx_rollback_last_sql_stat_for_mysql (trx=trx@entry=0x14972d2e5c80)at /test/10.6_dbg/storage/innobase/trx/trx0roll.cc:307
      #4  0x0000560f7551b4b8 in innobase_rollback (hton=<optimized out>, thd=0x1496b0000d58, rollback_trx=<optimized out>)at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:4702
      #5  0x0000560f7519ae67 in ha_rollback_trans (thd=thd@entry=0x1496b0000d58, all=all@entry=false) at /test/10.6_dbg/sql/handler.cc:2264
      #6  0x0000560f75041ea1 in trans_rollback_stmt (thd=thd@entry=0x1496b0000d58)at /test/10.6_dbg/sql/transaction.cc:566
      #7  0x0000560f74edffbc in mysql_execute_command (thd=thd@entry=0x1496b0000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false)at /test/10.6_dbg/sql/sql_parse.cc:6176
      #8  0x0000560f74ee10b4 in mysql_parse (thd=0x1496b0000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1496fb9b08b0)at /test/10.6_dbg/sql/sql_parse.cc:8146
      #9  0x0000560f75305fe2 in Query_log_event::do_apply_event (this=0x1496d4031f28, rgi=0x1496d402ed30, query_arg=0x1496d4032093 "INSERT IGNORE INTO t1 VALUES (@inserted_value)", q_len_arg=<optimized out>) at /test/10.6_dbg/sql/sql_class.h:240
      #10 0x0000560f7530691e in Query_log_event::do_apply_event (this=<optimized out>, rgi=<optimized out>)at /test/10.6_dbg/sql/log_event_server.cc:1609
      #11 0x0000560f74e024e5 in Log_event::apply_event (rgi=0x1496d402ed30, this=0x1496d4031f28) at /test/10.6_dbg/sql/log_event.h:1509
      #12 apply_event_and_update_pos_apply (ev=ev@entry=0x1496d4031f28, thd=thd@entry=0x1496b0000d58, rgi=rgi@entry=0x1496d402ed30, reason=reason@entry=0) at /test/10.6_dbg/sql/slave.cc:3906
      #13 0x0000560f74e0c72c in apply_event_and_update_pos_for_parallel (ev=ev@entry=0x1496d4031f28, thd=thd@entry=0x1496b0000d58, rgi=rgi@entry=0x1496d402ed30) at /test/10.6_dbg/sql/slave.cc:4102
      #14 0x0000560f750ac508 in rpt_handle_event (qev=qev@entry=0x1496d4032148, rpt=rpt@entry=0x1496d400f0b8) at /test/10.6_dbg/sql/rpl_parallel.cc:64
      #15 0x0000560f750b102b in handle_rpl_parallel_thread (arg=arg@entry=0x1496d400f0b8) at /test/10.6_dbg/sql/rpl_parallel.cc:1525
      #16 0x0000560f75476f78 in pfs_spawn_thread (arg=0x1496d40127a8)at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #17 0x0000149730c8f18a in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:444
      #18 0x0000149730d1dbd0 in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      It looks like a parallel slave setup is required to reproduce the issue.

      NTS: ~/MDEV-34051 | sc3266128

      Attachments

        Issue Links

          Activity

            People

              bnestere Brandon Nesterenko
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.