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

Assertion `client_state.transaction().active()' failed in int wsrep_thd_append_key(THD*, const wsrep_key*, int, Wsrep_service_key_type)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL)
    • N/A
    • Galera
    • None

    Description

      Test case

      GALERA_BASE=/home/ramesh/rpl/mariadb-10.9.6-linux-x86_64_one
      RPL_BASE=/home/ramesh/rpl/mariadb-10.9.6-linux-x86_64_two
      DATADIR=/home/ramesh/rpl
       
      rm -Rf $DATADIR/node* $DATADIR/data
       
      $GALERA_BASE/scripts/mariadb-install-db --no-defaults --force --auth-root-authentication-method=normal  --basedir=$GALERA_BASE --datadir=$DATADIR/node1
      $GALERA_BASE/scripts/mariadb-install-db --no-defaults --force --auth-root-authentication-method=normal  --basedir=$GALERA_BASE --datadir=$DATADIR/node2
      $RPL_BASE/scripts/mariadb-install-db --no-defaults --force --auth-root-authentication-method=normal  --basedir=$RPL_BASE --datadir=$DATADIR/data
       
       
      $GALERA_BASE/bin/mysqld --defaults-file=$DATADIR/n1.cnf --wsrep-new-cluster > $DATADIR/node1/node1.err 2>&1 & 
      sleep 5
      $GALERA_BASE/bin/mysqladmin  -uroot -S$DATADIR/node1/mysql.sock ping
       
      $GALERA_BASE/bin/mysqld --defaults-file=$DATADIR/n2.cnf > $DATADIR/node2/node2.err 2>&1 &
       
      $RPL_BASE/bin/mysqld --defaults-file=$DATADIR/master.cnf  > $DATADIR/data/mysql.err 2>&1 & 
      sleep 2
      $RPL_BASE/bin/mysql -uroot --socket=/home/ramesh/rpl/data/socket.sock
       
      set sql_log_bin=0;
      delete from mysql.user where user='';
      flush privileges;
      set sql_log_bin=1;
      create user repl@'%' identified by 'repl';
      grant all on *.* to  repl@'%';
      flush privileges;
      \q
       
      Setup Async replication on galera node1
       
      $GALERA_BASE/bin/mysql -uroot -S$DATADIR/node1/mysql.sock
      CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=4070, MASTER_USER='repl', MASTER_PASSWORD='repl', MASTER_USE_GTID=slave_pos; START SLAVE; 
      SHOW SLAVE STATUS \G
      \q
       
      Shutdown async slave galera node1
       
      $GALERA_BASE/bin/mysqladmin -uroot --socket=$DATADIR/node1/mysql.sock shutdown
       
      run sysbench load on master server
       
      sysbench /usr/share/sysbench/oltp_insert.lua --mysql-db=test --mysql-user=root  --db-driver=mysql --mysql-socket=/home/ramesh/rpl/data/socket.sock --threads=10 --tables=10 --table-size=10000  prepare
       
      sysbench /usr/share/sysbench/oltp_read_write.lua --mysql-db=test --mysql-user=root  --db-driver=mysql --mysql-socket=/home/ramesh/rpl/data/socket.sock --threads=10 --tables=10 --table-size=10000 --time=3000 run & 
       
      start async slave galera node1
       
      $GALERA_BASE/bin/mysqld --defaults-file=$DATADIR/n1.cnf &
       
      check galera node1 startup log
      
      

      Leads to

      10.9.6 0d55914d968fcc557d4429a37c61fbdedd9352a6

      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055a4a7e8e31c in my_write_core (sig=sig@entry=6) at /test/10.9_dbg/mysys/stacktrace.c:424
      #2  0x000055a4a776b6cd in handle_fatal_signal (sig=6) at /test/10.9_dbg/sql/signal_handler.cc:357
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x00001481d6768859 in __GI_abort () at abort.c:79
      #6  0x00001481d6768729 in __assert_fail_base (fmt=0x1481d68fe588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55a4a8244df8 "client_state.transaction().active()", 
          file=0x55a4a8244aa8 "/test/10.9_dbg/sql/service_wsrep.cc", line=309, function=<optimized out>) at assert.c:92
      #7  0x00001481d6779fd6 in __GI___assert_fail (assertion=assertion@entry=0x55a4a8244df8 "client_state.transaction().active()", file=file@entry=0x55a4a8244aa8 "/test/10.9_dbg/sql/service_wsrep.cc", 
          line=line@entry=309, function=function@entry=0x55a4a8244e20 "int wsrep_thd_append_key(THD*, const wsrep_key*, int, Wsrep_service_key_type)") at assert.c:101
      #8  0x000055a4a7a43709 in wsrep_thd_append_key (thd=thd@entry=0x14813c000f88, key=key@entry=0x148163f1b560, n_keys=n_keys@entry=1, key_type=key_type@entry=WSREP_SERVICE_KEY_UPDATE)
          at /test/10.9_dbg/wsrep-lib/include/wsrep/transaction_id.hpp:52
      #9  0x000055a4a7a576bd in wsrep_append_key (thd=thd@entry=0x14813c000f88, trx=trx@entry=0x1481c62a8880, table_share=0x1481ac024c80, key=key@entry=0x148163f1b620 "", key_len=5, 
          key_type=key_type@entry=WSREP_SERVICE_KEY_UPDATE) at /test/10.9_dbg/storage/innobase/handler/ha_innodb.cc:10113
      #10 0x000055a4a7a629a3 in ha_innobase::wsrep_append_keys (this=this@entry=0x1481582a0530, thd=0x14813c000f88, key_type=WSREP_SERVICE_KEY_UPDATE, record0=record0@entry=0x1481582a01d8 "\377?\023", 
          record1=record1@entry=0x1481582a0118 "\377?\023") at /test/10.9_dbg/storage/innobase/handler/ha_innodb.cc:10287
      #11 0x000055a4a7a78369 in ha_innobase::update_row (this=0x1481582a0530, old_row=0x1481582a01d8 "\377?\023", new_row=0x1481582a0118 "\377?\023") at /test/10.9_dbg/storage/innobase/handler/ha_innodb.cc:8660
      #12 0x000055a4a777c035 in handler::ha_update_row (this=0x1481582a0530, old_data=0x1481582a01d8 "\377?\023", new_data=0x1481582a0118 "\377?\023") at /test/10.9_dbg/sql/handler.cc:7676
      #13 0x000055a4a78fe687 in Update_rows_log_event::do_exec_row (this=0x1481a81313c8, rgi=<optimized out>) at /test/10.9_dbg/sql/log_event_server.cc:8782
      #14 0x000055a4a78eeec0 in Rows_log_event::do_apply_event (this=0x1481a81313c8, rgi=0x1481a9569180) at /test/10.9_dbg/sql/log_event_server.cc:6073
      #15 0x000055a4a78e6688 in Log_event::apply_event (this=this@entry=0x1481a81313c8, rgi=rgi@entry=0x1481a9569180) at /test/10.9_dbg/sql/log_event.cc:4176
      #16 0x000055a4a73af60a in apply_event_and_update_pos_apply (ev=ev@entry=0x1481a81313c8, thd=thd@entry=0x14813c000f88, rgi=rgi@entry=0x1481a9569180, reason=reason@entry=0) at /test/10.9_dbg/sql/slave.cc:3883
      #17 0x000055a4a73b9934 in apply_event_and_update_pos_for_parallel (ev=ev@entry=0x1481a81313c8, thd=thd@entry=0x14813c000f88, rgi=rgi@entry=0x1481a9569180) at /test/10.9_dbg/sql/slave.cc:4080
      #18 0x000055a4a7670b32 in rpt_handle_event (qev=qev@entry=0x1481a8df6fd8, rpt=rpt@entry=0x1481a800fa70) at /test/10.9_dbg/sql/rpl_parallel.cc:61
      #19 0x000055a4a767316d in retry_event_group (rgi=rgi@entry=0x1481a9569180, rpt=rpt@entry=0x1481a800fa70, orig_qev=orig_qev@entry=0x1481a956d008) at /test/10.9_dbg/sql/rpl_parallel.cc:1035
      #20 0x000055a4a7675737 in handle_rpl_parallel_thread (arg=<optimized out>) at /test/10.9_dbg/sql/rpl_parallel.cc:1423
      #21 0x00001481d6c79609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #22 0x00001481d6865133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        Issue Links

          Activity

            People

              janlindstrom Jan Lindström
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.