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

Assertion `state() == s_preparing || (is_xa() && state() == s_replaying) || (ret && (state() == s_must_abort || state() == s_must_replay || state() == s_cert_failed || state() == s_aborted))' failed

    XMLWordPrintable

Details

    Description

      SET SESSION query_prealloc_size=8192;
      SET max_session_mem_used=50000;
      CREATE TABLE t1 (c1 INT NOT NULL) ENGINE=InnoDB ;
      UPDATE t1 SET c1='1';
      SET wsrep_trx_fragment_size=1;
      SET SESSION AUTOCOMMIT=0;
      INSERT INTO t1 VALUES (1);
      SET @inserted_value=REPEAT ('z', 257);
      CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB ;
      SELECT * FROM t1 WHERE c1='two';
      UPDATE t1 SET c1='2';
      INSERT INTO t2 VALUES (2);
      INSERT INTO t2 VALUES (3);
      INSERT INTO t2 VALUES (4);
      INSERT INTO t2 VALUES (5);
      CREATE VIEW v1 AS SELECT c1 FROM t1 WHERE c1 IN (SELECT a FROM t2) GROUP BY c1;
      

      Leads to

      10.6.4 beb401b25fa3e34ea431da990f1ead6bbc23a82f (Debug)

      mysqld: /test/10.6_dbg/wsrep-lib/src/transaction.cpp:376: int wsrep::transaction::before_prepare(wsrep::unique_lock<wsrep::mutex>&): Assertion `state() == s_preparing || (is_xa() && state() == s_replaying) || (ret && (state() == s_must_abort || state() == s_must_replay || state() == s_cert_failed || state() == s_aborted))' failed.
      

      10.6.4 beb401b25fa3e34ea431da990f1ead6bbc23a82f (Debug)

      Core was generated by `/test/GAL_MD280721-mariadb-10.6.4-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 0x14d7649c5700 (LWP 1940516))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055c3168dbfdd in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x000055c31608f926 in handle_fatal_signal (sig=6) at /test/10.6_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  0x000014d776bb8859 in __GI_abort () at abort.c:79
      #6  0x000014d776bb8729 in __assert_fail_base (fmt=0x14d776d4e588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55c316fdba28 "state() == s_preparing || (is_xa() && state() == s_replaying) || (ret && (state() == s_must_abort || state() == s_must_replay || state() == s_cert_failed || state() == s_aborted))", file=0x55c316fdaab8 "/test/10.6_dbg/wsrep-lib/src/transaction.cpp", line=376, function=<optimized out>) at assert.c:92
      #7  0x000014d776bc9f36 in __GI___assert_fail (assertion=assertion@entry=0x55c316fdba28 "state() == s_preparing || (is_xa() && state() == s_replaying) || (ret && (state() == s_must_abort || state() == s_must_replay || state() == s_cert_failed || state() == s_aborted))", file=file@entry=0x55c316fdaab8 "/test/10.6_dbg/wsrep-lib/src/transaction.cpp", line=line@entry=376, function=function@entry=0x55c316fdb858 "int wsrep::transaction::before_prepare(wsrep::unique_lock<wsrep::mutex>&)") at assert.c:101
      #8  0x000055c316a1819c in wsrep::transaction::before_prepare (this=this@entry=0x14d708007580, lock=@0x14d7649c3320: {_M_device = 0x14d7080074e0, _M_owns = true}) at /test/10.6_dbg/wsrep-lib/src/transaction.cpp:372
      #9  0x000055c316a18350 in wsrep::transaction::before_commit (this=this@entry=0x14d708007580) at /test/10.6_dbg/wsrep-lib/src/transaction.cpp:456
      #10 0x000055c316092b07 in wsrep::client_state::before_commit (this=0x14d708007518) at /test/10.6_dbg/wsrep-lib/include/wsrep/client_state.hpp:503
      #11 wsrep_before_commit (thd=thd@entry=0x14d708000db8, all=all@entry=true) at /test/10.6_dbg/sql/wsrep_trans_observer.h:277
      #12 0x000055c3160a958d in ha_commit_trans (thd=thd@entry=0x14d708000db8, all=all@entry=true) at /test/10.6_dbg/sql/handler.cc:1781
      #13 0x000055c315f247c8 in trans_commit_implicit (thd=thd@entry=0x14d708000db8) at /test/10.6_dbg/sql/transaction.cc:329
      #14 0x000055c315da9bd6 in mysql_execute_command (thd=thd@entry=0x14d708000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.6_dbg/sql/sql_parse.cc:3750
      #15 0x000055c315d96761 in mysql_parse (thd=thd@entry=0x14d708000db8, rawbuf=rawbuf@entry=0x14d7080428a0 "CREATE VIEW v1 AS SELECT c1 FROM t1 WHERE c1 IN (SELECT a FROM t2) GROUP BY c1", length=length@entry=78, parser_state=parser_state@entry=0x14d7649c4400) at /test/10.6_dbg/sql/sql_parse.cc:8026
      #16 0x000055c315d960f5 in wsrep_mysql_parse (thd=thd@entry=0x14d708000db8, rawbuf=0x14d7080428a0 "CREATE VIEW v1 AS SELECT c1 FROM t1 WHERE c1 IN (SELECT a FROM t2) GROUP BY c1", length=78, parser_state=parser_state@entry=0x14d7649c4400) at /test/10.6_dbg/sql/sql_parse.cc:7840
      #17 0x000055c315da53ad in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14d708000db8, packet=packet@entry=0x14d70800b769 "CREATE VIEW v1 AS SELECT c1 FROM t1 WHERE c1 IN (SELECT a FROM t2) GROUP BY c1", packet_length=packet_length@entry=78, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1340
      #18 0x000055c315da87b7 in do_command (thd=0x14d708000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1404
      #19 0x000055c315f0e491 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55c318655018, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #20 0x000055c315f0ea99 in handle_one_connection (arg=arg@entry=0x55c318655018) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #21 0x000055c3163c0563 in pfs_spawn_thread (arg=0x55c3186c9f28) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #22 0x000014d7770c7609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #23 0x000014d776cb5293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.5.12 e329dc8d86b91258df8173568684ac40079e3a8c (Debug)

      mysqld: /test/10.5_dbg/wsrep-lib/src/transaction.cpp:376: int wsrep::transaction::before_prepare(wsrep::unique_lock<wsrep::mutex>&): Assertion `state() == s_preparing || (is_xa() && state() == s_replaying) || (ret && (state() == s_must_abort || state() == s_must_replay || state() == s_cert_failed || state() == s_aborted))' failed.
      

      10.5.12 e329dc8d86b91258df8173568684ac40079e3a8c (Debug)

      Core was generated by `/test/GAL_MD250621-mariadb-10.5.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 0x14824c10c700 (LWP 1942208))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055e8e66b03c6 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:424
      #2  0x000055e8e5df72ee in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x000014824f99a859 in __GI_abort () at abort.c:79
      #6  0x000014824f99a729 in __assert_fail_base (fmt=0x14824fb30588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55e8e6dbcae8 "state() == s_preparing || (is_xa() && state() == s_replaying) || (ret && (state() == s_must_abort || state() == s_must_replay || state() == s_cert_failed || state() == s_aborted))", file=0x55e8e6dbbb78 "/test/10.5_dbg/wsrep-lib/src/transaction.cpp", line=376, function=<optimized out>) at assert.c:92
      #7  0x000014824f9abf36 in __GI___assert_fail (assertion=assertion@entry=0x55e8e6dbcae8 "state() == s_preparing || (is_xa() && state() == s_replaying) || (ret && (state() == s_must_abort || state() == s_must_replay || state() == s_cert_failed || state() == s_aborted))", file=file@entry=0x55e8e6dbbb78 "/test/10.5_dbg/wsrep-lib/src/transaction.cpp", line=line@entry=376, function=function@entry=0x55e8e6dbc918 "int wsrep::transaction::before_prepare(wsrep::unique_lock<wsrep::mutex>&)") at assert.c:101
      #8  0x000055e8e67ee3bc in wsrep::transaction::before_prepare (this=this@entry=0x1481dc0072b8, lock=@0x14824c10a290: {_M_device = 0x1481dc007218, _M_owns = true}) at /test/10.5_dbg/wsrep-lib/src/transaction.cpp:372
      #9  0x000055e8e67ee570 in wsrep::transaction::before_commit (this=this@entry=0x1481dc0072b8) at /test/10.5_dbg/wsrep-lib/src/transaction.cpp:456
      #10 0x000055e8e5dfa4ea in wsrep::client_state::before_commit (this=0x1481dc007250) at /test/10.5_dbg/wsrep-lib/include/wsrep/client_state.hpp:503
      #11 wsrep_before_commit (thd=thd@entry=0x1481dc000db8, all=all@entry=true) at /test/10.5_dbg/sql/wsrep_trans_observer.h:277
      #12 0x000055e8e5e10fb7 in ha_commit_trans (thd=thd@entry=0x1481dc000db8, all=all@entry=true) at /test/10.5_dbg/sql/handler.cc:1708
      #13 0x000055e8e5ca065c in trans_commit_implicit (thd=thd@entry=0x1481dc000db8) at /test/10.5_dbg/sql/transaction.cc:329
      #14 0x000055e8e5b2dee1 in mysql_execute_command (thd=thd@entry=0x1481dc000db8) at /test/10.5_dbg/sql/sql_parse.cc:3814
      #15 0x000055e8e5b19eec in mysql_parse (thd=thd@entry=0x1481dc000db8, rawbuf=rawbuf@entry=0x1481dc3b55b0 "CREATE VIEW v1 AS SELECT c1 FROM t1 WHERE c1 IN (SELECT a FROM t2) GROUP BY c1", length=length@entry=78, parser_state=parser_state@entry=0x14824c10b3d0, 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:8096
      #16 0x000055e8e5b19817 in wsrep_mysql_parse (thd=thd@entry=0x1481dc000db8, rawbuf=0x1481dc3b55b0 "CREATE VIEW v1 AS SELECT c1 FROM t1 WHERE c1 IN (SELECT a FROM t2) GROUP BY c1", length=78, parser_state=parser_state@entry=0x14824c10b3d0, 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:7899
      #17 0x000055e8e5b29251 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1481dc000db8, packet=packet@entry=0x1481dc00b4b9 "CREATE VIEW v1 AS SELECT c1 FROM t1 WHERE c1 IN (SELECT a FROM t2) GROUP BY c1", packet_length=packet_length@entry=78, 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:1271
      #18 0x000055e8e5b2cac3 in do_command (thd=0x1481dc000db8) at /test/10.5_dbg/sql/sql_parse.cc:1370
      #19 0x000055e8e5c8a6b2 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55e8e87e1b38, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1410
      #20 0x000055e8e5c8adb9 in handle_one_connection (arg=arg@entry=0x55e8e87e1b38) at /test/10.5_dbg/sql/sql_connect.cc:1312
      #21 0x000055e8e61475c7 in pfs_spawn_thread (arg=0x55e8e884de78) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #22 0x000014824fea9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #23 0x000014824fa97293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        Activity

          People

            sysprg Julius Goryavsky
            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.