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

Assertion `client_state_.mode() != wsrep::client_state::m_toi' failed in int wsrep::transaction::before_commit()

    XMLWordPrintable

Details

    Description

      CREATE TABLE t2 (d CHAR(1)KEY);
      SET autocommit=0;
      INSERT INTO t2 VALUES(1);
      CREATE TEMPORARY SEQUENCE seq1 ROW_FORMAT=REDUNDANT;
      

      Leads to:

      10.6.0 208233be5af55072d7ef80c37ddbc664bc51f342 (Debug)

      mysqld: /test/10.6_dbg/wsrep-lib/src/transaction.cpp:443: int wsrep::transaction::before_commit(): Assertion `client_state_.mode() != wsrep::client_state::m_toi' failed.
      

      10.6.0 208233be5af55072d7ef80c37ddbc664bc51f342 (Debug)

      Core was generated by `/test/GAL_MD230221-mariadb-10.6.0-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 0x15130c3ec700 (LWP 1332434))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x00005569a94ad4db in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x00005569a8c3d2df in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x000015131c6cc859 in __GI_abort () at abort.c:79
      #6  0x000015131c6cc729 in __assert_fail_base (fmt=0x15131c862588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5569a9ba31c8 "client_state_.mode() != wsrep::client_state::m_toi", file=0x5569a9ba2178 "/test/10.6_dbg/wsrep-lib/src/transaction.cpp", line=443, function=<optimized out>) at assert.c:92
      #7  0x000015131c6ddf36 in __GI___assert_fail (assertion=assertion@entry=0x5569a9ba31c8 "client_state_.mode() != wsrep::client_state::m_toi", file=file@entry=0x5569a9ba2178 "/test/10.6_dbg/wsrep-lib/src/transaction.cpp", line=line@entry=443, function=function@entry=0x5569a9ba31a0 "int wsrep::transaction::before_commit()") at assert.c:101
      #8  0x00005569a95ddbc2 in wsrep::transaction::before_commit (this=this@entry=0x1512a40073b0) at /test/10.6_dbg/wsrep-lib/src/transaction.cpp:530
      #9  0x00005569a8c404de in wsrep::client_state::before_commit (this=0x1512a4007348) at /test/10.6_dbg/wsrep-lib/include/wsrep/client_state.hpp:503
      #10 wsrep_before_commit (thd=thd@entry=0x1512a4000db8, all=all@entry=true) at /test/10.6_dbg/sql/wsrep_trans_observer.h:277
      #11 0x00005569a8c56df9 in ha_commit_trans (thd=thd@entry=0x1512a4000db8, all=all@entry=true) at /test/10.6_dbg/sql/handler.cc:1708
      #12 0x00005569a8ae798e in trans_commit_implicit (thd=thd@entry=0x1512a4000db8) at /test/10.6_dbg/sql/transaction.cc:329
      #13 0x00005569a8b90f17 in sequence_insert (thd=thd@entry=0x1512a4000db8, lex=0x1512a4004ec0, org_table_list=org_table_list@entry=0x1512a4013c88) at /test/10.6_dbg/sql/sql_sequence.cc:371
      #14 0x00005569a8a4db6a in mysql_create_table_no_lock (thd=thd@entry=0x1512a4000db8, db=db@entry=0x1512a4013ca0, table_name=table_name@entry=0x1512a4013cb0, create_info=create_info@entry=0x15130c3eaaa0, alter_info=alter_info@entry=0x15130c3ea9d0, is_trans=is_trans@entry=0x15130c3ea8f7, create_table_mode=0, table_list=0x1512a4013c88) at /test/10.6_dbg/sql/sql_table.cc:5473
      #15 0x00005569a8a4de83 in mysql_create_table (thd=thd@entry=0x1512a4000db8, create_table=create_table@entry=0x1512a4013c88, create_info=create_info@entry=0x15130c3eaaa0, alter_info=alter_info@entry=0x15130c3ea9d0) at /test/10.6_dbg/sql/sql_table.cc:5564
      #16 0x00005569a8a4f848 in Sql_cmd_create_table_like::execute (this=0x1512a4013c68, thd=0x1512a4000db8) at /test/10.6_dbg/sql/sql_table.cc:12145
      #17 0x00005569a897c71f in mysql_execute_command (thd=thd@entry=0x1512a4000db8) at /test/10.6_dbg/sql/sql_parse.cc:5946
      #18 0x00005569a8963360 in mysql_parse (thd=thd@entry=0x1512a4000db8, rawbuf=rawbuf@entry=0x1512a4013b60 "CREATE TEMPORARY SEQUENCE seq1 ROW_FORMAT=REDUNDANT", length=length@entry=51, parser_state=parser_state@entry=0x15130c3eb3d0) at /test/10.6_dbg/sql/sql_parse.cc:7972
      #19 0x00005569a8962cbc in wsrep_mysql_parse (thd=thd@entry=0x1512a4000db8, rawbuf=0x1512a4013b60 "CREATE TEMPORARY SEQUENCE seq1 ROW_FORMAT=REDUNDANT", length=51, parser_state=parser_state@entry=0x15130c3eb3d0) at /test/10.6_dbg/sql/sql_parse.cc:7786
      #20 0x00005569a89712a0 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1512a4000db8, packet=packet@entry=0x1512a400b319 "CREATE TEMPORARY SEQUENCE seq1 ROW_FORMAT=REDUNDANT", packet_length=packet_length@entry=51, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1295
      #21 0x00005569a897470c in do_command (thd=0x1512a4000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1397
      #22 0x00005569a8ad1bf5 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5569aaefb688, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #23 0x00005569a8ad22fb in handle_one_connection (arg=arg@entry=0x5569aaefb688) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #24 0x00005569a8f895cd in pfs_spawn_thread (arg=0x5569aaf72eb8) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #25 0x000015131cbda609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #26 0x000015131c7c9293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.5.10 85bec9d691bb69ed20beb565b03d5585b94624fe (Debug)

      mysqld: /test/10.5_dbg/wsrep-lib/src/transaction.cpp:443: int wsrep::transaction::before_commit(): Assertion `client_state_.mode() != wsrep::client_state::m_toi' failed.
      

      10.5.10 85bec9d691bb69ed20beb565b03d5585b94624fe (Debug)

      Core was generated by `/test/GAL_MD230221-mariadb-10.5.10-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 0x148ca9c73700 (LWP 1334232))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055d6447a289b in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:424
      #2  0x000055d643ef06f5 in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x0000148cdf966859 in __GI_abort () at abort.c:79
      #6  0x0000148cdf966729 in __assert_fail_base (fmt=0x148cdfafc588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55d644e9de48 "client_state_.mode() != wsrep::client_state::m_toi", file=0x55d644e9cdf8 "/test/10.5_dbg/wsrep-lib/src/transaction.cpp", line=443, function=<optimized out>) at assert.c:92
      #7  0x0000148cdf977f36 in __GI___assert_fail (assertion=assertion@entry=0x55d644e9de48 "client_state_.mode() != wsrep::client_state::m_toi", file=file@entry=0x55d644e9cdf8 "/test/10.5_dbg/wsrep-lib/src/transaction.cpp", line=line@entry=443, function=function@entry=0x55d644e9de20 "int wsrep::transaction::before_commit()") at assert.c:101
      #8  0x000055d6448d3282 in wsrep::transaction::before_commit (this=this@entry=0x148c6c007278) at /test/10.5_dbg/wsrep-lib/src/transaction.cpp:530
      #9  0x000055d643ef38f4 in wsrep::client_state::before_commit (this=0x148c6c007210) at /test/10.5_dbg/wsrep-lib/include/wsrep/client_state.hpp:503
      #10 wsrep_before_commit (thd=thd@entry=0x148c6c000db8, all=all@entry=true) at /test/10.5_dbg/sql/wsrep_trans_observer.h:277
      #11 0x000055d643f0a210 in ha_commit_trans (thd=thd@entry=0x148c6c000db8, all=all@entry=true) at /test/10.5_dbg/sql/handler.cc:1708
      #12 0x000055d643d9adc8 in trans_commit_implicit (thd=thd@entry=0x148c6c000db8) at /test/10.5_dbg/sql/transaction.cc:329
      #13 0x000055d643e4430d in sequence_insert (thd=thd@entry=0x148c6c000db8, lex=0x148c6c004e98, org_table_list=org_table_list@entry=0x148c6c013de8) at /test/10.5_dbg/sql/sql_sequence.cc:371
      #14 0x000055d643d00fbb in mysql_create_table_no_lock (thd=thd@entry=0x148c6c000db8, db=db@entry=0x148c6c013e00, table_name=table_name@entry=0x148c6c013e10, create_info=create_info@entry=0x148ca9c71a70, alter_info=alter_info@entry=0x148ca9c719a0, is_trans=is_trans@entry=0x148ca9c718c7, create_table_mode=0, table_list=0x148c6c013de8) at /test/10.5_dbg/sql/sql_table.cc:5473
      #15 0x000055d643d012d4 in mysql_create_table (thd=thd@entry=0x148c6c000db8, create_table=create_table@entry=0x148c6c013de8, create_info=create_info@entry=0x148ca9c71a70, alter_info=alter_info@entry=0x148ca9c719a0) at /test/10.5_dbg/sql/sql_table.cc:5564
      #16 0x000055d643d02c9a in Sql_cmd_create_table_like::execute (this=0x148c6c013dc8, thd=0x148c6c000db8) at /test/10.5_dbg/sql/sql_table.cc:12142
      #17 0x000055d643c2ff99 in mysql_execute_command (thd=thd@entry=0x148c6c000db8) at /test/10.5_dbg/sql/sql_parse.cc:6024
      #18 0x000055d643c16685 in mysql_parse (thd=thd@entry=0x148c6c000db8, rawbuf=rawbuf@entry=0x148c6c013cc0 "CREATE TEMPORARY SEQUENCE seq1 ROW_FORMAT=REDUNDANT", length=length@entry=51, parser_state=parser_state@entry=0x148ca9c723d0, 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:8063
      #19 0x000055d643c15fb0 in wsrep_mysql_parse (thd=thd@entry=0x148c6c000db8, rawbuf=0x148c6c013cc0 "CREATE TEMPORARY SEQUENCE seq1 ROW_FORMAT=REDUNDANT", length=51, parser_state=parser_state@entry=0x148ca9c723d0, 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:7866
      #20 0x000055d643c2485e in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x148c6c000db8, packet=packet@entry=0x148c6c00b479 "CREATE TEMPORARY SEQUENCE seq1 ROW_FORMAT=REDUNDANT", packet_length=packet_length@entry=51, 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:1257
      #21 0x000055d643c27fa6 in do_command (thd=0x148c6c000db8) at /test/10.5_dbg/sql/sql_parse.cc:1370
      #22 0x000055d643d8502e in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55d6483dc898, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1410
      #23 0x000055d643d85735 in handle_one_connection (arg=arg@entry=0x55d6483dc898) at /test/10.5_dbg/sql/sql_connect.cc:1312
      #24 0x000055d64423dc39 in pfs_spawn_thread (arg=0x55d6484580d8) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #25 0x0000148cdfe74609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #26 0x0000148cdfa63293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.4.19 245d33db4e0586df4fe28362fb002cef0151a1c9 (Debug)

      mysqld: /test/10.4_dbg/wsrep-lib/src/transaction.cpp:443: int wsrep::transaction::before_commit(): Assertion `client_state_.mode() != wsrep::client_state::m_toi' failed.
      

      10.4.19 245d33db4e0586df4fe28362fb002cef0151a1c9 (Debug)

      Core was generated by `/test/GAL_MD230221-mariadb-10.4.19-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 0x1458440bb700 (LWP 1336214))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000557ce79dedcd in my_write_core (sig=sig@entry=6) at /test/10.4_dbg/mysys/stacktrace.c:386
      #2  0x0000557ce70ec370 in handle_fatal_signal (sig=6) at /test/10.4_dbg/sql/signal_handler.cc:344
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x000014587abdd859 in __GI_abort () at abort.c:79
      #6  0x000014587abdd729 in __assert_fail_base (fmt=0x14587ad73588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x557ce8008d88 "client_state_.mode() != wsrep::client_state::m_toi", file=0x557ce8007d38 "/test/10.4_dbg/wsrep-lib/src/transaction.cpp", line=443, function=<optimized out>) at assert.c:92
      #7  0x000014587abeef36 in __GI___assert_fail (assertion=assertion@entry=0x557ce8008d88 "client_state_.mode() != wsrep::client_state::m_toi", file=file@entry=0x557ce8007d38 "/test/10.4_dbg/wsrep-lib/src/transaction.cpp", line=line@entry=443, function=function@entry=0x557ce8008d60 "int wsrep::transaction::before_commit()") at assert.c:101
      #8  0x0000557ce7a7ccfe in wsrep::transaction::before_commit (this=this@entry=0x1457f0006fa0) at /test/10.4_dbg/wsrep-lib/src/transaction.cpp:530
      #9  0x0000557ce70eea54 in wsrep::client_state::before_commit (this=0x1457f0006f38) at /test/10.4_dbg/wsrep-lib/include/wsrep/client_state.hpp:503
      #10 wsrep_before_commit (thd=thd@entry=0x1457f0000d90, all=all@entry=true) at /test/10.4_dbg/sql/wsrep_trans_observer.h:273
      #11 0x0000557ce710421b in ha_commit_trans (thd=thd@entry=0x1457f0000d90, all=all@entry=true) at /test/10.4_dbg/sql/handler.cc:1580
      #12 0x0000557ce6f75cf1 in trans_commit_implicit (thd=thd@entry=0x1457f0000d90) at /test/10.4_dbg/sql/transaction.cc:301
      #13 0x0000557ce701587c in sequence_insert (thd=thd@entry=0x1457f0000d90, lex=0x1457f0004c00, org_table_list=org_table_list@entry=0x1457f0013330) at /test/10.4_dbg/sql/sql_sequence.cc:371
      #14 0x0000557ce6ee739b in mysql_create_table_no_lock (thd=thd@entry=0x1457f0000d90, db=db@entry=0x1457f0013348, table_name=table_name@entry=0x1457f0013358, create_info=create_info@entry=0x1458440b8810, alter_info=alter_info@entry=0x1458440b8750, is_trans=is_trans@entry=0x1458440b8677, create_table_mode=0, table_list=0x1457f0013330) at /test/10.4_dbg/sql/sql_table.cc:5220
      #15 0x0000557ce6ee7694 in mysql_create_table (thd=thd@entry=0x1457f0000d90, create_table=create_table@entry=0x1457f0013330, create_info=create_info@entry=0x1458440b8810, alter_info=alter_info@entry=0x1458440b8750) at /test/10.4_dbg/sql/sql_table.cc:5302
      #16 0x0000557ce6ee8fd7 in Sql_cmd_create_table_like::execute (this=0x1457f0013310, thd=0x1457f0000d90) at /test/10.4_dbg/sql/sql_table.cc:11525
      #17 0x0000557ce6e1f702 in mysql_execute_command (thd=thd@entry=0x1457f0000d90) at /test/10.4_dbg/sql/sql_parse.cc:6161
      #18 0x0000557ce6e21c49 in mysql_parse (thd=thd@entry=0x1457f0000d90, rawbuf=rawbuf@entry=0x1457f0013208 "CREATE TEMPORARY SEQUENCE seq1 ROW_FORMAT=REDUNDANT", length=length@entry=51, parser_state=parser_state@entry=0x1458440ba490, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7959
      #19 0x0000557ce6e22ce3 in wsrep_mysql_parse (thd=thd@entry=0x1457f0000d90, rawbuf=0x1457f0013208 "CREATE TEMPORARY SEQUENCE seq1 ROW_FORMAT=REDUNDANT", length=51, parser_state=parser_state@entry=0x1458440ba490, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7763
      #20 0x0000557ce6e24517 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1457f0000d90, packet=packet@entry=0x1457f001b641 "CREATE TEMPORARY SEQUENCE seq1 ROW_FORMAT=REDUNDANT", packet_length=packet_length@entry=51, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_class.h:1170
      #21 0x0000557ce6e27cb2 in do_command (thd=0x1457f0000d90) at /test/10.4_dbg/sql/sql_parse.cc:1373
      #22 0x0000557ce6f61feb in do_handle_one_connection (connect=connect@entry=0x557cea065190) at /test/10.4_dbg/sql/sql_connect.cc:1412
      #23 0x0000557ce6f6210a in handle_one_connection (arg=0x557cea065190) at /test/10.4_dbg/sql/sql_connect.cc:1316
      #24 0x000014587b19a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #25 0x000014587acda293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.19 (dbg), 10.5.10 (dbg), 10.6.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.38 (dbg), 10.3.29 (dbg)

      Attachments

        Activity

          People

            sysprg Julius Goryavsky
            ramesh Ramesh Sivaraman
            Votes:
            1 Vote for this issue
            Watchers:
            6 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.