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

Assertion `thd->wsrep_trx().active()' failed virtual int Wsrep_applier_service::apply_write_set(const wsrep::ws_meta&, const wsrep::const_buffer&, wsrep::mutable_buffer&)

    XMLWordPrintable

Details

    Description

      Testcase

      Start 3 node cluster
       
      connection node1;
       
      CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 BLOB) ENGINE=InnoDB;
      SET SESSION wsrep_on=OFF;
      INSERT INTO t1 VALUES (1, 'X');
      SET SESSION wsrep_on=ON;
       
      connection node_3;
       
      SET AUTOCOMMIT=OFF;
      SET SESSION wsrep_trx_fragment_size = 131070;
      START TRANSACTION;
      INSERT INTO t1 VALUES (1, REPEAT('A', 65535));
      INSERT INTO t1 VALUES (2, REPEAT('A', 65535));
      INSERT INTO t1 VALUES (3, REPEAT('A', 65535));
      INSERT INTO t1 VALUES (4, REPEAT('A', 65535));
      INSERT INTO t1 VALUES (5, REPEAT('A', 65535));
      COMMIT;
       
      connection node1;
       
      DELETE FROM t1 WHERE f1 = 2;  # Sometimes we need to run DELETE statement multiple times to get the crash.
      

      10.6.0-0 3402184ce3d235788455c30a2d2dae3c32d15af9 (Debug)

      mysqld: /test/10.6_dbg/sql/wsrep_high_priority_service.cc:542: virtual int Wsrep_applier_service::apply_write_set(const wsrep::ws_meta&, const wsrep::const_buffer&, wsrep::mutable_buffer&): Assertion `thd->wsrep_trx().active()' failed.
      

      10.6.0-0 3402184ce3d235788455c30a2d2dae3c32d15af9 (Debug)

      Core was generated by `/test/GAL_EMD150321-mariadb-10.6.0-0-linux-x86_64-dbg/bin/mysqld --defaults-fil'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055b79cbdd2cd in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x000055b79c37e124 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:331
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x000014c205ac9859 in __GI_abort () at abort.c:79
      #6  0x000014c205ac9729 in __assert_fail_base (fmt=0x14c205c5f588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
          assertion=0x55b79cf7d7f0 "thd->wsrep_trx().active()", file=0x55b79cf7ccf8 "/test/10.6_dbg/sql/wsrep_high_priority_service.cc", line=536,
          function=<optimized out>) at assert.c:92
      #7  0x000014c205adaf36 in __GI___assert_fail (assertion=assertion@entry=0x55b79cf7d7f0 "thd->wsrep_trx().active()",
          file=file@entry=0x55b79cf7ccf8 "/test/10.6_dbg/sql/wsrep_high_priority_service.cc", line=line@entry=536,
          function=function@entry=0x55b79cf7cf30 "virtual int Wsrep_applier_service::apply_write_set(const wsrep::ws_meta&, const wsrep::const_buffer&, wsrep::mutable_buffer&)") at assert.c:101
      #8  0x000055b79c72accd in Wsrep_applier_service::apply_write_set (this=0x14c1e003ad10, ws_meta=..., data=..., err=...)
          at /test/10.6_dbg/wsrep-lib/include/wsrep/transaction_id.hpp:52
      #9  0x000055b79ccfbec4 in apply_fragment (server_state=..., high_priority_service=...,
          streaming_applier=streaming_applier@entry=0x14c1e003ad10, ws_handle=..., ws_meta=..., data=...)
          at /test/10.6_dbg/wsrep-lib/src/server_state.cpp:98
      #10 0x000055b79cd03eee in apply_write_set (server_state=..., high_priority_service=..., ws_handle=..., ws_meta=..., data=...)
          at /test/10.6_dbg/wsrep-lib/src/server_state.cpp:384
      #11 0x000055b79cd04c37 in wsrep::server_state::on_apply (this=<optimized out>, high_priority_service=..., ws_handle=..., ws_meta=...,
          data=...) at /test/10.6_dbg/wsrep-lib/src/server_state.cpp:1136
      #12 0x000055b79cd1231a in wsrep::high_priority_service::apply (data=..., ws_meta=..., ws_handle=..., this=0x14c1f4650d10)
          at /test/10.6_dbg/wsrep-lib/include/wsrep/high_priority_service.hpp:47
      #13 (anonymous namespace)::apply_cb (ctx=ctx@entry=0x14c1f4650d10, wsh=wsh@entry=0x14c1f464fdb0, flags=flags@entry=0,
          buf=buf@entry=0x14c1f464fdc0, meta=meta@entry=0x14c1f4650070, exit_loop=exit_loop@entry=0x14c1f465002f)
          at /test/10.6_dbg/wsrep-lib/src/wsrep_provider_v26.cpp:502
      #14 0x000014c205344b05 in galera::TrxHandleSlave::apply (this=this@entry=0x14c198037e60, recv_ctx=recv_ctx@entry=0x14c1f4650d10,
          apply_cb=0x55b79cd12197 <(anonymous namespace)::apply_cb(void*, wsrep_ws_handle_t const*, uint32_t, wsrep_buf_t const*, wsrep_trx_meta_t const*, wsrep_bool_t*)>, meta=..., exit_loop=exit_loop@entry=@0x14c1f465002f: false) at /test/10.6_galera_dbg/galera/src/trx_handle.cpp:391
      #15 0x000014c2053547e2 in galera::ReplicatorSMM::apply_trx (this=0x55b79e407380, recv_ctx=0x14c1f4650d10, ts=...)
          at /test/10.6_galera_dbg/galera/src/replicator_smm.cpp:504
      #16 0x000014c20535c6b8 in galera::ReplicatorSMM::process_trx (this=0x55b79e407380, recv_ctx=0x14c1f4650d10, ts_ptr=...)
          at /test/10.6_galera_dbg/galera/src/replicator_smm.cpp:2127
      #17 0x000014c20538cfc3 in galera::GcsActionSource::process_writeset (this=0x55b79e436a50, recv_ctx=0x14c1f4650d10, act=...,
          exit_loop=@0x14c1f465091f: false) at /test/10.6_galera_dbg/galera/src/gcs_action_source.cpp:62
      #18 0x000014c20538d99b in galera::GcsActionSource::dispatch (this=<optimized out>, recv_ctx=<optimized out>, act=...,
          exit_loop=<optimized out>) at /test/10.6_galera_dbg/galera/src/gcs_action_source.cpp:110
      #19 0x000014c20538dba2 in galera::GcsActionSource::process (this=0x55b79e436a50, recv_ctx=0x14c1f4650d10, exit_loop=@0x14c1f465091f: false)
          at /test/10.6_galera_dbg/galera/src/gcs_action_source.cpp:183
      #20 0x000014c205359760 in galera::ReplicatorSMM::async_recv (this=0x55b79e407380, recv_ctx=0x14c1f4650d10)
          at /test/10.6_galera_dbg/galera/src/replicator_smm.cpp:390
      #21 0x000014c20532ffb1 in galera_recv (gh=<optimized out>, recv_ctx=<optimized out>)
          at /test/10.6_galera_dbg/galera/src/wsrep_provider.cpp:236
      #22 0x000055b79cd1277c in wsrep::wsrep_provider_v26::run_applier (this=<optimized out>, applier_ctx=<optimized out>)
          at /test/10.6_dbg/wsrep-lib/src/wsrep_provider_v26.cpp:743
      #23 0x000055b79c7486e9 in wsrep_replication_process (thd=0x14c198000ff8, arg=<optimized out>) at /test/10.6_dbg/sql/wsrep_server_state.h:51
      #24 0x000055b79c736d22 in start_wsrep_THD (arg=arg@entry=0x55b79e455f60) at /test/10.6_dbg/sql/wsrep_mysqld.h:579
      #25 0x000055b79c6c2c01 in pfs_spawn_thread (arg=0x55b79ea17c88) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #26 0x000014c205fd7609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      --Type <RET> for more, q to quit, c to continue without paging--
      #27 0x000014c205bc6293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        Issue Links

          Activity

            People

              sciascid Daniele Sciascia
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.