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

Assertion `wsrep_thd_is_applying(thd) && !wsrep_thd_is_local_toi(thd)' failed in int wsrep_ignored_error_code(Log_event*, int)

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL)
    • N/A
    • Galera

    Description

      Test case

      /dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg/scripts/mariadb-install-db --no-defaults --force  --auth-root-authentication-method=normal  --basedir=/dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg --datadir=/dev/shm/qa/node1 > /dev/shm/qa/log/startup1.log 2>&1
      /dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg/scripts/mariadb-install-db --no-defaults --force  --auth-root-authentication-method=normal  --basedir=/dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg --datadir=/dev/shm/qa/node2 > /dev/shm/qa/log/startup2.log 2>&1
      /dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg/scripts/mariadb-install-db --no-defaults --force  --auth-root-authentication-method=normal  --basedir=/dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg --datadir=/dev/shm/qa/node3 > /dev/shm/qa/log/startup3.log 2>&1
       
       
      /dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg/bin/mysqld --defaults-file=/dev/shm/qa/conf/node1.cnf --slave-parallel-workers=5 --wsrep-new-cluster > /dev/shm/qa/node1/node1.err 2>&1 &
      /dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg/bin/mysql --user=root --socket=/dev/shm/qa/node1/mysql.sock -Bse"SET SESSION sql_log_bin=0;delete from mysql.user where user='';" > /dev/null 2>&1
      sleep 5
      /dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg/bin/mysqld --defaults-file=/dev/shm/qa/conf/node2.cnf --slave-parallel-workers=5 > /dev/shm/qa/node2/node2.err 2>&1 &
      sleep 20
      /dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg/bin/mysqld --defaults-file=/dev/shm/qa/conf/node3.cnf --slave-parallel-workers=5 > /dev/shm/qa/node3/node3.err 2>&1 &
       
      /dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg/scripts/mariadb-install-db --no-defaults --force  --auth-root-authentication-method=normal --basedir=/dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg --datadir=/dev/shm/qa/mdnode1 > /dev/shm/qa/log/md_startup1.log 2>&1
       
      /dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg/bin/mysqld --defaults-file=/dev/shm/qa/conf/md1.cnf --datadir=/dev/shm/qa/mdnode1 --basedir=/dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg --slave-parallel-workers=5 --log-error=/dev/shm/qa/log/mdnode1.err > /dev/shm/qa/log/mdnode1.err 2>&1 &
      /dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg/bin/mysql --user=root --socket=/tmp/mdnode1.sock -Bse"SET SESSION sql_log_bin=0;delete from mysql.user where user='';SET SESSION sql_log_bin=1;drop database if exists test; create database test;" > /dev/null 2>&1
       
      /dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg/bin/mysql --user=root --socket=/tmp/mdnode1.sock -Bse "flush logs" 2>&1
      /dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg/bin/mysql --user=root --socket=/tmp/mdnode1.sock -Bse 'show master logs' | awk '{print $1}' | tail -1 2>&1
      /dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg/bin/mysql --user=root --socket=/tmp/mdnode1.sock -Bse 'show master logs' | awk '{print $2}' | tail -1 2>&1
      /dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg/bin/mysql --user=root --socket=/tmp/mdnode1.sock -Bse "select @@port" 2>&1
      /dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg/bin/mysql --user=root --socket=/dev/shm/qa/node1/mysql.sock -Bse"CHANGE MASTER  TO MASTER_HOST='127.0.0.1', MASTER_PORT=3600, MASTER_USER='root', MASTER_LOG_FILE='binlog.000002', MASTER_LOG_POS=365 ;START SLAVE ;" 2>&1
       
      /dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg/bin/mysql --user=root --socket=/tmp/mdnode1.sock < prepared_statements.sql > /dev/null 2>&1
      

      Leads to

      10.9.0 8680eedb2650ba017305cf8db26c96d056196375 (Debug)

      mysqld: /test/mtest/10.9_dbg/sql/wsrep_mysqld.cc:3364: int wsrep_ignored_error_code(Log_event*, int): Assertion `wsrep_thd_is_applying(thd) && !wsrep_thd_is_local_toi(thd)' failed.
      

      10.9.0 8680eedb2650ba017305cf8db26c96d056196375 (Debug)

      Core was generated by `/dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg/bin/mysqld --defau'.
      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
      [Current thread is 1 (Thread 0x1485bc10c700 (LWP 1859798))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000560f868d3fb7 in my_write_core (sig=sig@entry=6) at /test/mtest/10.9_dbg/mysys/stacktrace.c:424
      #2  0x0000560f860b46f5 in handle_fatal_signal (sig=6) at /test/mtest/10.9_dbg/sql/signal_handler.cc:345
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x00001485fdbfe859 in __GI_abort () at abort.c:79
      #6  0x00001485fdbfe729 in __assert_fail_base (fmt=0x1485fdd94588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x560f86ce7060 "wsrep_thd_is_applying(thd) && !wsrep_thd_is_local_toi(thd)", file=0x560f86ce6198 "/test/mtest/10.9_dbg/sql/wsrep_mysqld.cc", line=3364, function=<optimized out>) at assert.c:92
      #7  0x00001485fdc0ff36 in __GI___assert_fail (assertion=assertion@entry=0x560f86ce7060 "wsrep_thd_is_applying(thd) && !wsrep_thd_is_local_toi(thd)", file=file@entry=0x560f86ce6198 "/test/mtest/10.9_dbg/sql/wsrep_mysqld.cc", line=line@entry=3364, function=function@entry=0x560f86ce7030 "int wsrep_ignored_error_code(Log_event*, int)") at assert.c:101
      #8  0x0000560f8642148c in wsrep_ignored_error_code (ev=ev@entry=0x14856c109d28, error=error@entry=1927) at /test/mtest/10.9_dbg/sql/wsrep_mysqld.cc:3364
      #9  0x0000560f8624d429 in Rows_log_event::do_apply_event (this=0x14856c109d28, rgi=0x14856c143cc0) at /test/mtest/10.9_dbg/include/my_bitmap.h:106
      #10 0x0000560f85caa45d in Log_event::apply_event (rgi=0x14856c143cc0, this=0x14856c109d28) at /test/mtest/10.9_dbg/sql/log_event.h:1566
      #11 apply_event_and_update_pos_apply (ev=ev@entry=0x14856c109d28, thd=thd@entry=0x14857c000ff8, rgi=rgi@entry=0x14856c143cc0, reason=reason@entry=0) at /test/mtest/10.9_dbg/sql/slave.cc:3881
      #12 0x0000560f85cb54aa in apply_event_and_update_pos_for_parallel (ev=ev@entry=0x14856c109d28, thd=thd@entry=0x14857c000ff8, rgi=rgi@entry=0x14856c143cc0) at /test/mtest/10.9_dbg/sql/slave.cc:4078
      #13 0x0000560f85fb24cb in rpt_handle_event (qev=qev@entry=0x14856c1454e8, rpt=rpt@entry=0x14856c00d650) at /test/mtest/10.9_dbg/sql/rpl_parallel.cc:62
      #14 0x0000560f85fb838b in handle_rpl_parallel_thread (arg=arg@entry=0x14856c00d650) at /test/mtest/10.9_dbg/sql/rpl_parallel.cc:1409
      #15 0x0000560f863b254f in pfs_spawn_thread (arg=0x14856c00f248) at /test/mtest/10.9_dbg/storage/perfschema/pfs.cc:2201
      #16 0x00001485fe10d609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #17 0x00001485fdcfb293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        1. md1.cnf
          0.3 kB
          Ramesh Sivaraman
        2. node1.cnf
          1.0 kB
          Ramesh Sivaraman
        3. node2.cnf
          1.0 kB
          Ramesh Sivaraman
        4. node3.cnf
          0.9 kB
          Ramesh Sivaraman
        5. prepared_statements.sql
          6 kB
          Ramesh Sivaraman
        6. transactions-alter.yy
          5 kB
          Ramesh Sivaraman
        7. transactions-alter.zz
          1 kB
          Ramesh Sivaraman

        Issue Links

          Activity

            jplindst Sometimes the server crashes with different assertion when using the test case above

            10.9.0 8680eedb2650ba017305cf8db26c96d056196375 (Debug)

            mysqld: /test/mtest/10.9_dbg/sql/service_wsrep.cc:308: int wsrep_thd_append_key(THD*, const wsrep_key*, int, Wsrep_service_key_type): Assertion `client_state.transaction().active()' failed.
            

            10.9.0 8680eedb2650ba017305cf8db26c96d056196375 (Debug)

            Core was generated by `/dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg/bin/mysqld --defau'.
            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
            [Current thread is 1 (Thread 0x1519301e6700 (LWP 1863121))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            #1  0x0000562f9f7c4fb7 in my_write_core (sig=sig@entry=6) at /test/mtest/10.9_dbg/mysys/stacktrace.c:424
            #2  0x0000562f9efa56f5 in handle_fatal_signal (sig=6) at /test/mtest/10.9_dbg/sql/signal_handler.cc:345
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #5  0x0000151972aca859 in __GI_abort () at abort.c:79
            #6  0x0000151972aca729 in __assert_fail_base (fmt=0x151972c60588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x562f9fbddb28 "client_state.transaction().active()", file=0x562f9fbdd7c0 "/test/mtest/10.9_dbg/sql/service_wsrep.cc", line=308, function=<optimized out>) at assert.c:92
            #7  0x0000151972adbf36 in __GI___assert_fail (assertion=assertion@entry=0x562f9fbddb28 "client_state.transaction().active()", file=file@entry=0x562f9fbdd7c0 "/test/mtest/10.9_dbg/sql/service_wsrep.cc", line=line@entry=308, function=function@entry=0x562f9fbddb50 "int wsrep_thd_append_key(THD*, const wsrep_key*, int, Wsrep_service_key_type)") at assert.c:101
            #8  0x0000562f9f32d6e5 in wsrep_thd_append_key (thd=thd@entry=0x151904000ff8, key=key@entry=0x1519301e3080, n_keys=n_keys@entry=1, key_type=key_type@entry=WSREP_SERVICE_KEY_UPDATE) at /test/mtest/10.9_dbg/wsrep-lib/include/wsrep/transaction_id.hpp:52
            #9  0x0000562f9f3424dd in wsrep_append_key (thd=thd@entry=0x151904000ff8, trx=trx@entry=0x1519703a5c00, table_share=0x1518fc0e29e0, key=key@entry=0x1519301e3180 "", key_len=5, key_type=key_type@entry=WSREP_SERVICE_KEY_UPDATE) at /test/mtest/10.9_dbg/storage/innobase/handler/ha_innodb.cc:10054
            #10 0x0000562f9f351966 in ha_innobase::wsrep_append_keys (this=this@entry=0x15190817a200, thd=0x151904000ff8, key_type=WSREP_SERVICE_KEY_UPDATE, record0=record0@entry=0x1519080ec768 "\376\006", record1=record1@entry=0x1519080ec728 "\376\006") at /test/mtest/10.9_dbg/storage/innobase/handler/ha_innodb.cc:10228
            #11 0x0000562f9f35bc89 in ha_innobase::update_row (this=0x15190817a200, old_row=0x1519080ec768 "\376\006", new_row=0x1519080ec728 "\376\006") at /test/mtest/10.9_dbg/storage/innobase/handler/ha_innodb.cc:8627
            #12 0x0000562f9efba811 in handler::ha_update_row (this=0x15190817a200, old_data=0x1519080ec768 "\376\006", new_data=0x1519080ec728 "\376\006") at /test/mtest/10.9_dbg/sql/handler.cc:7580
            #13 0x0000562f9f150aaa in Update_rows_log_event::do_exec_row (this=0x1518e804e318, rgi=<optimized out>) at /test/mtest/10.9_dbg/sql/log_event_server.cc:8776
            #14 0x0000562f9f13e80f in Rows_log_event::do_apply_event (this=0x1518e804e318, rgi=0x1518e82bfa30) at /test/mtest/10.9_dbg/sql/log_event_server.cc:6067
            #15 0x0000562f9eb9b45d in Log_event::apply_event (rgi=0x1518e82bfa30, this=0x1518e804e318) at /test/mtest/10.9_dbg/sql/log_event.h:1566
            #16 apply_event_and_update_pos_apply (ev=ev@entry=0x1518e804e318, thd=thd@entry=0x151904000ff8, rgi=rgi@entry=0x1518e82bfa30, reason=reason@entry=0) at /test/mtest/10.9_dbg/sql/slave.cc:3881
            #17 0x0000562f9eba64aa in apply_event_and_update_pos_for_parallel (ev=ev@entry=0x1518e804e318, thd=thd@entry=0x151904000ff8, rgi=rgi@entry=0x1518e82bfa30) at /test/mtest/10.9_dbg/sql/slave.cc:4078
            #18 0x0000562f9eea34cb in rpt_handle_event (qev=qev@entry=0x1518e82a11c8, rpt=rpt@entry=0x1518e800d180) at /test/mtest/10.9_dbg/sql/rpl_parallel.cc:62
            #19 0x0000562f9eea69d4 in retry_event_group (rgi=rgi@entry=0x1518e82bfa30, rpt=rpt@entry=0x1518e800d180, orig_qev=orig_qev@entry=0x1518e8364918) at /test/mtest/10.9_dbg/sql/rpl_parallel.cc:1032
            #20 0x0000562f9eea97e8 in handle_rpl_parallel_thread (arg=arg@entry=0x1518e800d180) at /test/mtest/10.9_dbg/sql/rpl_parallel.cc:1418
            #21 0x0000562f9f2a354f in pfs_spawn_thread (arg=0x1518e800ed78) at /test/mtest/10.9_dbg/storage/perfschema/pfs.cc:2201
            #22 0x0000151972fd9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #23 0x0000151972bc7293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            ramesh Ramesh Sivaraman added a comment - jplindst Sometimes the server crashes with different assertion when using the test case above 10.9.0 8680eedb2650ba017305cf8db26c96d056196375 (Debug) mysqld: /test/mtest/10.9_dbg/sql/service_wsrep.cc:308: int wsrep_thd_append_key(THD*, const wsrep_key*, int, Wsrep_service_key_type): Assertion `client_state.transaction().active()' failed. 10.9.0 8680eedb2650ba017305cf8db26c96d056196375 (Debug) Core was generated by `/dev/shm/qa/GAL_MD300322-mariadb-10.9.0-linux-x86_64-new-dbg/bin/mysqld --defau'. 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 [Current thread is 1 (Thread 0x1519301e6700 (LWP 1863121))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 #1 0x0000562f9f7c4fb7 in my_write_core (sig=sig@entry=6) at /test/mtest/10.9_dbg/mysys/stacktrace.c:424 #2 0x0000562f9efa56f5 in handle_fatal_signal (sig=6) at /test/mtest/10.9_dbg/sql/signal_handler.cc:345 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #5 0x0000151972aca859 in __GI_abort () at abort.c:79 #6 0x0000151972aca729 in __assert_fail_base (fmt=0x151972c60588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x562f9fbddb28 "client_state.transaction().active()", file=0x562f9fbdd7c0 "/test/mtest/10.9_dbg/sql/service_wsrep.cc", line=308, function=<optimized out>) at assert.c:92 #7 0x0000151972adbf36 in __GI___assert_fail (assertion=assertion@entry=0x562f9fbddb28 "client_state.transaction().active()", file=file@entry=0x562f9fbdd7c0 "/test/mtest/10.9_dbg/sql/service_wsrep.cc", line=line@entry=308, function=function@entry=0x562f9fbddb50 "int wsrep_thd_append_key(THD*, const wsrep_key*, int, Wsrep_service_key_type)") at assert.c:101 #8 0x0000562f9f32d6e5 in wsrep_thd_append_key (thd=thd@entry=0x151904000ff8, key=key@entry=0x1519301e3080, n_keys=n_keys@entry=1, key_type=key_type@entry=WSREP_SERVICE_KEY_UPDATE) at /test/mtest/10.9_dbg/wsrep-lib/include/wsrep/transaction_id.hpp:52 #9 0x0000562f9f3424dd in wsrep_append_key (thd=thd@entry=0x151904000ff8, trx=trx@entry=0x1519703a5c00, table_share=0x1518fc0e29e0, key=key@entry=0x1519301e3180 "", key_len=5, key_type=key_type@entry=WSREP_SERVICE_KEY_UPDATE) at /test/mtest/10.9_dbg/storage/innobase/handler/ha_innodb.cc:10054 #10 0x0000562f9f351966 in ha_innobase::wsrep_append_keys (this=this@entry=0x15190817a200, thd=0x151904000ff8, key_type=WSREP_SERVICE_KEY_UPDATE, record0=record0@entry=0x1519080ec768 "\376\006", record1=record1@entry=0x1519080ec728 "\376\006") at /test/mtest/10.9_dbg/storage/innobase/handler/ha_innodb.cc:10228 #11 0x0000562f9f35bc89 in ha_innobase::update_row (this=0x15190817a200, old_row=0x1519080ec768 "\376\006", new_row=0x1519080ec728 "\376\006") at /test/mtest/10.9_dbg/storage/innobase/handler/ha_innodb.cc:8627 #12 0x0000562f9efba811 in handler::ha_update_row (this=0x15190817a200, old_data=0x1519080ec768 "\376\006", new_data=0x1519080ec728 "\376\006") at /test/mtest/10.9_dbg/sql/handler.cc:7580 #13 0x0000562f9f150aaa in Update_rows_log_event::do_exec_row (this=0x1518e804e318, rgi=<optimized out>) at /test/mtest/10.9_dbg/sql/log_event_server.cc:8776 #14 0x0000562f9f13e80f in Rows_log_event::do_apply_event (this=0x1518e804e318, rgi=0x1518e82bfa30) at /test/mtest/10.9_dbg/sql/log_event_server.cc:6067 #15 0x0000562f9eb9b45d in Log_event::apply_event (rgi=0x1518e82bfa30, this=0x1518e804e318) at /test/mtest/10.9_dbg/sql/log_event.h:1566 #16 apply_event_and_update_pos_apply (ev=ev@entry=0x1518e804e318, thd=thd@entry=0x151904000ff8, rgi=rgi@entry=0x1518e82bfa30, reason=reason@entry=0) at /test/mtest/10.9_dbg/sql/slave.cc:3881 #17 0x0000562f9eba64aa in apply_event_and_update_pos_for_parallel (ev=ev@entry=0x1518e804e318, thd=thd@entry=0x151904000ff8, rgi=rgi@entry=0x1518e82bfa30) at /test/mtest/10.9_dbg/sql/slave.cc:4078 #18 0x0000562f9eea34cb in rpt_handle_event (qev=qev@entry=0x1518e82a11c8, rpt=rpt@entry=0x1518e800d180) at /test/mtest/10.9_dbg/sql/rpl_parallel.cc:62 #19 0x0000562f9eea69d4 in retry_event_group (rgi=rgi@entry=0x1518e82bfa30, rpt=rpt@entry=0x1518e800d180, orig_qev=orig_qev@entry=0x1518e8364918) at /test/mtest/10.9_dbg/sql/rpl_parallel.cc:1032 #20 0x0000562f9eea97e8 in handle_rpl_parallel_thread (arg=arg@entry=0x1518e800d180) at /test/mtest/10.9_dbg/sql/rpl_parallel.cc:1418 #21 0x0000562f9f2a354f in pfs_spawn_thread (arg=0x1518e800ed78) at /test/mtest/10.9_dbg/storage/perfschema/pfs.cc:2201 #22 0x0000151972fd9609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #23 0x0000151972bc7293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

            Another test case to reproduce the similar crash.

            SET GLOBAL log_output='TABLE';
            SET SESSION sql_mode='no_auto_value_on_zero';
            SET SESSION enforce_storage_engine=InnoDB;
            ALTER TABLE mysql.general_log ENGINE=MyISAM;
            SET GLOBAL general_log=1;
            SELECT 1;
            

            Leads to

            10.10.0 d7a7d16713070c7c2902c3df4b4f6d024cd0320f (Debug)

            mysqld: /test/mtest/10.10_dbg/sql/service_wsrep.cc:308: int wsrep_thd_append_key(THD*, const wsrep_key*, int, Wsrep_service_key_type): Assertion `client_state.transaction().active()' failed.
            

            10.10.0 d7a7d16713070c7c2902c3df4b4f6d024cd0320f (Debug)

            Core was generated by `/test/mtest/GAL_MD080622-mariadb-10.10.0-linux-x86_64-dbg/bin/mysqld --defaults'.
            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
            [Current thread is 1 (Thread 0x14d4e80c1700 (LWP 1002673))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            #1  0x000055e7405016eb in my_write_core (sig=sig@entry=6) at /test/mtest/10.10_dbg/mysys/stacktrace.c:424
            #2  0x000055e73fda72c7 in handle_fatal_signal (sig=6) at /test/mtest/10.10_dbg/sql/signal_handler.cc:345
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #5  0x000014d51e0b5859 in __GI_abort () at abort.c:79
            #6  0x000014d51e0b5729 in __assert_fail_base (fmt=0x14d51e24b588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55e7408c7e98 "client_state.transaction().active()", file=0x55e7408c7b30 "/test/mtest/10.10_dbg/sql/service_wsrep.cc", line=308, function=<optimized out>) at assert.c:92
            #7  0x000014d51e0c6f36 in __GI___assert_fail (assertion=assertion@entry=0x55e7408c7e98 "client_state.transaction().active()", file=file@entry=0x55e7408c7b30 "/test/mtest/10.10_dbg/sql/service_wsrep.cc", line=line@entry=308, function=function@entry=0x55e7408c7ec0 "int wsrep_thd_append_key(THD*, const wsrep_key*, int, Wsrep_service_key_type)") at assert.c:101
            #8  0x000055e74009a084 in wsrep_thd_append_key (thd=thd@entry=0x14d4a8000db8, key=key@entry=0x14d4e80bd970, n_keys=n_keys@entry=1, key_type=key_type@entry=WSREP_SERVICE_KEY_EXCLUSIVE) at /test/mtest/10.10_dbg/wsrep-lib/include/wsrep/transaction_id.hpp:52
            #9  0x000055e7400aba09 in wsrep_append_key (thd=thd@entry=0x14d4a8000db8, trx=trx@entry=0x14d51c344680, table_share=0x14d4a804e440, key=key@entry=0x14d4e80be7e0 "\024\300_ynʃ8\342D\334`F\361\377c\300\352\v\350\324\024", key_len=key_len@entry=16, key_type=key_type@entry=WSREP_SERVICE_KEY_EXCLUSIVE) at /test/mtest/10.10_dbg/storage/innobase/handler/ha_innodb.cc:10074
            #10 0x000055e7400b9bd9 in ha_innobase::wsrep_append_keys (this=this@entry=0x14d4a802aa30, thd=0x14d4a8000db8, key_type=key_type@entry=WSREP_SERVICE_KEY_EXCLUSIVE, record0=record0@entry=0x14d4a802a5b0 "b\241uU\b\034\347\031", record1=record1@entry=0x0) at /test/mtest/10.10_dbg/storage/innobase/handler/ha_innodb.cc:10275
            #11 0x000055e7400d1525 in ha_innobase::write_row (this=0x14d4a802aa30, record=0x14d4a802a5b0 "b\241uU\b\034\347\031") at /test/mtest/10.10_dbg/storage/innobase/handler/ha_innodb.cc:7977
            #12 0x000055e73fdb8d17 in handler::ha_write_row (this=0x14d4a802aa30, buf=0x14d4a802a5b0 "b\241uU\b\034\347\031") at /test/mtest/10.10_dbg/sql/handler.cc:7620
            #13 0x000055e73ff04fd2 in Log_to_csv_event_handler::log_general (this=<optimized out>, thd=0x14d4a8000db8, event_time=<optimized out>, user_host=0x14d4e80c0130 "root[root] @ localhost []", user_host_len=25, thread_id_arg=12, command_type=0x55e7406b725d "Query", command_type_len=5, sql_text=0x14d4a8013c40 "select 1", sql_text_len=8, client_cs=0x55e740f92b60 <my_charset_utf8mb3_general_ci>) at /test/mtest/10.10_dbg/sql/log.cc:936
            #14 0x000055e73ff079c9 in LOGGER::general_log_write (this=this@entry=0x55e740fd5bc0 <logger>, thd=thd@entry=0x14d4a8000db8, command=command@entry=COM_QUERY, query=query@entry=0x14d4a8013c40 "select 1", query_length=query_length@entry=8) at /test/mtest/10.10_dbg/sql/log.cc:1526
            #15 0x000055e73ff07baa in general_log_write (thd=thd@entry=0x14d4a8000db8, command=command@entry=COM_QUERY, query=0x14d4a8013c40 "select 1", query_length=8) at /test/mtest/10.10_dbg/sql/log.cc:7197
            #16 0x000055e73fac0b9c in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14d4a8000db8, packet=packet@entry=0x14d4a800b6e9 "select 1", packet_length=packet_length@entry=8, blocking=blocking@entry=true) at /test/mtest/10.10_dbg/sql/sql_class.h:1365
            #17 0x000055e73fac33d1 in do_command (thd=0x14d4a8000db8, blocking=blocking@entry=true) at /test/mtest/10.10_dbg/sql/sql_parse.cc:1407
            #18 0x000055e73fc25433 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55e7423243f8, put_in_cache=put_in_cache@entry=true) at /test/mtest/10.10_dbg/sql/sql_connect.cc:1418
            #19 0x000055e73fc2593f in handle_one_connection (arg=0x55e7423243f8) at /test/mtest/10.10_dbg/sql/sql_connect.cc:1312
            #20 0x000014d51e5c4609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #21 0x000014d51e1b2293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            ramesh Ramesh Sivaraman added a comment - Another test case to reproduce the similar crash. SET GLOBAL log_output= 'TABLE' ; SET SESSION sql_mode= 'no_auto_value_on_zero' ; SET SESSION enforce_storage_engine=InnoDB; ALTER TABLE mysql.general_log ENGINE=MyISAM; SET GLOBAL general_log=1; SELECT 1; Leads to 10.10.0 d7a7d16713070c7c2902c3df4b4f6d024cd0320f (Debug) mysqld: /test/mtest/10.10_dbg/sql/service_wsrep.cc:308: int wsrep_thd_append_key(THD*, const wsrep_key*, int, Wsrep_service_key_type): Assertion `client_state.transaction().active()' failed. 10.10.0 d7a7d16713070c7c2902c3df4b4f6d024cd0320f (Debug) Core was generated by `/test/mtest/GAL_MD080622-mariadb-10.10.0-linux-x86_64-dbg/bin/mysqld --defaults'. 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 [Current thread is 1 (Thread 0x14d4e80c1700 (LWP 1002673))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 #1 0x000055e7405016eb in my_write_core (sig=sig@entry=6) at /test/mtest/10.10_dbg/mysys/stacktrace.c:424 #2 0x000055e73fda72c7 in handle_fatal_signal (sig=6) at /test/mtest/10.10_dbg/sql/signal_handler.cc:345 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #5 0x000014d51e0b5859 in __GI_abort () at abort.c:79 #6 0x000014d51e0b5729 in __assert_fail_base (fmt=0x14d51e24b588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55e7408c7e98 "client_state.transaction().active()", file=0x55e7408c7b30 "/test/mtest/10.10_dbg/sql/service_wsrep.cc", line=308, function=<optimized out>) at assert.c:92 #7 0x000014d51e0c6f36 in __GI___assert_fail (assertion=assertion@entry=0x55e7408c7e98 "client_state.transaction().active()", file=file@entry=0x55e7408c7b30 "/test/mtest/10.10_dbg/sql/service_wsrep.cc", line=line@entry=308, function=function@entry=0x55e7408c7ec0 "int wsrep_thd_append_key(THD*, const wsrep_key*, int, Wsrep_service_key_type)") at assert.c:101 #8 0x000055e74009a084 in wsrep_thd_append_key (thd=thd@entry=0x14d4a8000db8, key=key@entry=0x14d4e80bd970, n_keys=n_keys@entry=1, key_type=key_type@entry=WSREP_SERVICE_KEY_EXCLUSIVE) at /test/mtest/10.10_dbg/wsrep-lib/include/wsrep/transaction_id.hpp:52 #9 0x000055e7400aba09 in wsrep_append_key (thd=thd@entry=0x14d4a8000db8, trx=trx@entry=0x14d51c344680, table_share=0x14d4a804e440, key=key@entry=0x14d4e80be7e0 "\024\300_ynʃ8\342D\334`F\361\377c\300\352\v\350\324\024", key_len=key_len@entry=16, key_type=key_type@entry=WSREP_SERVICE_KEY_EXCLUSIVE) at /test/mtest/10.10_dbg/storage/innobase/handler/ha_innodb.cc:10074 #10 0x000055e7400b9bd9 in ha_innobase::wsrep_append_keys (this=this@entry=0x14d4a802aa30, thd=0x14d4a8000db8, key_type=key_type@entry=WSREP_SERVICE_KEY_EXCLUSIVE, record0=record0@entry=0x14d4a802a5b0 "b\241uU\b\034\347\031", record1=record1@entry=0x0) at /test/mtest/10.10_dbg/storage/innobase/handler/ha_innodb.cc:10275 #11 0x000055e7400d1525 in ha_innobase::write_row (this=0x14d4a802aa30, record=0x14d4a802a5b0 "b\241uU\b\034\347\031") at /test/mtest/10.10_dbg/storage/innobase/handler/ha_innodb.cc:7977 #12 0x000055e73fdb8d17 in handler::ha_write_row (this=0x14d4a802aa30, buf=0x14d4a802a5b0 "b\241uU\b\034\347\031") at /test/mtest/10.10_dbg/sql/handler.cc:7620 #13 0x000055e73ff04fd2 in Log_to_csv_event_handler::log_general (this=<optimized out>, thd=0x14d4a8000db8, event_time=<optimized out>, user_host=0x14d4e80c0130 "root[root] @ localhost []", user_host_len=25, thread_id_arg=12, command_type=0x55e7406b725d "Query", command_type_len=5, sql_text=0x14d4a8013c40 "select 1", sql_text_len=8, client_cs=0x55e740f92b60 <my_charset_utf8mb3_general_ci>) at /test/mtest/10.10_dbg/sql/log.cc:936 #14 0x000055e73ff079c9 in LOGGER::general_log_write (this=this@entry=0x55e740fd5bc0 <logger>, thd=thd@entry=0x14d4a8000db8, command=command@entry=COM_QUERY, query=query@entry=0x14d4a8013c40 "select 1", query_length=query_length@entry=8) at /test/mtest/10.10_dbg/sql/log.cc:1526 #15 0x000055e73ff07baa in general_log_write (thd=thd@entry=0x14d4a8000db8, command=command@entry=COM_QUERY, query=0x14d4a8013c40 "select 1", query_length=8) at /test/mtest/10.10_dbg/sql/log.cc:7197 #16 0x000055e73fac0b9c in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14d4a8000db8, packet=packet@entry=0x14d4a800b6e9 "select 1", packet_length=packet_length@entry=8, blocking=blocking@entry=true) at /test/mtest/10.10_dbg/sql/sql_class.h:1365 #17 0x000055e73fac33d1 in do_command (thd=0x14d4a8000db8, blocking=blocking@entry=true) at /test/mtest/10.10_dbg/sql/sql_parse.cc:1407 #18 0x000055e73fc25433 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55e7423243f8, put_in_cache=put_in_cache@entry=true) at /test/mtest/10.10_dbg/sql/sql_connect.cc:1418 #19 0x000055e73fc2593f in handle_one_connection (arg=0x55e7423243f8) at /test/mtest/10.10_dbg/sql/sql_connect.cc:1312 #20 0x000014d51e5c4609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #21 0x000014d51e1b2293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

            jplindst Similar crash was found in the RQG run. Crashing SQL ALTER TABLE .... Could you please check whether this crash is related to MDEV-16329?

            RQG test case

            perl gendata.pl --dsn=dbi:mysql:host=127.0.0.1:port=12620:socket=/test/mtest/GAL_MD130622-mariadb-10.10.0-linux-x86_64-dbg/node1/node1_socket.sock:user=root:database=test --spec=conf/mariadb/oltp.zz
            perl gentest.pl --dsn=dbi:mysql:host=127.0.0.1:port=12620:socket=/test/mtest/GAL_MD130622-mariadb-10.10.0-linux-x86_64-dbg/node1/node1_socket.sock:user=root:database=test --grammar=conf/mariadb/oltp_and_ddl.yy --threads=32 --duration=30000 --queries=1000000000 &
            

            Leads to

            10.10.0 d7a7d16713070c7c2902c3df4b4f6d024cd0320f (Debug)

            mysqld: /test/mtest/10.10_dbg/sql/wsrep_mysqld.cc:3364: int wsrep_ignored_error_code(Log_event*, int): Assertion `wsrep_thd_is_applying(thd) && !wsrep_thd_is_local_toi(thd)' failed.
            

            10.10.0 d7a7d16713070c7c2902c3df4b4f6d024cd0320f (Debug)

            Core was generated by `/test/mtest/GAL_MD130622-mariadb-10.10.0-linux-x86_64-dbg/bin/mysqld --defaults'.
            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
            [Current thread is 1 (Thread 0x145d5e104700 (LWP 93466))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            #1  0x00005644dde3c735 in my_write_core (sig=sig@entry=6) at /test/mtest/10.10_dbg/mysys/stacktrace.c:424
            #2  0x00005644dd6e22f3 in handle_fatal_signal (sig=6) at /test/mtest/10.10_dbg/sql/signal_handler.cc:345
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #5  0x0000145dacf83859 in __GI_abort () at abort.c:79
            #6  0x0000145dacf83729 in __assert_fail_base (fmt=0x145dad119588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5644de1fd650 "wsrep_thd_is_applying(thd) && !wsrep_thd_is_local_toi(thd)", file=0x5644de1fc750 "/test/mtest/10.10_dbg/sql/wsrep_mysqld.cc", line=3364, function=<optimized out>) at assert.c:92
            #7  0x0000145dacf95006 in __GI___assert_fail (assertion=assertion@entry=0x5644de1fd650 "wsrep_thd_is_applying(thd) && !wsrep_thd_is_local_toi(thd)", file=file@entry=0x5644de1fc750 "/test/mtest/10.10_dbg/sql/wsrep_mysqld.cc", line=line@entry=3364, function=function@entry=0x5644de1fd620 "int wsrep_ignored_error_code(Log_event*, int)") at assert.c:101
            #8  0x00005644dd9bb5ff in wsrep_ignored_error_code (ev=ev@entry=0x145d38081818, error=error@entry=1062) at /test/mtest/10.10_dbg/sql/wsrep_mysqld.cc:3364
            #9  0x00005644dd86aa10 in Rows_log_event::do_apply_event (this=0x145d38081818, rgi=<optimized out>) at /test/mtest/10.10_dbg/include/my_bitmap.h:106
            #10 0x00005644dd861f84 in Log_event::apply_event (this=this@entry=0x145d38081818, rgi=rgi@entry=0x145d5e0fc180) at /test/mtest/10.10_dbg/sql/log_event.cc:4152
            #11 0x00005644dd4c517a in online_alter_read_from_binlog (thd=thd@entry=0x145d38002098, rgi=rgi@entry=0x145d5e0fc180, log=log@entry=0x145d3805a920) at /test/mtest/10.10_dbg/sql/sql_table.cc:11440
            #12 0x00005644dd4ddefe in copy_data_between_tables (thd=thd@entry=0x145d38002098, from=from@entry=0x145cec01f818, to=to@entry=0x145d380537f8, create=@0x145d5e1023e0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x145d380160f8, last = 0x145d38016610, elements = 4}, <No data fields>}, ignore=ignore@entry=false, order_num=order_num@entry=0, order=0x0, copied=0x145d5e100088, deleted=0x145d5e100090, keys_onoff=Alter_info::LEAVE_AS_IS, alter_ctx=0x145d5e101690, online=<optimized out>) at /test/mtest/10.10_dbg/sql/sql_table.cc:11868
            #13 0x00005644dd4e39a2 in mysql_alter_table (thd=thd@entry=0x145d38002098, new_db=new_db@entry=0x145d38006b58, new_name=new_name@entry=0x145d38006f68, create_info=create_info@entry=0x145d5e102470, table_list=<optimized out>, table_list@entry=0x145d380151b8, alter_info=alter_info@entry=0x145d5e102380, order_num=0, order=0x0, ignore=false, if_exists=false) at /test/mtest/10.10_dbg/sql/sql_table.cc:10897
            #14 0x00005644dd5677b0 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x145d38002098) at /test/mtest/10.10_dbg/sql/structs.h:569
            #15 0x00005644dd406051 in mysql_execute_command (thd=thd@entry=0x145d38002098, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/mtest/10.10_dbg/sql/sql_parse.cc:5996
            #16 0x00005644dd3ee60d in mysql_parse (thd=thd@entry=0x145d38002098, rawbuf=rawbuf@entry=0x145d38015070 "ALTER TABLE `oltp10` PARTITION BY KEY(`id`) /* QNO 45 CON_ID 18 */", length=length@entry=66, parser_state=parser_state@entry=0x145d5e103470) at /test/mtest/10.10_dbg/sql/sql_parse.cc:8036
            #17 0x00005644dd3ee016 in wsrep_mysql_parse (thd=thd@entry=0x145d38002098, rawbuf=0x145d38015070 "ALTER TABLE `oltp10` PARTITION BY KEY(`id`) /* QNO 45 CON_ID 18 */", length=66, parser_state=parser_state@entry=0x145d5e103470) at /test/mtest/10.10_dbg/sql/sql_parse.cc:7849
            #18 0x00005644dd3fbce0 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x145d38002098, packet=packet@entry=0x145d3800c9c9 "ALTER TABLE `oltp10` PARTITION BY KEY(`id`) /* QNO 45 CON_ID 18 */ ", packet_length=packet_length@entry=67, blocking=blocking@entry=true) at /test/mtest/10.10_dbg/sql/sql_class.h:1365
            #19 0x00005644dd3fe3d9 in do_command (thd=0x145d38002098, blocking=blocking@entry=true) at /test/mtest/10.10_dbg/sql/sql_parse.cc:1407
            #20 0x00005644dd56045b in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5644e0857778, put_in_cache=put_in_cache@entry=true) at /test/mtest/10.10_dbg/sql/sql_connect.cc:1418
            #21 0x00005644dd560967 in handle_one_connection (arg=0x5644e0857778) at /test/mtest/10.10_dbg/sql/sql_connect.cc:1312
            #22 0x0000145dad494609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #23 0x0000145dad080163 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            ramesh Ramesh Sivaraman added a comment - jplindst Similar crash was found in the RQG run. Crashing SQL ALTER TABLE ... . Could you please check whether this crash is related to MDEV-16329 ? RQG test case perl gendata.pl --dsn=dbi:mysql:host=127.0.0.1:port=12620:socket=/test/mtest/GAL_MD130622-mariadb-10.10.0-linux-x86_64-dbg/node1/node1_socket.sock:user=root:database=test --spec=conf/mariadb/oltp.zz perl gentest.pl --dsn=dbi:mysql:host=127.0.0.1:port=12620:socket=/test/mtest/GAL_MD130622-mariadb-10.10.0-linux-x86_64-dbg/node1/node1_socket.sock:user=root:database=test --grammar=conf/mariadb/oltp_and_ddl.yy --threads=32 --duration=30000 --queries=1000000000 & Leads to 10.10.0 d7a7d16713070c7c2902c3df4b4f6d024cd0320f (Debug) mysqld: /test/mtest/10.10_dbg/sql/wsrep_mysqld.cc:3364: int wsrep_ignored_error_code(Log_event*, int): Assertion `wsrep_thd_is_applying(thd) && !wsrep_thd_is_local_toi(thd)' failed. 10.10.0 d7a7d16713070c7c2902c3df4b4f6d024cd0320f (Debug) Core was generated by `/test/mtest/GAL_MD130622-mariadb-10.10.0-linux-x86_64-dbg/bin/mysqld --defaults'. 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 [Current thread is 1 (Thread 0x145d5e104700 (LWP 93466))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 #1 0x00005644dde3c735 in my_write_core (sig=sig@entry=6) at /test/mtest/10.10_dbg/mysys/stacktrace.c:424 #2 0x00005644dd6e22f3 in handle_fatal_signal (sig=6) at /test/mtest/10.10_dbg/sql/signal_handler.cc:345 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #5 0x0000145dacf83859 in __GI_abort () at abort.c:79 #6 0x0000145dacf83729 in __assert_fail_base (fmt=0x145dad119588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5644de1fd650 "wsrep_thd_is_applying(thd) && !wsrep_thd_is_local_toi(thd)", file=0x5644de1fc750 "/test/mtest/10.10_dbg/sql/wsrep_mysqld.cc", line=3364, function=<optimized out>) at assert.c:92 #7 0x0000145dacf95006 in __GI___assert_fail (assertion=assertion@entry=0x5644de1fd650 "wsrep_thd_is_applying(thd) && !wsrep_thd_is_local_toi(thd)", file=file@entry=0x5644de1fc750 "/test/mtest/10.10_dbg/sql/wsrep_mysqld.cc", line=line@entry=3364, function=function@entry=0x5644de1fd620 "int wsrep_ignored_error_code(Log_event*, int)") at assert.c:101 #8 0x00005644dd9bb5ff in wsrep_ignored_error_code (ev=ev@entry=0x145d38081818, error=error@entry=1062) at /test/mtest/10.10_dbg/sql/wsrep_mysqld.cc:3364 #9 0x00005644dd86aa10 in Rows_log_event::do_apply_event (this=0x145d38081818, rgi=<optimized out>) at /test/mtest/10.10_dbg/include/my_bitmap.h:106 #10 0x00005644dd861f84 in Log_event::apply_event (this=this@entry=0x145d38081818, rgi=rgi@entry=0x145d5e0fc180) at /test/mtest/10.10_dbg/sql/log_event.cc:4152 #11 0x00005644dd4c517a in online_alter_read_from_binlog (thd=thd@entry=0x145d38002098, rgi=rgi@entry=0x145d5e0fc180, log=log@entry=0x145d3805a920) at /test/mtest/10.10_dbg/sql/sql_table.cc:11440 #12 0x00005644dd4ddefe in copy_data_between_tables (thd=thd@entry=0x145d38002098, from=from@entry=0x145cec01f818, to=to@entry=0x145d380537f8, create=@0x145d5e1023e0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x145d380160f8, last = 0x145d38016610, elements = 4}, <No data fields>}, ignore=ignore@entry=false, order_num=order_num@entry=0, order=0x0, copied=0x145d5e100088, deleted=0x145d5e100090, keys_onoff=Alter_info::LEAVE_AS_IS, alter_ctx=0x145d5e101690, online=<optimized out>) at /test/mtest/10.10_dbg/sql/sql_table.cc:11868 #13 0x00005644dd4e39a2 in mysql_alter_table (thd=thd@entry=0x145d38002098, new_db=new_db@entry=0x145d38006b58, new_name=new_name@entry=0x145d38006f68, create_info=create_info@entry=0x145d5e102470, table_list=<optimized out>, table_list@entry=0x145d380151b8, alter_info=alter_info@entry=0x145d5e102380, order_num=0, order=0x0, ignore=false, if_exists=false) at /test/mtest/10.10_dbg/sql/sql_table.cc:10897 #14 0x00005644dd5677b0 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x145d38002098) at /test/mtest/10.10_dbg/sql/structs.h:569 #15 0x00005644dd406051 in mysql_execute_command (thd=thd@entry=0x145d38002098, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/mtest/10.10_dbg/sql/sql_parse.cc:5996 #16 0x00005644dd3ee60d in mysql_parse (thd=thd@entry=0x145d38002098, rawbuf=rawbuf@entry=0x145d38015070 "ALTER TABLE `oltp10` PARTITION BY KEY(`id`) /* QNO 45 CON_ID 18 */", length=length@entry=66, parser_state=parser_state@entry=0x145d5e103470) at /test/mtest/10.10_dbg/sql/sql_parse.cc:8036 #17 0x00005644dd3ee016 in wsrep_mysql_parse (thd=thd@entry=0x145d38002098, rawbuf=0x145d38015070 "ALTER TABLE `oltp10` PARTITION BY KEY(`id`) /* QNO 45 CON_ID 18 */", length=66, parser_state=parser_state@entry=0x145d5e103470) at /test/mtest/10.10_dbg/sql/sql_parse.cc:7849 #18 0x00005644dd3fbce0 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x145d38002098, packet=packet@entry=0x145d3800c9c9 "ALTER TABLE `oltp10` PARTITION BY KEY(`id`) /* QNO 45 CON_ID 18 */ ", packet_length=packet_length@entry=67, blocking=blocking@entry=true) at /test/mtest/10.10_dbg/sql/sql_class.h:1365 #19 0x00005644dd3fe3d9 in do_command (thd=0x145d38002098, blocking=blocking@entry=true) at /test/mtest/10.10_dbg/sql/sql_parse.cc:1407 #20 0x00005644dd56045b in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5644e0857778, put_in_cache=put_in_cache@entry=true) at /test/mtest/10.10_dbg/sql/sql_connect.cc:1418 #21 0x00005644dd560967 in handle_one_connection (arg=0x5644e0857778) at /test/mtest/10.10_dbg/sql/sql_connect.cc:1312 #22 0x0000145dad494609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #23 0x0000145dad080163 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

            Another reduced test case

            SET GLOBAL wsrep_forced_binlog_format=STATEMENT;
            CREATE TABLE t (a INT UNIQUE) REPLACE SELECT 1 AS a,2 AS b UNION SELECT 1 AS a,3 AS c;
            

            10.6.12 (Debug)

            mysqld: /test/10.6_dbg/sql/service_wsrep.cc:308: int wsrep_thd_append_key(THD*, const wsrep_key*, int, Wsrep_service_key_type): Assertion `client_state.transaction().active()' failed.
            

            10.6.12 (Debug)

            Core was generated by `/test/GAL_MD170123-mariadb-10.6.12-linux-x86_64-dbg/bin/mysqld --defaults-file='.
            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
            [Current thread is 1 (Thread 0x152144d53700 (LWP 453489))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            #1  0x000055b9c4f549bb in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
            #2  0x000055b9c4807eaf in handle_fatal_signal (sig=6) at /test/10.6_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  0x000015217adb3859 in __GI_abort () at abort.c:79
            #6  0x000015217adb3729 in __assert_fail_base (fmt=0x15217af49588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55b9c52f0810 "client_state.transaction().active()", file=0x55b9c52f04c8 "/test/10.6_dbg/sql/service_wsrep.cc", line=308, function=<optimized out>) at assert.c:92
            #7  0x000015217adc4fd6 in __GI___assert_fail (assertion=assertion@entry=0x55b9c52f0810 "client_state.transaction().active()", file=file@entry=0x55b9c52f04c8 "/test/10.6_dbg/sql/service_wsrep.cc", line=line@entry=308, function=function@entry=0x55b9c52f0838 "int wsrep_thd_append_key(THD*, const wsrep_key*, int, Wsrep_service_key_type)") at assert.c:101
            #8  0x000055b9c4b09a5a in wsrep_thd_append_key (thd=thd@entry=0x152104000d48, key=key@entry=0x152144d4f540, n_keys=n_keys@entry=1, key_type=key_type@entry=WSREP_SERVICE_KEY_UPDATE) at /test/10.6_dbg/wsrep-lib/include/wsrep/transaction_id.hpp:52
            #9  0x000055b9c4b1adce in wsrep_append_key (thd=thd@entry=0x152104000d48, trx=trx@entry=0x152179001680, table_share=<optimized out>, key=key@entry=0x152144d4f5e0 "", key_len=<optimized out>, key_type=key_type@entry=WSREP_SERVICE_KEY_UPDATE) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:10175
            #10 0x000055b9c4b28a79 in ha_innobase::wsrep_append_keys (this=this@entry=0x152104091a10, thd=0x152104000d48, key_type=WSREP_SERVICE_KEY_UPDATE, record0=record0@entry=0x15210408f488 "\245\001", record1=record1@entry=0x15210408f478 "\375\001") at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:10349
            #11 0x000055b9c4b3db7f in ha_innobase::update_row (this=0x152104091a10, old_row=0x15210408f488 "\245\001", new_row=0x15210408f478 "\375\001") at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:8724
            #12 0x000055b9c48186b9 in handler::ha_update_row (this=0x152104091a10, old_data=0x15210408f488 "\245\001", new_data=0x15210408f478 "\375\001") at /test/10.6_dbg/sql/handler.cc:7642
            #13 0x000055b9c450b76a in write_record (thd=0x152104000d48, table=0x152104026b38, info=info@entry=0x1521040156c8, sink=0x0) at /test/10.6_dbg/sql/sql_insert.cc:2073
            #14 0x000055b9c450b8d3 in select_insert::send_data (this=0x152104015678, values=<optimized out>) at /test/10.6_dbg/sql/sql_insert.cc:4117
            #15 0x000055b9c45ae9ff in select_result_sink::send_data_with_check (sent=<optimized out>, u=<optimized out>, items=@0x1521040056a0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x152104016af0, last = 0x152104016c18, elements = 2}, <No data fields>}, this=<optimized out>) at /test/10.6_dbg/sql/sql_class.h:5701
            #16 end_send (join=0x152104017090, join_tab=0x152104094ec8, end_of_records=<optimized out>) at /test/10.6_dbg/sql/sql_select.cc:22649
            #17 0x000055b9c45814b8 in evaluate_join_record (join=join@entry=0x152104017090, join_tab=join_tab@entry=0x152104094b18, error=error@entry=0) at /test/10.6_dbg/sql/sql_select.cc:21643
            #18 0x000055b9c4596ac3 in sub_select (join=0x152104017090, join_tab=0x152104094b18, end_of_records=false) at /test/10.6_dbg/sql/sql_select.cc:21452
            #19 0x000055b9c45c96c3 in do_select (procedure=<optimized out>, join=0x152104017090) at /test/10.6_dbg/sql/sql_select.cc:20956
            #20 JOIN::exec_inner (this=this@entry=0x152104017090) at /test/10.6_dbg/sql/sql_select.cc:4794
            #21 0x000055b9c45c9bad in JOIN::exec (this=this@entry=0x152104017090) at /test/10.6_dbg/sql/sql_select.cc:4572
            #22 0x000055b9c45c7bbc in mysql_select (thd=0x152104000d48, tables=tables@entry=0x152104004f00, fields=@0x1521040056a0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x152104016af0, last = 0x152104016c18, elements = 2}, <No data fields>}, conds=conds@entry=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2199023255552, result=0x152104015678, unit=0x152104004eb8, select_lex=0x152104014e20) at /test/10.6_dbg/sql/sql_select.cc:5051
            #23 0x000055b9c46307b5 in st_select_lex_unit::exec (this=this@entry=0x152104004eb8) at /test/10.6_dbg/sql/sql_lex.h:967
            #24 0x000055b9c4634156 in mysql_union (thd=thd@entry=0x152104000d48, lex=lex@entry=0x152104004df0, result=result@entry=0x152104015678, unit=unit@entry=0x152104004eb8, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.6_dbg/sql/sql_union.cc:42
            #25 0x000055b9c45c8253 in handle_select (thd=thd@entry=0x152104000d48, lex=lex@entry=0x152104004df0, result=result@entry=0x152104015678, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.6_dbg/sql/sql_select.cc:544
            #26 0x000055b9c4619f9b in Sql_cmd_create_table_like::execute (this=0x152104013118, thd=0x152104000d48) at /test/10.6_dbg/sql/sql_table.cc:11887
            #27 0x000055b9c455a234 in mysql_execute_command (thd=thd@entry=0x152104000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.6_dbg/sql/sql_parse.cc:6000
            #28 0x000055b9c4542962 in mysql_parse (thd=thd@entry=0x152104000d48, rawbuf=rawbuf@entry=0x152104013010 "CREATE TABLE t (a INT UNIQUE) REPLACE SELECT 1 AS a,2 AS b UNION SELECT 1 AS a,3 AS c", length=length@entry=85, parser_state=parser_state@entry=0x152144d52310) at /test/10.6_dbg/sql/sql_parse.cc:8019
            #29 0x000055b9c4542362 in wsrep_mysql_parse (thd=thd@entry=0x152104000d48, rawbuf=0x152104013010 "CREATE TABLE t (a INT UNIQUE) REPLACE SELECT 1 AS a,2 AS b UNION SELECT 1 AS a,3 AS c", length=85, parser_state=parser_state@entry=0x152144d52310) at /test/10.6_dbg/sql/sql_parse.cc:7831
            #30 0x000055b9c45500de in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x152104000d48, packet=packet@entry=0x15210400ac79 "CREATE TABLE t (a INT UNIQUE) REPLACE SELECT 1 AS a,2 AS b UNION SELECT 1 AS a,3 AS c", packet_length=packet_length@entry=85, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1365
            #31 0x000055b9c455250a in do_command (thd=0x152104000d48, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1409
            #32 0x000055b9c46970d8 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55b9c7e6d7a8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1416
            #33 0x000055b9c46975aa in handle_one_connection (arg=0x55b9c7e6d7a8) at /test/10.6_dbg/sql/sql_connect.cc:1318
            #34 0x000015217b2c4609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #35 0x000015217aeb0133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            ramesh Ramesh Sivaraman added a comment - Another reduced test case SET GLOBAL wsrep_forced_binlog_format=STATEMENT; CREATE TABLE t (a INT UNIQUE ) REPLACE SELECT 1 AS a,2 AS b UNION SELECT 1 AS a,3 AS c; 10.6.12 (Debug) mysqld: /test/10.6_dbg/sql/service_wsrep.cc:308: int wsrep_thd_append_key(THD*, const wsrep_key*, int, Wsrep_service_key_type): Assertion `client_state.transaction().active()' failed. 10.6.12 (Debug) Core was generated by `/test/GAL_MD170123-mariadb-10.6.12-linux-x86_64-dbg/bin/mysqld --defaults-file='. 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 [Current thread is 1 (Thread 0x152144d53700 (LWP 453489))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 #1 0x000055b9c4f549bb in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424 #2 0x000055b9c4807eaf in handle_fatal_signal (sig=6) at /test/10.6_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 0x000015217adb3859 in __GI_abort () at abort.c:79 #6 0x000015217adb3729 in __assert_fail_base (fmt=0x15217af49588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55b9c52f0810 "client_state.transaction().active()", file=0x55b9c52f04c8 "/test/10.6_dbg/sql/service_wsrep.cc", line=308, function=<optimized out>) at assert.c:92 #7 0x000015217adc4fd6 in __GI___assert_fail (assertion=assertion@entry=0x55b9c52f0810 "client_state.transaction().active()", file=file@entry=0x55b9c52f04c8 "/test/10.6_dbg/sql/service_wsrep.cc", line=line@entry=308, function=function@entry=0x55b9c52f0838 "int wsrep_thd_append_key(THD*, const wsrep_key*, int, Wsrep_service_key_type)") at assert.c:101 #8 0x000055b9c4b09a5a in wsrep_thd_append_key (thd=thd@entry=0x152104000d48, key=key@entry=0x152144d4f540, n_keys=n_keys@entry=1, key_type=key_type@entry=WSREP_SERVICE_KEY_UPDATE) at /test/10.6_dbg/wsrep-lib/include/wsrep/transaction_id.hpp:52 #9 0x000055b9c4b1adce in wsrep_append_key (thd=thd@entry=0x152104000d48, trx=trx@entry=0x152179001680, table_share=<optimized out>, key=key@entry=0x152144d4f5e0 "", key_len=<optimized out>, key_type=key_type@entry=WSREP_SERVICE_KEY_UPDATE) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:10175 #10 0x000055b9c4b28a79 in ha_innobase::wsrep_append_keys (this=this@entry=0x152104091a10, thd=0x152104000d48, key_type=WSREP_SERVICE_KEY_UPDATE, record0=record0@entry=0x15210408f488 "\245\001", record1=record1@entry=0x15210408f478 "\375\001") at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:10349 #11 0x000055b9c4b3db7f in ha_innobase::update_row (this=0x152104091a10, old_row=0x15210408f488 "\245\001", new_row=0x15210408f478 "\375\001") at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:8724 #12 0x000055b9c48186b9 in handler::ha_update_row (this=0x152104091a10, old_data=0x15210408f488 "\245\001", new_data=0x15210408f478 "\375\001") at /test/10.6_dbg/sql/handler.cc:7642 #13 0x000055b9c450b76a in write_record (thd=0x152104000d48, table=0x152104026b38, info=info@entry=0x1521040156c8, sink=0x0) at /test/10.6_dbg/sql/sql_insert.cc:2073 #14 0x000055b9c450b8d3 in select_insert::send_data (this=0x152104015678, values=<optimized out>) at /test/10.6_dbg/sql/sql_insert.cc:4117 #15 0x000055b9c45ae9ff in select_result_sink::send_data_with_check (sent=<optimized out>, u=<optimized out>, items=@0x1521040056a0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x152104016af0, last = 0x152104016c18, elements = 2}, <No data fields>}, this=<optimized out>) at /test/10.6_dbg/sql/sql_class.h:5701 #16 end_send (join=0x152104017090, join_tab=0x152104094ec8, end_of_records=<optimized out>) at /test/10.6_dbg/sql/sql_select.cc:22649 #17 0x000055b9c45814b8 in evaluate_join_record (join=join@entry=0x152104017090, join_tab=join_tab@entry=0x152104094b18, error=error@entry=0) at /test/10.6_dbg/sql/sql_select.cc:21643 #18 0x000055b9c4596ac3 in sub_select (join=0x152104017090, join_tab=0x152104094b18, end_of_records=false) at /test/10.6_dbg/sql/sql_select.cc:21452 #19 0x000055b9c45c96c3 in do_select (procedure=<optimized out>, join=0x152104017090) at /test/10.6_dbg/sql/sql_select.cc:20956 #20 JOIN::exec_inner (this=this@entry=0x152104017090) at /test/10.6_dbg/sql/sql_select.cc:4794 #21 0x000055b9c45c9bad in JOIN::exec (this=this@entry=0x152104017090) at /test/10.6_dbg/sql/sql_select.cc:4572 #22 0x000055b9c45c7bbc in mysql_select (thd=0x152104000d48, tables=tables@entry=0x152104004f00, fields=@0x1521040056a0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x152104016af0, last = 0x152104016c18, elements = 2}, <No data fields>}, conds=conds@entry=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2199023255552, result=0x152104015678, unit=0x152104004eb8, select_lex=0x152104014e20) at /test/10.6_dbg/sql/sql_select.cc:5051 #23 0x000055b9c46307b5 in st_select_lex_unit::exec (this=this@entry=0x152104004eb8) at /test/10.6_dbg/sql/sql_lex.h:967 #24 0x000055b9c4634156 in mysql_union (thd=thd@entry=0x152104000d48, lex=lex@entry=0x152104004df0, result=result@entry=0x152104015678, unit=unit@entry=0x152104004eb8, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.6_dbg/sql/sql_union.cc:42 #25 0x000055b9c45c8253 in handle_select (thd=thd@entry=0x152104000d48, lex=lex@entry=0x152104004df0, result=result@entry=0x152104015678, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.6_dbg/sql/sql_select.cc:544 #26 0x000055b9c4619f9b in Sql_cmd_create_table_like::execute (this=0x152104013118, thd=0x152104000d48) at /test/10.6_dbg/sql/sql_table.cc:11887 #27 0x000055b9c455a234 in mysql_execute_command (thd=thd@entry=0x152104000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.6_dbg/sql/sql_parse.cc:6000 #28 0x000055b9c4542962 in mysql_parse (thd=thd@entry=0x152104000d48, rawbuf=rawbuf@entry=0x152104013010 "CREATE TABLE t (a INT UNIQUE) REPLACE SELECT 1 AS a,2 AS b UNION SELECT 1 AS a,3 AS c", length=length@entry=85, parser_state=parser_state@entry=0x152144d52310) at /test/10.6_dbg/sql/sql_parse.cc:8019 #29 0x000055b9c4542362 in wsrep_mysql_parse (thd=thd@entry=0x152104000d48, rawbuf=0x152104013010 "CREATE TABLE t (a INT UNIQUE) REPLACE SELECT 1 AS a,2 AS b UNION SELECT 1 AS a,3 AS c", length=85, parser_state=parser_state@entry=0x152144d52310) at /test/10.6_dbg/sql/sql_parse.cc:7831 #30 0x000055b9c45500de in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x152104000d48, packet=packet@entry=0x15210400ac79 "CREATE TABLE t (a INT UNIQUE) REPLACE SELECT 1 AS a,2 AS b UNION SELECT 1 AS a,3 AS c", packet_length=packet_length@entry=85, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1365 #31 0x000055b9c455250a in do_command (thd=0x152104000d48, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1409 #32 0x000055b9c46970d8 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55b9c7e6d7a8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1416 #33 0x000055b9c46975aa in handle_one_connection (arg=0x55b9c7e6d7a8) at /test/10.6_dbg/sql/sql_connect.cc:1318 #34 0x000015217b2c4609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #35 0x000015217aeb0133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

            The issue is reproduced and confirmed.
            However, we've decided to deprecate statement-based replication with Wsrep.
            When using row-based replication, the issue is not reproduced.

            denis.protivensky Denis Protivensky added a comment - The issue is reproduced and confirmed. However, we've decided to deprecate statement-based replication with Wsrep. When using row-based replication, the issue is not reproduced.
            ramesh Ramesh Sivaraman added a comment - - edited

            denis.protivensky The following RQG test case crashes an async replica galera node using ROW-based replication. Can you please check the test case.

            RQG grammar files transactions-alter.zz transactions-alter.yy

            RQG run also crashing the async replica galera node with ROW based replication
             
            DATADIR=/home/ramesh/framework
            BASEDIR=/home/ramesh/framework/mariadb-11.0.1-linux-x86_64-alter
            CONF_DIR=/home/ramesh/framework/conf
             
            ${BASEDIR}/scripts/mariadb-install-db --no-defaults --force  --auth-root-authentication-method=normal  --basedir=${BASEDIR} --datadir=${DATADIR}/node1 > ${DATADIR}/log/startup1.log 2>&1
            ${BASEDIR}/scripts/mariadb-install-db --no-defaults --force  --auth-root-authentication-method=normal  --basedir=${BASEDIR} --datadir=${DATADIR}/node2 > ${DATADIR}/log/startup2.log 2>&1
             
            ${BASEDIR}/bin/mariadbd --defaults-file=${CONF_DIR}/node1.cnf   --slave_parallel_mode=optimistic --wsrep-new-cluster > ${DATADIR}/node1/node1.err 2>&1 &
             
            ${BASEDIR}/bin/mariadb --user=root --socket=${DATADIR}/node1/mysql.sock -Bse"SET SESSION sql_log_bin=0;delete from mysql.user where user='';" > /dev/null 2>&1
             
            sleep 10
             
            ${BASEDIR}/bin/mariadbd --defaults-file=${CONF_DIR}/node2.cnf   --slave_parallel_mode=optimistic > ${DATADIR}/node2/node2.err 2>&1 &
             
            ${BASEDIR}/scripts/mariadb-install-db --no-defaults --force  --auth-root-authentication-method=normal --basedir=${BASEDIR} --datadir=${DATADIR}/mdnode1 > ${DATADIR}/log/md_startup1.log 2>&1
             
             
            ${BASEDIR}/bin/mariadbd --defaults-file=${CONF_DIR}/md1.cnf --datadir=${DATADIR}/mdnode1 --basedir=${BASEDIR}   --slave_parallel_mode=optimistic --log-error=${DATADIR}/log/mdnode1.err > ${DATADIR}/log/mdnode1.err 2>&1 &
            sleep 5
            ${BASEDIR}/bin/mariadb --user=root --socket=/tmp/mdnode1.sock -Bse"SET SESSION sql_log_bin=0;delete from mysql.user where user='';SET SESSION sql_log_bin=1;drop database if exists test; create database test;" > /dev/null 2>&1
             
            ${BASEDIR}/bin/mariadb --user=root --socket=${DATADIR}/node1/mysql.sock -Bse"CHANGE MASTER  TO MASTER_HOST='127.0.0.1', MASTER_PORT=4300, MASTER_USER='root', MASTER_USE_GTID=slave_pos ; START SLAVE ;" 2>&1
             
            ${BASEDIR}/bin/mariadb --user=root --socket=/tmp/mdnode1.sock -Bse"drop database if exists rqg_test;create database rqg_test;" 2>&1
             
            perl ${DATADIR}/galera-qa/randgen/gendata.pl --dsn=dbi:mysql:host=127.0.0.1:port=4300:user=root:database=rqg_test --spec=${DATADIR}/galera-qa/randgen/conf/transactions/transactions-alter.zz > ${DATADIR}/log/rqg_run.log 2>&1
             
            perl ${DATADIR}/galera-qa/randgen/gentest.pl --dsn=dbi:mysql:host=127.0.0.1:port=4300:user=root:database=rqg_test --grammar=${DATADIR}/galera-qa/randgen/conf/transactions/transactions-alter.yy --threads=8 --duration=60 > ${DATADIR}/log/rqg_run_test.log 2>&1
            

            #0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            #1  0x000055b3812b6143 in my_write_core (sig=6) at /test/11.0/mysys/stacktrace.c:424
            #2  0x000055b380a20e0c in handle_fatal_signal (sig=6) at /test/11.0/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  0x0000146269225859 in __GI_abort () at abort.c:79
            #6  0x0000146269225729 in __assert_fail_base (fmt=0x1462693bb588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55b3816fad68 "client_state.transaction().active()", 
                file=0x55b3816fa900 "/test/11.0/sql/service_wsrep.cc", line=309, function=<optimized out>) at assert.c:92
            #7  0x0000146269236fd6 in __GI___assert_fail (assertion=0x55b3816fad68 "client_state.transaction().active()", file=0x55b3816fa900 "/test/11.0/sql/service_wsrep.cc", line=309, 
                function=0x55b3816fad90 "int wsrep_thd_append_key(THD*, const wsrep_key*, int, Wsrep_service_key_type)") at assert.c:101
            #8  0x000055b380df5c62 in wsrep_thd_append_key (thd=0x1461b8001448, key=0x146228156fc0, n_keys=1, key_type=WSREP_SERVICE_KEY_UPDATE) at /test/11.0/sql/service_wsrep.cc:309
            #9  0x000055b380e25f68 in wsrep_append_key (thd=0x1461b8001448, trx=0x1462596c4d80, table_share=0x1461b8159640, key=0x1462281570f0 "", key_len=5, key_type=WSREP_SERVICE_KEY_UPDATE)
                at /test/11.0/storage/innobase/handler/ha_innodb.cc:10061
            #10 0x000055b380e269ce in ha_innobase::wsrep_append_keys (this=0x1461d012eee0, thd=0x1461b8001448, key_type=WSREP_SERVICE_KEY_UPDATE, record0=0x1461d0045ac8 "\371\001", record1=0x1461d0045ab8 "\371\001")
                at /test/11.0/storage/innobase/handler/ha_innodb.cc:10235
            #11 0x000055b380e22689 in ha_innobase::update_row (this=0x1461d012eee0, old_row=0x1461d0045ac8 "\371\001", new_row=0x1461d0045ab8 "\371\001") at /test/11.0/storage/innobase/handler/ha_innodb.cc:8617
            #12 0x000055b380a3ba13 in handler::ha_update_row (this=0x1461d012eee0, old_data=0x1461d0045ac8 "\371\001", new_data=0x1461d0045ab8 "\371\001") at /test/11.0/sql/handler.cc:7872
            #13 0x000055b380d1d0d8 in ha_partition::update_row (this=0x1461d009c900, old_data=0x1461d0045ac8 "\371\001", new_data=0x1461d0045ab8 "\371\001") at /test/11.0/sql/ha_partition.cc:4666
            #14 0x000055b380a3ba13 in handler::ha_update_row (this=0x1461d009c900, old_data=0x1461d0045ac8 "\371\001", new_data=0x1461d0045ab8 "\371\001") at /test/11.0/sql/handler.cc:7872
            #15 0x000055b380bcea22 in Update_rows_log_event::do_exec_row (this=0x146220269648, rgi=0x146220261c10) at /test/11.0/sql/log_event_server.cc:7921
            #16 0x000055b380bc557c in Rows_log_event::do_apply_event (this=0x146220269648, rgi=0x146220261c10) at /test/11.0/sql/log_event_server.cc:5084
            #17 0x000055b380bafb6d in Log_event::apply_event (this=0x146220269648, rgi=0x146220261c10) at /test/11.0/sql/log_event.cc:3856
            #18 0x000055b3805262c1 in apply_event_and_update_pos_apply (ev=0x146220269648, thd=0x1461b8001448, rgi=0x146220261c10, reason=0) at /test/11.0/sql/slave.cc:3877
            #19 0x000055b380526ad0 in apply_event_and_update_pos_for_parallel (ev=0x146220269648, thd=0x1461b8001448, rgi=0x146220261c10) at /test/11.0/sql/slave.cc:4074
            #20 0x000055b3808dabfb in rpt_handle_event (qev=0x1462201242e8, rpt=0x14622000dc88) at /test/11.0/sql/rpl_parallel.cc:61
            #21 0x000055b3808dd5eb in retry_event_group (rgi=0x146220261c10, rpt=0x14622000dc88, orig_qev=0x14622017a288) at /test/11.0/sql/rpl_parallel.cc:1035
            #22 0x000055b3808de7f9 in handle_rpl_parallel_thread (arg=0x14622000dc88) at /test/11.0/sql/rpl_parallel.cc:1423
            #23 0x000055b380d36f47 in pfs_spawn_thread (arg=0x14619407a108) at /test/11.0/storage/perfschema/pfs.cc:2201
            #24 0x0000146269751609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #25 0x0000146269322133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            ramesh Ramesh Sivaraman added a comment - - edited denis.protivensky The following RQG test case crashes an async replica galera node using ROW-based replication. Can you please check the test case. RQG grammar files transactions-alter.zz transactions-alter.yy RQG run also crashing the async replica galera node with ROW based replication   DATADIR=/home/ramesh/framework BASEDIR=/home/ramesh/framework/mariadb-11.0.1-linux-x86_64-alter CONF_DIR=/home/ramesh/framework/conf   ${BASEDIR}/scripts/mariadb-install-db --no-defaults --force --auth-root-authentication-method=normal --basedir=${BASEDIR} --datadir=${DATADIR}/node1 > ${DATADIR}/log/startup1.log 2>&1 ${BASEDIR}/scripts/mariadb-install-db --no-defaults --force --auth-root-authentication-method=normal --basedir=${BASEDIR} --datadir=${DATADIR}/node2 > ${DATADIR}/log/startup2.log 2>&1   ${BASEDIR}/bin/mariadbd --defaults-file=${CONF_DIR}/node1.cnf --slave_parallel_mode=optimistic --wsrep-new-cluster > ${DATADIR}/node1/node1.err 2>&1 &   ${BASEDIR}/bin/mariadb --user=root --socket=${DATADIR}/node1/mysql.sock -Bse"SET SESSION sql_log_bin=0;delete from mysql.user where user='';" > /dev/null 2>&1   sleep 10   ${BASEDIR}/bin/mariadbd --defaults-file=${CONF_DIR}/node2.cnf --slave_parallel_mode=optimistic > ${DATADIR}/node2/node2.err 2>&1 &   ${BASEDIR}/scripts/mariadb-install-db --no-defaults --force --auth-root-authentication-method=normal --basedir=${BASEDIR} --datadir=${DATADIR}/mdnode1 > ${DATADIR}/log/md_startup1.log 2>&1     ${BASEDIR}/bin/mariadbd --defaults-file=${CONF_DIR}/md1.cnf --datadir=${DATADIR}/mdnode1 --basedir=${BASEDIR} --slave_parallel_mode=optimistic --log-error=${DATADIR}/log/mdnode1.err > ${DATADIR}/log/mdnode1.err 2>&1 & sleep 5 ${BASEDIR}/bin/mariadb --user=root --socket=/tmp/mdnode1.sock -Bse"SET SESSION sql_log_bin=0;delete from mysql.user where user='';SET SESSION sql_log_bin=1;drop database if exists test; create database test;" > /dev/null 2>&1   ${BASEDIR}/bin/mariadb --user=root --socket=${DATADIR}/node1/mysql.sock -Bse"CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=4300, MASTER_USER='root', MASTER_USE_GTID=slave_pos ; START SLAVE ;" 2>&1   ${BASEDIR}/bin/mariadb --user=root --socket=/tmp/mdnode1.sock -Bse"drop database if exists rqg_test;create database rqg_test;" 2>&1   perl ${DATADIR}/galera-qa/randgen/gendata.pl --dsn=dbi:mysql:host=127.0.0.1:port=4300:user=root:database=rqg_test --spec=${DATADIR}/galera-qa/randgen/conf/transactions/transactions-alter.zz > ${DATADIR}/log/rqg_run.log 2>&1   perl ${DATADIR}/galera-qa/randgen/gentest.pl --dsn=dbi:mysql:host=127.0.0.1:port=4300:user=root:database=rqg_test --grammar=${DATADIR}/galera-qa/randgen/conf/transactions/transactions-alter.yy --threads=8 --duration=60 > ${DATADIR}/log/rqg_run_test.log 2>&1 #0 __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 #1 0x000055b3812b6143 in my_write_core (sig=6) at /test/11.0/mysys/stacktrace.c:424 #2 0x000055b380a20e0c in handle_fatal_signal (sig=6) at /test/11.0/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 0x0000146269225859 in __GI_abort () at abort.c:79 #6 0x0000146269225729 in __assert_fail_base (fmt=0x1462693bb588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55b3816fad68 "client_state.transaction().active()", file=0x55b3816fa900 "/test/11.0/sql/service_wsrep.cc", line=309, function=<optimized out>) at assert.c:92 #7 0x0000146269236fd6 in __GI___assert_fail (assertion=0x55b3816fad68 "client_state.transaction().active()", file=0x55b3816fa900 "/test/11.0/sql/service_wsrep.cc", line=309, function=0x55b3816fad90 "int wsrep_thd_append_key(THD*, const wsrep_key*, int, Wsrep_service_key_type)") at assert.c:101 #8 0x000055b380df5c62 in wsrep_thd_append_key (thd=0x1461b8001448, key=0x146228156fc0, n_keys=1, key_type=WSREP_SERVICE_KEY_UPDATE) at /test/11.0/sql/service_wsrep.cc:309 #9 0x000055b380e25f68 in wsrep_append_key (thd=0x1461b8001448, trx=0x1462596c4d80, table_share=0x1461b8159640, key=0x1462281570f0 "", key_len=5, key_type=WSREP_SERVICE_KEY_UPDATE) at /test/11.0/storage/innobase/handler/ha_innodb.cc:10061 #10 0x000055b380e269ce in ha_innobase::wsrep_append_keys (this=0x1461d012eee0, thd=0x1461b8001448, key_type=WSREP_SERVICE_KEY_UPDATE, record0=0x1461d0045ac8 "\371\001", record1=0x1461d0045ab8 "\371\001") at /test/11.0/storage/innobase/handler/ha_innodb.cc:10235 #11 0x000055b380e22689 in ha_innobase::update_row (this=0x1461d012eee0, old_row=0x1461d0045ac8 "\371\001", new_row=0x1461d0045ab8 "\371\001") at /test/11.0/storage/innobase/handler/ha_innodb.cc:8617 #12 0x000055b380a3ba13 in handler::ha_update_row (this=0x1461d012eee0, old_data=0x1461d0045ac8 "\371\001", new_data=0x1461d0045ab8 "\371\001") at /test/11.0/sql/handler.cc:7872 #13 0x000055b380d1d0d8 in ha_partition::update_row (this=0x1461d009c900, old_data=0x1461d0045ac8 "\371\001", new_data=0x1461d0045ab8 "\371\001") at /test/11.0/sql/ha_partition.cc:4666 #14 0x000055b380a3ba13 in handler::ha_update_row (this=0x1461d009c900, old_data=0x1461d0045ac8 "\371\001", new_data=0x1461d0045ab8 "\371\001") at /test/11.0/sql/handler.cc:7872 #15 0x000055b380bcea22 in Update_rows_log_event::do_exec_row (this=0x146220269648, rgi=0x146220261c10) at /test/11.0/sql/log_event_server.cc:7921 #16 0x000055b380bc557c in Rows_log_event::do_apply_event (this=0x146220269648, rgi=0x146220261c10) at /test/11.0/sql/log_event_server.cc:5084 #17 0x000055b380bafb6d in Log_event::apply_event (this=0x146220269648, rgi=0x146220261c10) at /test/11.0/sql/log_event.cc:3856 #18 0x000055b3805262c1 in apply_event_and_update_pos_apply (ev=0x146220269648, thd=0x1461b8001448, rgi=0x146220261c10, reason=0) at /test/11.0/sql/slave.cc:3877 #19 0x000055b380526ad0 in apply_event_and_update_pos_for_parallel (ev=0x146220269648, thd=0x1461b8001448, rgi=0x146220261c10) at /test/11.0/sql/slave.cc:4074 #20 0x000055b3808dabfb in rpt_handle_event (qev=0x1462201242e8, rpt=0x14622000dc88) at /test/11.0/sql/rpl_parallel.cc:61 #21 0x000055b3808dd5eb in retry_event_group (rgi=0x146220261c10, rpt=0x14622000dc88, orig_qev=0x14622017a288) at /test/11.0/sql/rpl_parallel.cc:1035 #22 0x000055b3808de7f9 in handle_rpl_parallel_thread (arg=0x14622000dc88) at /test/11.0/sql/rpl_parallel.cc:1423 #23 0x000055b380d36f47 in pfs_spawn_thread (arg=0x14619407a108) at /test/11.0/storage/perfschema/pfs.cc:2201 #24 0x0000146269751609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #25 0x0000146269322133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

            Reduced testcase for the unique id

            wsrep_thd_is_applying(thd) && !wsrep_thd_is_local_toi(thd)|SIGABRT|wsrep_ignored_error_code|Rows_log_event::do_apply_event|Log_event::apply_event|save_restore_context_apply_event

            CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT, KEY(b));
            BINLOG 'AMqaOw8BAAAAdAAAAHgAAAAAAAQANS42LjM0LTc5LjEtZGVidWctbG9nAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAXAAEGggAAAAICAgCAAAACgoKGRkAAYVx w2w=';
            BINLOG 'wlZOTxMBAAAAKgAAADwCAAAAACkAAAAAAAEABHRlc3QAAnQxAAIDAwAC wlZOTxcBAAAAJgAAAGICAAAAACkAAAAAAAEAAv/8AgAAAAgAAAA='; 
            

            Leads to

            11.0.2 8d26537fbf20d249d65d4daba0394a8ff71e540e (Debug)

            mysqld: /test/11.0_dbg/sql/wsrep_mysqld.cc:3448: int wsrep_ignored_error_code(Log_event*, int): Assertion `wsrep_thd_is_applying(thd) && !wsrep_thd_is_local_toi(thd)' failed.
            

            11.0.2 8d26537fbf20d249d65d4daba0394a8ff71e540e (Debug)

            Core was generated by `/test/GAL_MD030523-mariadb-11.0.2-linux-x86_64-dbg/bin/mysqld --defaults-file=/'.
            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
            [Current thread is 1 (Thread 0x1477fff1e700 (LWP 709910))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            #1  0x0000558f229d2e31 in my_write_core (sig=sig@entry=6) at /test/11.0_dbg/mysys/stacktrace.c:424
            #2  0x0000558f222c0b44 in handle_fatal_signal (sig=6) at /test/11.0_dbg/sql/signal_handler.cc:360
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
            #5  0x0000147869dd1859 in __GI_abort () at abort.c:79
            #6  0x0000147869dd1729 in __assert_fail_base (fmt=0x147869f67588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x558f22d96a10 "wsrep_thd_is_applying(thd) && !wsrep_thd_is_local_toi(thd)", file=0x558f22d95d70 "/test/11.0_dbg/sql/wsrep_mysqld.cc", line=3448, function=<optimized out>) at assert.c:92
            #7  0x0000147869de2fd6 in __GI___assert_fail (assertion=assertion@entry=0x558f22d96a10 "wsrep_thd_is_applying(thd) && !wsrep_thd_is_local_toi(thd)", file=file@entry=0x558f22d95d70 "/test/11.0_dbg/sql/wsrep_mysqld.cc", line=line@entry=3448, function=function@entry=0x558f22d969e0 "int wsrep_ignored_error_code(Log_event*, int)") at assert.c:101
            #8  0x0000558f225823f0 in wsrep_ignored_error_code (ev=ev@entry=0x1477e8012fe8, error=error@entry=1030) at /test/11.0_dbg/sql/wsrep_mysqld.cc:3448
            #9  0x0000558f2244e425 in Rows_log_event::do_apply_event (this=0x1477e8012fe8, rgi=0x1477e801e1a0) at /test/11.0_dbg/include/my_bitmap.h:106
            #10 0x0000558f22445f86 in Log_event::apply_event (this=this@entry=0x1477e8012fe8, rgi=rgi@entry=0x1477e801e1a0) at /test/11.0_dbg/sql/log_event.cc:3856
            #11 0x0000558f22114509 in save_restore_context_apply_event (ev=ev@entry=0x1477e8012fe8, rgi=rgi@entry=0x1477e801e1a0) at /test/11.0_dbg/sql/sql_binlog.cc:187
            #12 0x0000558f22114abe in mysql_client_binlog_statement (thd=thd@entry=0x1477e8000d48) at /test/11.0_dbg/sql/sql_binlog.cc:427
            #13 0x0000558f21fda199 in mysql_execute_command (thd=thd@entry=0x1477e8000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.0_dbg/sql/sql_parse.cc:5929
            #14 0x0000558f21fc2738 in mysql_parse (thd=thd@entry=0x1477e8000d48, rawbuf=rawbuf@entry=0x1477e8013170 "BINLOG 'wlZOTxMBAAAAKgAAADwCAAAAACkAAAAAAAEABHRlc3QAAnQxAAIDAwAC wlZOTxcBAAAAJgAAAGICAAAAACkAAAAAAAEAAv/8AgAAAAgAAAA='", length=length@entry=118, parser_state=parser_state@entry=0x1477fff1d300) at /test/11.0_dbg/sql/sql_parse.cc:8014
            #15 0x0000558f21fc2138 in wsrep_mysql_parse (thd=thd@entry=0x1477e8000d48, rawbuf=0x1477e8013170 "BINLOG 'wlZOTxMBAAAAKgAAADwCAAAAACkAAAAAAAEABHRlc3QAAnQxAAIDAwAC wlZOTxcBAAAAJgAAAGICAAAAACkAAAAAAAEAAv/8AgAAAAgAAAA='", length=118, parser_state=parser_state@entry=0x1477fff1d300) at /test/11.0_dbg/sql/sql_parse.cc:7825
            #16 0x0000558f21fd00d2 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1477e8000d48, packet=packet@entry=0x1477e800ae39 "BINLOG 'wlZOTxMBAAAAKgAAADwCAAAAACkAAAAAAAEABHRlc3QAAnQxAAIDAwAC wlZOTxcBAAAAJgAAAGICAAAAACkAAAAAAAEAAv/8AgAAAAgAAAA='", packet_length=packet_length@entry=118, blocking=blocking@entry=true) at /test/11.0_dbg/sql/sql_class.h:1370
            #17 0x0000558f21fd251e in do_command (thd=0x1477e8000d48, blocking=blocking@entry=true) at /test/11.0_dbg/sql/sql_parse.cc:1407
            #18 0x0000558f2213a9a0 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x558f25e33dd8, put_in_cache=put_in_cache@entry=true) at /test/11.0_dbg/sql/sql_connect.cc:1416
            #19 0x0000558f2213ae72 in handle_one_connection (arg=0x558f25e33dd8) at /test/11.0_dbg/sql/sql_connect.cc:1318
            #20 0x000014786a2e2609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #21 0x0000147869ece133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            ramesh Ramesh Sivaraman added a comment - Reduced testcase for the unique id wsrep_thd_is_applying(thd) && !wsrep_thd_is_local_toi(thd)|SIGABRT|wsrep_ignored_error_code|Rows_log_event::do_apply_event|Log_event::apply_event|save_restore_context_apply_event CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY , b INT , KEY (b)); BINLOG 'AMqaOw8BAAAAdAAAAHgAAAAAAAQANS42LjM0LTc5LjEtZGVidWctbG9nAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAXAAEGggAAAAICAgCAAAACgoKGRkAAYVx w2w=' ; BINLOG 'wlZOTxMBAAAAKgAAADwCAAAAACkAAAAAAAEABHRlc3QAAnQxAAIDAwAC wlZOTxcBAAAAJgAAAGICAAAAACkAAAAAAAEAAv/8AgAAAAgAAAA=' ; Leads to 11.0.2 8d26537fbf20d249d65d4daba0394a8ff71e540e (Debug) mysqld: /test/11.0_dbg/sql/wsrep_mysqld.cc:3448: int wsrep_ignored_error_code(Log_event*, int): Assertion `wsrep_thd_is_applying(thd) && !wsrep_thd_is_local_toi(thd)' failed. 11.0.2 8d26537fbf20d249d65d4daba0394a8ff71e540e (Debug) Core was generated by `/test/GAL_MD030523-mariadb-11.0.2-linux-x86_64-dbg/bin/mysqld --defaults-file=/'. 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 [Current thread is 1 (Thread 0x1477fff1e700 (LWP 709910))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 #1 0x0000558f229d2e31 in my_write_core (sig=sig@entry=6) at /test/11.0_dbg/mysys/stacktrace.c:424 #2 0x0000558f222c0b44 in handle_fatal_signal (sig=6) at /test/11.0_dbg/sql/signal_handler.cc:360 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #5 0x0000147869dd1859 in __GI_abort () at abort.c:79 #6 0x0000147869dd1729 in __assert_fail_base (fmt=0x147869f67588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x558f22d96a10 "wsrep_thd_is_applying(thd) && !wsrep_thd_is_local_toi(thd)", file=0x558f22d95d70 "/test/11.0_dbg/sql/wsrep_mysqld.cc", line=3448, function=<optimized out>) at assert.c:92 #7 0x0000147869de2fd6 in __GI___assert_fail (assertion=assertion@entry=0x558f22d96a10 "wsrep_thd_is_applying(thd) && !wsrep_thd_is_local_toi(thd)", file=file@entry=0x558f22d95d70 "/test/11.0_dbg/sql/wsrep_mysqld.cc", line=line@entry=3448, function=function@entry=0x558f22d969e0 "int wsrep_ignored_error_code(Log_event*, int)") at assert.c:101 #8 0x0000558f225823f0 in wsrep_ignored_error_code (ev=ev@entry=0x1477e8012fe8, error=error@entry=1030) at /test/11.0_dbg/sql/wsrep_mysqld.cc:3448 #9 0x0000558f2244e425 in Rows_log_event::do_apply_event (this=0x1477e8012fe8, rgi=0x1477e801e1a0) at /test/11.0_dbg/include/my_bitmap.h:106 #10 0x0000558f22445f86 in Log_event::apply_event (this=this@entry=0x1477e8012fe8, rgi=rgi@entry=0x1477e801e1a0) at /test/11.0_dbg/sql/log_event.cc:3856 #11 0x0000558f22114509 in save_restore_context_apply_event (ev=ev@entry=0x1477e8012fe8, rgi=rgi@entry=0x1477e801e1a0) at /test/11.0_dbg/sql/sql_binlog.cc:187 #12 0x0000558f22114abe in mysql_client_binlog_statement (thd=thd@entry=0x1477e8000d48) at /test/11.0_dbg/sql/sql_binlog.cc:427 #13 0x0000558f21fda199 in mysql_execute_command (thd=thd@entry=0x1477e8000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.0_dbg/sql/sql_parse.cc:5929 #14 0x0000558f21fc2738 in mysql_parse (thd=thd@entry=0x1477e8000d48, rawbuf=rawbuf@entry=0x1477e8013170 "BINLOG 'wlZOTxMBAAAAKgAAADwCAAAAACkAAAAAAAEABHRlc3QAAnQxAAIDAwAC wlZOTxcBAAAAJgAAAGICAAAAACkAAAAAAAEAAv/8AgAAAAgAAAA='", length=length@entry=118, parser_state=parser_state@entry=0x1477fff1d300) at /test/11.0_dbg/sql/sql_parse.cc:8014 #15 0x0000558f21fc2138 in wsrep_mysql_parse (thd=thd@entry=0x1477e8000d48, rawbuf=0x1477e8013170 "BINLOG 'wlZOTxMBAAAAKgAAADwCAAAAACkAAAAAAAEABHRlc3QAAnQxAAIDAwAC wlZOTxcBAAAAJgAAAGICAAAAACkAAAAAAAEAAv/8AgAAAAgAAAA='", length=118, parser_state=parser_state@entry=0x1477fff1d300) at /test/11.0_dbg/sql/sql_parse.cc:7825 #16 0x0000558f21fd00d2 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1477e8000d48, packet=packet@entry=0x1477e800ae39 "BINLOG 'wlZOTxMBAAAAKgAAADwCAAAAACkAAAAAAAEABHRlc3QAAnQxAAIDAwAC wlZOTxcBAAAAJgAAAGICAAAAACkAAAAAAAEAAv/8AgAAAAgAAAA='", packet_length=packet_length@entry=118, blocking=blocking@entry=true) at /test/11.0_dbg/sql/sql_class.h:1370 #17 0x0000558f21fd251e in do_command (thd=0x1477e8000d48, blocking=blocking@entry=true) at /test/11.0_dbg/sql/sql_parse.cc:1407 #18 0x0000558f2213a9a0 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x558f25e33dd8, put_in_cache=put_in_cache@entry=true) at /test/11.0_dbg/sql/sql_connect.cc:1416 #19 0x0000558f2213ae72 in handle_one_connection (arg=0x558f25e33dd8) at /test/11.0_dbg/sql/sql_connect.cc:1318 #20 0x000014786a2e2609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #21 0x0000147869ece133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

            Last remaining test case does not reproduce anymore. Rest of the cases are fixed separately.

            janlindstrom Jan Lindström added a comment - Last remaining test case does not reproduce anymore. Rest of the cases are fixed separately.

            People

              janlindstrom Jan Lindström
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.