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

Assertion `state() == s_committing' failed in int wsrep::transaction::ordered_commit()

    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
    • None

    Description

      --source include/have_innodb.inc
      --source include/galera_cluster.inc
      --source include/have_log_bin.inc
       
      CREATE TABLE t1(c CHAR(1)) ENGINE=INNODB;
      CREATE TABLE t2(c CHAR(1)) ENGINE=ARIA;
      SET SESSION autocommit=0;
      CREATE TABLE t3(c CHAR(1)) ENGINE=MyISAM;
      INSERT INTO t1 SET c='';
      INSERT INTO t3 VALUES('C');
      SELECT @@log_bin;
      --ERROR ER_DATA_TOO_LONG
      INSERT INTO t2 VALUES (11);
      CREATE TABLE t3 (c CHAR(1)) ENGINE=INNODB;
      

      Leads to:
      Error info

      2024-08-16 11:18:30 12 [Note] WSREP: wsrep_after_statement for 12 client_state exec  client_mode local trans_state executing
      2024-08-16 11:18:30 12 [Note] WSREP: assigned new next trx id: 23
      2024-08-16 11:18:30 12 [Note] WSREP: wsrep_before_commit: 1, -1
      2024-08-16 11:18:30 12 [Note] WSREP: wsrep_ordered_commit: 1 11
      2024-08-16 11:18:30 12 [Note] WSREP: wsrep_ordered_commit: 1 11
      2024-08-16 11:18:30 12 [ERROR] WSREP: FSM: no such a transition COMMITTED -> COMMITTED
      240816 11:18:30 [ERROR] mysqld got signal 6 ;
      Sorry, we probably made a mistake, and this is a bug.
      

      10.5.27 f41a120298aa17ca80eecaa68614a6addf91ebc6 (Optimized)

      Core was generated by `/test/GAL_MD160824-mariadb-10.5.27-linux-x86_64-opt/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 0x154a073a5700 (LWP 2567909))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055c90194bddf in my_write_core (sig=sig@entry=6) at /test/10.5_opt/mysys/stacktrace.c:424
      #2  0x000055c901406560 in handle_fatal_signal (sig=6) at /test/10.5_opt/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  0x0000154a49860859 in __GI_abort () at abort.c:79
      #6  0x0000154a492ba820 in galera::FSM<galera::TrxHandle::State, galera::TrxHandle::Transition>::shift_to (this=this@entry=0x1549d006fac8, state=state@entry=galera::TrxHandle::S_COMMITTED, line=line@entry=1447) at /usr/include/c++/9/bits/char_traits.h:342
      #7  0x0000154a492d7d59 in galera::TrxHandle::set_state (line=1447, state=galera::TrxHandle::S_COMMITTED, this=0x1549d006fac0) at /test/galera_4x/galera/src/trx_handle.hpp:603
      #8  galera::TrxHandleSlave::set_state (line=1447, state=galera::TrxHandle::S_COMMITTED, this=0x1549d006fac0) at /test/galera_4x/galera/src/trx_handle.hpp:603
      #9  galera::ReplicatorSMM::commit_order_leave (this=this@entry=0x55c902db7b60, ts=Python Exception <class 'gdb.error'> No type named std::__detail::_Hash_node<class galera::TrxHandle::Transition, true>.: 
      @0x1549d006fac0: {<galera::TrxHandle> = {_vptr.TrxHandle = 0x154a49500ad8 <vtable for galera::TrxHandleSlave+16>, static TRXHANDLE_FLAGS_MASK = 33791, static EXPLICIT_ROLLBACK_FLAGS = 10, static FLAGS_MATCH_API_FLAGS = true, static num_states_ = 12, state_ = {delete_ = false, trans_map_ = 0x154a49506660 <galera::TrxHandleSlave::trans_map_>, state_ = {        first = galera::TrxHandle::S_COMMITTED,        second = 1447      }, state_hist_ = std::vector of length 4, capacity 4 = {{          first = galera::TrxHandle::S_REPLICATING,          second = 0        }, {          first = galera::TrxHandle::S_CERTIFYING,          second = 3275        }, {          first = galera::TrxHandle::S_APPLYING,          second = 1022        }, {          first = galera::TrxHandle::S_COMMITTING,          second = 1273        }}}, source_id_ = {data = "Ԁ\231\257[\247\021+'\024/", <incomplete sequence \316>, alignment = 17226734061898793172}, conn_id_ = 12, trx_id_ = 20, timestamp_ = 6816479120838473, version_ = 6, write_set_flags_ = 65, local_ = true, master_ = false}, static trans_map_ = {impl_ = std::unordered_set with 4 elements}, local_seqno_ = 11, global_seqno_ = 11, last_seen_seqno_ = 10, depends_seqno_ = 8, ends_nbo_ = -1, mem_pool_ = @0x55c902db8550, write_set_ = {header_ = {static MAGIC_BYTE = 71 'G', static V3_CHECKSUM_SIZE = 8, static V3_ANNOT_FLAG = 1 '\001', static V3_UNORD_FLAG = 2 '\002', static V3_MAGIC_OFF = 0, static V3_HEADER_VERS_OFF = 1, static V3_HEADER_SIZE_OFF = 2, static V3_SETS_OFF = 3, static V3_FLAGS_OFF = 4, static V3_PA_RANGE_OFF = 6, static V3_LAST_SEEN_OFF = 8, static V3_SEQNO_OFF = 8, static V3_TIMESTAMP_OFF = 16, static V3_SOURCE_ID_OFF = 24, static V3_CONN_ID_OFF = 40, static V3_TRX_ID_OFF = 48, static V3_CRC_OFF = 56, static V3_SIZE = 64, static V3 = {header_ver_ = 1, header_size_ = 2, sets_ = 3, flags_ = 4, pa_range_ = 6, last_seen_ = 8, seqno_ = 8, timestamp_ = 16, source_id_ = 24, conn_id_ = 40, trx_id_ = 48, crc_ = 56}, static MAX_HEADER_SIZE = 64, local_ = '\000' <repeats 63 times>, ptr_ = 0x154a3c000418 <error: Cannot access memory at address 0x154a3c000418>, ver_ = galera::WriteSetNG::VER6, size_ = 64 '@', chksm_ = {<No data fields>}}, size_ = 384, keys_ = {<gu::RecordSetIn<galera::KeySet::KeyPart>> = {<gu::RecordSetInBase> = {<gu::RecordSet> = {static MAX_VERSION = gu::RecordSet::VER2, static VER2_ALIGNMENT = 8, size_ = 56, count_ = 4, version_ = 2 '\002', check_type_ = 3 '\003', alignment_ = 8 '\b'}, head_ = 0x154a3c000458 <error: Cannot access memory at address 0x154a3c000458>, next_ = 56, begin_ = 24}, <No data fields>}, version_ = galera::KeySet::FLAT8}, data_ = {<gu::RecordSetIn<galera::DataSet::RecordIn>> = {<gu::RecordSetInBase> = {<gu::RecordSet> = {static MAX_VERSION = gu::RecordSet::VER2, static VER2_ALIGNMENT = 8, size_ = 260, count_ = 1, version_ = 2 '\002', check_type_ = 3 '\003', alignment_ = 8 '\b'}, head_ = 0x154a3c000490 <error: Cannot access memory at address 0x154a3c000490>, next_ = 24, begin_ = 24}, <No data fields>}, version_ = galera::DataSet::VER1}, unrd_ = {<gu::RecordSetIn<galera::DataSet::RecordIn>> = {<gu::RecordSetInBase> = {<gu::RecordSet> = {static MAX_VERSION = gu::RecordSet::VER2, static VER2_ALIGNMENT = 8, size_ = 0, count_ = 0, version_ = 0 '\000', check_type_ = 0 '\000', alignment_ = 0 '\000'}, head_ = 0x0, next_ = 0, begin_ = 0}, <No data fields>}, version_ = galera::DataSet::EMPTY}, annt_ = 0x0, check_thr_id_ = {sys_thread = 0, ts_thread = 0x0}, check_thr_ = false, check_ = true, static SIZE_THRESHOLD = 4194304}, buf_ = 0x1549d006fac0, action_ = {    first = 0x154a3c000418,    second = 384  }, certified_ = true, committed_ = false, exit_loop_ = false, cert_bypass_ = false, queued_ = false, local_order_cond_ = {cond = {sys_cond = pthread_cond_t = {        Threads known to still execute a wait function = 0,        Clock ID = CLOCK_REALTIME,        Shared = No      }, opaque = 0x0, opaque2 = 0x0, ts_cond = 0x0}, ref_count = 0}, apply_order_cond_ = {cond = {sys_cond = pthread_cond_t = {        Threads known to still execute a wait function = 0,        Clock ID = CLOCK_REALTIME,        Shared = No      }, opaque = 0x0, opaque2 = 0x0, ts_cond = 0x0}, ref_count = 0}, commit_order_cond_ = {cond = {sys_cond = pthread_cond_t = {        Threads known to still execute a wait function = 0,        Clock ID = CLOCK_REALTIME,        Shared = No      }, opaque = 0x0, opaque2 = 0x0, ts_cond = 0x0}, ref_count = 0}}, error=error@entry=0x154a073a2ea0) at /test/galera_4x/galera/src/replicator_smm.cpp:1447
      #10 0x0000154a492b69c9 in galera_commit_order_leave (gh=<optimized out>, ws_handle=<optimized out>, meta=<optimized out>, error=0x154a073a2ea0) at /usr/include/c++/9/bits/atomic_base.h:539
      #11 0x000055c901b38310 in wsrep::wsrep_provider_v26::commit_order_leave (this=<optimized out>, ws_handle=<optimized out>, ws_meta=<optimized out>, err=<optimized out>) at /test/10.5_opt/wsrep-lib/src/wsrep_provider_v26.cpp:277
      #12 0x000055c901b31a43 in wsrep::transaction::ordered_commit (this=this@entry=0x1549d0006d98) at /test/10.5_opt/wsrep-lib/include/wsrep/server_state.hpp:320
      #13 0x000055c901b1aa5d in wsrep::client_state::ordered_commit (this=this@entry=0x1549d0006d30) at /test/10.5_opt/wsrep-lib/src/client_state.cpp:395
      #14 0x000055c9015239d8 in wsrep_ordered_commit (all=<optimized out>, thd=0x1549d0000c58) at /test/10.5_opt/sql/sql_class.h:5325
      #15 MYSQL_BIN_LOG::queue_for_group_commit (this=this@entry=0x55c902370da0 <mysql_bin_log>, orig_entry=orig_entry@entry=0x154a073a3030) at /test/10.5_opt/sql/log.cc:8113
      #16 0x000055c901523c8e in MYSQL_BIN_LOG::write_transaction_to_binlog_events (this=this@entry=0x55c902370da0 <mysql_bin_log>, entry=entry@entry=0x154a073a3030) at /test/10.5_opt/sql/log.cc:8142
      #17 0x000055c901524212 in MYSQL_BIN_LOG::write_transaction_to_binlog (this=0x55c902370da0 <mysql_bin_log>, thd=0x1549d0000c58, cache_mngr=0x1549d004fb38, end_ev=<optimized out>, all=<optimized out>, using_stmt_cache=<optimized out>, using_trx_cache=true) at /test/10.5_opt/sql/log.cc:7772
      #18 0x000055c901524c21 in binlog_flush_cache (using_trx=true, using_stmt=false, all=true, end_ev=0x154a073a3160, cache_mngr=0x1549d004fb38, thd=0x1549d0000c58) at /test/10.5_opt/sql/log.cc:1772
      #19 binlog_commit_flush_trx_cache (thd=0x1549d0000c58, all=<optimized out>, cache_mngr=0x1549d004fb38) at /test/10.5_opt/sql/log.cc:1869
      #20 0x000055c90152683c in binlog_commit (hton=<optimized out>, thd=0x1549d0000c58, all=<optimized out>) at /test/10.5_opt/sql/log.cc:2227
      #21 0x000055c9014070ff in commit_one_phase_2 (thd=thd@entry=0x1549d0000c58, all=true, trans=0x1549d0004240, is_real_trans=<optimized out>) at /test/10.5_opt/sql/handler.cc:2032
      #22 0x000055c9014096b7 in ha_commit_one_phase (thd=thd@entry=0x1549d0000c58, all=all@entry=true) at /test/10.5_opt/sql/handler.cc:2011
      #23 0x000055c90140a935 in ha_commit_trans (thd=thd@entry=0x1549d0000c58, all=all@entry=true) at /test/10.5_opt/sql/handler.cc:1805
      #24 0x000055c9012efd04 in trans_commit_implicit (thd=thd@entry=0x1549d0000c58) at /test/10.5_opt/sql/transaction.cc:329
      #25 0x000055c9011dd8d0 in mysql_execute_command (thd=0x1549d0000c58) at /test/10.5_opt/sql/sql_parse.cc:3838
      #26 0x000055c9011cd264 in mysql_parse (thd=thd@entry=0x1549d0000c58, rawbuf=rawbuf@entry=0x1549d0010540 "CREATE TABLE t3 (c CHAR(1)) ENGINE=INNODB", length=length@entry=41, parser_state=parser_state@entry=0x154a073a4460, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_opt/sql/sql_parse.cc:8229
      #27 0x000055c9011cca51 in wsrep_mysql_parse (thd=0x1549d0000c58, rawbuf=0x1549d0010540 "CREATE TABLE t3 (c CHAR(1)) ENGINE=INNODB", length=41, parser_state=0x154a073a4460, is_com_multi=false, is_next_command=false) at /test/10.5_opt/sql/sql_parse.cc:8029
      #28 0x000055c9011db365 in dispatch_command (command=COM_QUERY, thd=0x1549d0000c58, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_parse.cc:1978
      #29 0x000055c9011dc133 in do_command (thd=0x1549d0000c58) at /test/10.5_opt/sql/sql_parse.cc:1376
      #30 0x000055c9012e0bfe in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55c90320bb68, put_in_cache=put_in_cache@entry=true) at /test/10.5_opt/sql/sql_connect.cc:1417
      #31 0x000055c9012e0ebd in handle_one_connection (arg=0x55c90320bb68) at /test/10.5_opt/sql/sql_connect.cc:1319
      #32 0x0000154a49d71609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #33 0x0000154a4995d133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.5.27 f41a120298aa17ca80eecaa68614a6addf91ebc6 (Debug)

      mysqld: /test/10.5_dbg/wsrep-lib/src/transaction.cpp:573: int wsrep::transaction::ordered_commit(): Assertion `state() == s_committing' failed.
      

      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 0x14a07c80a700 (LWP 2567823))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000563356261df5 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:424
      #2  0x0000563355aa8ad6 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  0x000014a09021c859 in __GI_abort () at abort.c:79
      #6  0x000014a09021c729 in __assert_fail_base (fmt=0x14a0903b2588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x563356999659 "state() == s_committing", file=0x563356999da8 "/test/10.5_dbg/wsrep-lib/src/transaction.cpp", line=573, function=<optimized out>) at assert.c:92
      #7  0x000014a09022dfd6 in __GI___assert_fail (assertion=assertion@entry=0x563356999659 "state() == s_committing", file=file@entry=0x563356999da8 "/test/10.5_dbg/wsrep-lib/src/transaction.cpp", line=line@entry=573, function=function@entry=0x56335699a448 "int wsrep::transaction::ordered_commit()") at assert.c:101
      #8  0x000056335641ea06 in wsrep::transaction::ordered_commit (this=this@entry=0x14a0100070c8) at /test/10.5_dbg/wsrep-lib/src/transaction.cpp:576
      #9  0x00005633564056f0 in wsrep::client_state::ordered_commit (this=this@entry=0x14a010007060) at /test/10.5_dbg/wsrep-lib/src/client_state.cpp:395
      #10 0x0000563355c1179e in wsrep_ordered_commit (all=true, thd=0x14a010000d48) at /test/10.5_dbg/sql/sql_class.h:5325
      #11 MYSQL_BIN_LOG::queue_for_group_commit (this=this@entry=0x563356d5f200 <mysql_bin_log>, orig_entry=orig_entry@entry=0x14a07c807e60) at /test/10.5_dbg/sql/log.cc:8113
      #12 0x0000563355c11920 in MYSQL_BIN_LOG::write_transaction_to_binlog_events (this=this@entry=0x563356d5f200 <mysql_bin_log>, entry=entry@entry=0x14a07c807e60) at /test/10.5_dbg/sql/log.cc:8142
      #13 0x0000563355c12468 in MYSQL_BIN_LOG::write_transaction_to_binlog (this=this@entry=0x563356d5f200 <mysql_bin_log>, thd=thd@entry=0x14a010000d48, cache_mngr=cache_mngr@entry=0x14a010073178, end_ev=end_ev@entry=0x14a07c807fe0, all=all@entry=true, using_stmt_cache=using_stmt_cache@entry=false, using_trx_cache=true) at /test/10.5_dbg/sql/log.cc:7772
      #14 0x0000563355c1265b in binlog_flush_cache (thd=thd@entry=0x14a010000d48, cache_mngr=cache_mngr@entry=0x14a010073178, end_ev=end_ev@entry=0x14a07c807fe0, all=all@entry=true, using_stmt=using_stmt@entry=false, using_trx=using_trx@entry=true) at /test/10.5_dbg/sql/log.cc:1772
      #15 0x0000563355c147e0 in binlog_commit_flush_trx_cache (thd=thd@entry=0x14a010000d48, all=all@entry=true, cache_mngr=cache_mngr@entry=0x14a010073178) at /test/10.5_dbg/sql/log.cc:1869
      #16 0x0000563355c14a62 in binlog_commit (hton=<optimized out>, thd=0x14a010000d48, all=<optimized out>) at /test/10.5_dbg/sql/log.cc:2227
      #17 0x0000563355aaa855 in commit_one_phase_2 (thd=thd@entry=0x14a010000d48, all=all@entry=true, trans=trans@entry=0x14a0100044e0, is_real_trans=true) at /test/10.5_dbg/sql/handler.cc:2032
      #18 0x0000563355aad274 in ha_commit_one_phase (thd=thd@entry=0x14a010000d48, all=all@entry=true) at /test/10.5_dbg/sql/handler.cc:2011
      #19 0x0000563355aae26f in ha_commit_trans (thd=thd@entry=0x14a010000d48, all=all@entry=true) at /test/10.5_dbg/sql/handler.cc:1805
      #20 0x000056335594f55a in trans_commit_implicit (thd=thd@entry=0x14a010000d48) at /test/10.5_dbg/sql/transaction.cc:329
      #21 0x00005633557fb52f in mysql_execute_command (thd=thd@entry=0x14a010000d48) at /test/10.5_dbg/sql/sql_parse.cc:3838
      #22 0x00005633557e8e51 in mysql_parse (thd=thd@entry=0x14a010000d48, rawbuf=rawbuf@entry=0x14a010012e70 "CREATE TABLE t3 (c CHAR(1)) ENGINE=INNODB", length=length@entry=41, parser_state=parser_state@entry=0x14a07c809310, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:8229
      #23 0x00005633557e8738 in wsrep_mysql_parse (thd=thd@entry=0x14a010000d48, rawbuf=0x14a010012e70 "CREATE TABLE t3 (c CHAR(1)) ENGINE=INNODB", length=41, parser_state=parser_state@entry=0x14a07c809310, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:8029
      #24 0x00005633557f72ec in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14a010000d48, packet=packet@entry=0x14a01000aac9 "CREATE TABLE t3 (c CHAR(1)) ENGINE=INNODB", packet_length=packet_length@entry=41, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_class.h:1329
      #25 0x00005633557f9c57 in do_command (thd=0x14a010000d48) at /test/10.5_dbg/sql/sql_parse.cc:1376
      #26 0x000056335593b6c9 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x56335890fbe8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1417
      #27 0x000056335593bb9a in handle_one_connection (arg=0x56335890fbe8) at /test/10.5_dbg/sql/sql_connect.cc:1319
      #28 0x000014a09072d609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #29 0x000014a090319133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.5.27 (dbg), 10.5.27 (opt), 10.6.16-11 (dbg), 10.6.16-11 (opt), 10.6.17-12 (dbg), 10.6.19 (dbg), 10.6.19 (opt), 10.11.9 (dbg), 10.11.9 (opt), 11.1.6 (opt), 11.4.2-1 (dbg), 11.4.2-1 (opt), 11.5.2 (dbg), 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.