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

Assertion `!(thd->rgi_slave && !thd->rgi_slave->worker_error && thd->rgi_slave->did_mark_start_commit) || (thd->transaction->xid_state.is_explicit_XA() || (thd->rgi_slave->gtid_ev_flags2 & Gtid_log_event::FL_PREPARED_XA))' failed

    XMLWordPrintable

Details

    Description

      Replay using CLI

      CREATE TEMPORARY TABLE t (a INT PRIMARY KEY) ENGINE=MEMORY;
      ALTER TABLE mysql.gtid_slave_pos ENGINE=MEMORY;
      ALTER TABLE mysql.gtid_slave_pos CHANGE seq_no seq_no VARCHAR(1);
      INSERT INTO t VALUES (1);
      

      Leads to replica server crash

      11.5.0 8f0c9340537b84fcd7012d4a31e6f858e7eb919c (Debug)

      mariadbd: /test/server_dbg/sql/handler.cc:2231: int ha_rollback_trans(THD*, bool): Assertion `!(thd->rgi_slave && !thd->rgi_slave->worker_error && thd->rgi_slave->did_mark_start_commit) || (thd->transaction->xid_state.is_explicit_XA() || (thd->rgi_slave->gtid_ev_flags2 & Gtid_log_event::FL_PREPARED_XA))' failed.
      

      11.5.0 8f0c9340537b84fcd7012d4a31e6f858e7eb919c (Debug)

      Core was generated by `/test/MD200324-mariadb-11.5.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --gti'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x1486b7db3700 (LWP 3158972))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x00001486f0b82859 in __GI_abort () at abort.c:79
      #2  0x00001486f0b82729 in __assert_fail_base (fmt=0x1486f0d18588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x56445b9c09f8 "!(thd->rgi_slave && !thd->rgi_slave->worker_error && thd->rgi_slave->did_mark_start_commit) || (thd->transaction->xid_state.is_explicit_XA() || (thd->rgi_slave->gtid_ev_flags2 & Gtid_log_event::FL_PRE"..., file=0x56445b9c00c0 "/test/server_dbg/sql/handler.cc", line=2231, function=<optimized out>) at assert.c:92
      #3  0x00001486f0b93fd6 in __GI___assert_fail (assertion=assertion@entry=0x56445b9c09f8 "!(thd->rgi_slave && !thd->rgi_slave->worker_error && thd->rgi_slave->did_mark_start_commit) || (thd->transaction->xid_state.is_explicit_XA() || (thd->rgi_slave->gtid_ev_flags2 & Gtid_log_event::FL_PRE"..., file=file@entry=0x56445b9c00c0 "/test/server_dbg/sql/handler.cc", line=line@entry=2231, function=function@entry=0x56445b9c0980 "int ha_rollback_trans(THD*, bool)") at assert.c:101
      #4  0x000056445ae78f03 in ha_rollback_trans (thd=thd@entry=0x148670000f88, all=all@entry=false) at /test/server_dbg/sql/xa.h:35
      #5  0x000056445ad5d46c in rpl_slave_state::record_gtid (this=<optimized out>, thd=0x148670000f88, gtid=gtid@entry=0x1486b7db2750, sub_id=sub_id@entry=7, in_transaction=in_transaction@entry=true, in_statement=in_statement@entry=false, out_hton=0x1486b7db2738) at /test/server_dbg/sql/rpl_gtid.cc:774
      #6  0x000056445b016f24 in Query_log_event::do_apply_event (this=<optimized out>, rgi=0x148694027210, query_arg=0x14869402dd23 "COMMIT", q_len_arg=6) at /test/server_dbg/sql/log_event_server.cc:1995
      #7  0x000056445b01812b in Query_log_event::do_apply_event (this=<optimized out>, rgi=<optimized out>) at /test/server_dbg/sql/log_event_server.cc:1504
      #8  0x000056445b0081f5 in Log_event::apply_event (this=this@entry=0x14869402dbc8, rgi=rgi@entry=0x148694027210) at /test/server_dbg/sql/log_event.cc:3928
      #9  0x000056445aa4647e in apply_event_and_update_pos_apply (ev=ev@entry=0x14869402dbc8, thd=thd@entry=0x148670000f88, rgi=rgi@entry=0x148694027210, reason=reason@entry=0) at /test/server_dbg/sql/slave.cc:3921
      #10 0x000056445aa507bf in apply_event_and_update_pos_for_parallel (ev=ev@entry=0x14869402dbc8, thd=thd@entry=0x148670000f88, rgi=rgi@entry=0x148694027210) at /test/server_dbg/sql/slave.cc:4128
      #11 0x000056445ad68d5e in rpt_handle_event (qev=qev@entry=0x148694026db8, rpt=rpt@entry=0x148694010208) at /test/server_dbg/sql/rpl_parallel.cc:64
      #12 0x000056445ad6db8f in handle_rpl_parallel_thread (arg=arg@entry=0x148694010208) at /test/server_dbg/sql/rpl_parallel.cc:1539
      #13 0x000056445b148c58 in pfs_spawn_thread (arg=0x148694012fb8) at /test/server_dbg/storage/perfschema/pfs.cc:2201
      #14 0x00001486f1093609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #15 0x00001486f0c7f133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.33 (dbg), 10.5.25 (dbg), 10.6.18 (dbg), 10.11.8 (dbg), 11.0.6 (dbg), 11.1.4 (dbg), 11.2.4 (dbg), 11.3.2 (dbg), 11.4.2 (dbg), 11.5.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.4.33 (opt), 10.4.34 (opt), 10.5.25 (opt), 10.6.18 (opt), 10.11.8 (opt), 11.0.6 (opt), 11.1.4 (opt), 11.2.4 (opt), 11.3.2 (opt), 11.4.2 (opt), 11.5.0 (opt)

      Attachments

        Activity

          People

            Elkin Andrei Elkin
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.