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

Assertion `client_state_.mode() == wsrep::client_state::m_local' failed in int wsrep::transaction::after_statement(wsrep::unique_lock<wsrep::mutex>&)

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.5, 10.6, 10.11, 11.1(EOL), 11.2, 11.4, 11.5(EOL)
    • 10.5, 10.6, 10.11, 11.2, 11.4
    • Galera

    Description

      Node2 crashes when creating ARIA table after setting sql_mode='' and enforce_storage_engine=INNODB. Test case creates InnoDB table on Node1, but the replicated statement creates ARIA table on node2.

      Replay using CLI

       
      # mysqld options required for replay:  --log_bin
      set session sql_mode='';
      SET @@enforce_storage_engine=INNODB;
      CREATE TABLE t1 (c INT ) ENGINE=ARIA;
      INSERT INTO t1 VALUES (0);
      

      Leads to:

      10.5.27 f41a120298aa17ca80eecaa68614a6addf91ebc6 (Debug)

      Core was generated by `/test/GAL_MD160824-mariadb-10.5.27-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 0x14b85ced2700 (LWP 3916796))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055ac9d817df5 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:424
      #2  0x000055ac9d05ead6 in handle_fatal_signal (sig=6) at /test/10.5_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  0x000014b85e7cb859 in __GI_abort () at abort.c:79
      #6  0x000014b85e7cb729 in __assert_fail_base (fmt=0x14b85e961588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55ac9df4ff20 "client_state_.mode() == wsrep::client_state::m_local", file=0x55ac9df4fda8 "/test/10.5_dbg/wsrep-lib/src/transaction.cpp", line=829, function=<optimized out>) at assert.c:92
      #7  0x000014b85e7dcfd6 in __GI___assert_fail (assertion=assertion@entry=0x55ac9df4ff20 "client_state_.mode() == wsrep::client_state::m_local", file=file@entry=0x55ac9df4fda8 "/test/10.5_dbg/wsrep-lib/src/transaction.cpp", line=line@entry=829, function=function@entry=0x55ac9df51468 "int wsrep::transaction::after_statement(wsrep::unique_lock<wsrep::mutex>&)") at assert.c:101
      #8  0x000055ac9d9da68d in wsrep::transaction::after_statement (this=this@entry=0x14b83c007308, lock=@0x14b85ced1b80: {_M_device = 0x14b83c007268, _M_owns = true}) at /test/10.5_dbg/wsrep-lib/include/wsrep/transaction.hpp:64
      #9  0x000055ac9d9da94f in wsrep::transaction::after_statement (this=this@entry=0x14b83c007308) at /test/10.5_dbg/wsrep-lib/src/transaction.cpp:821
      #10 0x000055ac9d9bff41 in wsrep::client_state::close (this=0x14b83c0072a0) at /test/10.5_dbg/wsrep-lib/src/client_state.cpp:74
      #11 0x000055ac9d34d449 in Wsrep_applier_service::~Wsrep_applier_service (this=0x14b85ced1c00, __in_chrg=<optimized out>) at /test/10.5_dbg/sql/sql_class.h:5325
      #12 0x000055ac9d368ca6 in wsrep_replication_process (thd=0x14b83c000f88, arg=<optimized out>) at /test/10.5_dbg/sql/wsrep_thd.cc:78
      #13 0x000055ac9d3565e6 in start_wsrep_THD (arg=0x55ac9fd0e9f0) at /test/10.5_dbg/sql/wsrep_mysqld.h:518
      #14 0x000014b85ecdc609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #15 0x000014b85e8c8133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.5.27 (dbg), 10.6.19 (dbg), 10.11.9 (dbg), 11.1.6 (dbg), 11.2.4 (dbg), 11.4.3 (dbg), 11.5.2 (dbg)

      Bug confirmed not present in:
      MariaDB: 10.5.27 (opt), 10.6.19 (opt), 10.11.9 (opt), 11.1.6 (opt), 11.2.4 (opt), 11.4.3 (opt), 11.5.2 (opt)

      Attachments

        Activity

          People

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