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

Assertion `! thd->in_sub_stmt' failed in bool trans_rollback_stmt(THD*)

    XMLWordPrintable

Details

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

    Description

      Crash is similar to MDEV-26175

      --source include/galera_cluster.inc
       
      --connection node_1
      CREATE TABLE t1 (c INT);
      CREATE TABLE t2 (c INT);
      SET SESSION wsrep_trx_fragment_unit='STATEMENTS';
      SET SESSION wsrep_trx_fragment_size=2;
      DROP TABLE mysql.wsrep_streaming_log;
      CREATE TRIGGER tgr AFTER INSERT ON t2 FOR EACH ROW UPDATE t1 SET c=c;
      INSERT INTO t2 VALUES (1),(2);
       
      SET wsrep_trx_fragment_unit=DEFAULT;
      SET GLOBAL wsrep_trx_fragment_size=DEFAULT;
      DROP TRIGGER tgr;
      DROP TABLE t1, t2;
      

      Leads to:

      10.6.18 814dc46748d8c276f18c7664d8d14a543cff954c (Debug)

      mysqld: /test/10.6_dbg/sql/transaction.cc:556: bool trans_rollback_stmt(THD*): Assertion `! thd->in_sub_stmt' failed.
      

      11.5.0 486d42d812ffcb4fcfa5d3b219f3fd6eb10d052a (Debug)

      mysqld: /test/server_dbg/sql/transaction.cc:529: bool trans_rollback_stmt(THD*): Assertion `! thd->in_sub_stmt' failed.
      

      11.5.0 486d42d812ffcb4fcfa5d3b219f3fd6eb10d052a (Debug)

      Core was generated by `/test/GAL_MD250424-mariadb-11.5.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 0x149c20109700 (LWP 2018011))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055d4fa41ce94 in my_write_core (sig=sig@entry=6) at /test/server_dbg/mysys/stacktrace.c:424
      #2  0x000055d4f9cfd7ea in handle_fatal_signal (sig=6) at /test/server_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  0x0000149c56870859 in __GI_abort () at abort.c:79
      #6  0x0000149c56870729 in __assert_fail_base (fmt=0x149c56a06588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55d4fa60b6e3 "! thd->in_sub_stmt", file=0x55d4fa6344f8 "/test/server_dbg/sql/transaction.cc", line=529, function=<optimized out>) at assert.c:92
      #7  0x0000149c56881fd6 in __GI___assert_fail (assertion=assertion@entry=0x55d4fa60b6e3 "! thd->in_sub_stmt", file=file@entry=0x55d4fa6344f8 "/test/server_dbg/sql/transaction.cc", line=line@entry=529, function=function@entry=0x55d4fa634988 "bool trans_rollback_stmt(THD*)") at assert.c:101
      #8  0x000055d4f9b70396 in trans_rollback_stmt (thd=0x149bec000d48) at /test/server_dbg/sql/transaction.cc:529
      #9  0x000055d4f9fbd321 in Wsrep_client_service::bf_rollback (this=0x149bec007568) at /test/server_dbg/sql/wsrep_client_service.cc:361
      #10 0x000055d4fa5c2f1f in wsrep::transaction::after_statement (this=this@entry=0x149bec0075e8, lock=@0x149c20107110: {_M_device = 0x149bec007548, _M_owns = false}) at /test/server_dbg/wsrep-lib/src/transaction.cpp:866
      #11 0x000055d4fa5a465b in wsrep::client_state::after_statement (this=this@entry=0x149bec007580) at /test/server_dbg/wsrep-lib/src/client_state.cpp:265
      #12 0x000055d4f9901294 in wsrep_after_statement (thd=0x149bec000d48) at /test/server_dbg/sql/sql_class.h:5747
      #13 sp_head::execute (this=this@entry=0x149bec0720a0, thd=thd@entry=0x149bec000d48, merge_da_on_success=merge_da_on_success@entry=false) at /test/server_dbg/sql/sp_head.cc:1330
      #14 0x000055d4f990223a in sp_head::execute_trigger (this=0x149bec0720a0, thd=thd@entry=0x149bec000d48, db_name=0x149bec0764a8, table_name=0x149bec0764b8, grant_info=grant_info@entry=0x149bec074148) at /test/server_dbg/sql/sp_head.cc:1794
      #15 0x000055d4f9adff2c in Table_triggers_list::process_triggers (this=0x149bec078490, thd=thd@entry=0x149bec000d48, event=event@entry=TRG_EVENT_INSERT, time_type=time_type@entry=TRG_ACTION_AFTER, old_row_is_record1=old_row_is_record1@entry=true) at /test/server_dbg/sql/sql_trigger.cc:2525
      #16 0x000055d4f998ba34 in write_record (thd=thd@entry=0x149bec000d48, table=table@entry=0x149bec0767d8, info=info@entry=0x149c20107980, sink=sink@entry=0x0) at /test/server_dbg/sql/sql_insert.cc:2285
      #17 0x000055d4f9995872 in mysql_insert (thd=thd@entry=0x149bec000d48, table_list=<optimized out>, fields=@0x149bec005f20: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55d4fb018ec0 <end_of_list>, last = 0x149bec005f20, elements = 0}, <No data fields>}, values_list=@0x149bec005f68: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x149bec01b970, last = 0x149bec01ba30, elements = 2}, <No data fields>}, update_fields=@0x149bec005f50: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55d4fb018ec0 <end_of_list>, last = 0x149bec005f50, elements = 0}, <No data fields>}, update_values=@0x149bec005f38: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55d4fb018ec0 <end_of_list>, last = 0x149bec005f38, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/server_dbg/sql/sql_insert.cc:1165
      #18 0x000055d4f99d58f6 in mysql_execute_command (thd=thd@entry=0x149bec000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/server_dbg/sql/sql_parse.cc:4447
      #19 0x000055d4f99c56c3 in mysql_parse (thd=thd@entry=0x149bec000d48, rawbuf=rawbuf@entry=0x149bec01ac00 "INSERT INTO t2 VALUES (1),(2)", length=length@entry=29, parser_state=parser_state@entry=0x149c20108280) at /test/server_dbg/sql/sql_parse.cc:7815
      #20 0x000055d4f99c4fc9 in wsrep_mysql_parse (thd=thd@entry=0x149bec000d48, rawbuf=0x149bec01ac00 "INSERT INTO t2 VALUES (1),(2)", length=29, parser_state=parser_state@entry=0x149c20108280) at /test/server_dbg/sql/sql_parse.cc:7625
      #21 0x000055d4f99dc128 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x149bec000d48, packet=packet@entry=0x149bec00afd9 "INSERT INTO t2 VALUES (1),(2)", packet_length=packet_length@entry=29, blocking=blocking@entry=true) at /test/server_dbg/sql/sql_class.h:1619
      #22 0x000055d4f99de8c7 in do_command (thd=0x149bec000d48, blocking=blocking@entry=true) at /test/server_dbg/sql/sql_parse.cc:1405
      #23 0x000055d4f9b5a296 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55d4fded9d78, put_in_cache=put_in_cache@entry=true) at /test/server_dbg/sql/sql_connect.cc:1445
      #24 0x000055d4f9b5a768 in handle_one_connection (arg=0x55d4fded9d78) at /test/server_dbg/sql/sql_connect.cc:1347
      #25 0x0000149c56d81609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #26 0x0000149c5696d133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.5.25 (dbg), 10.6.18 (dbg), 10.11.8 (dbg), 11.0.6 (dbg), 11.1.5 (dbg), 11.2.4 (dbg), 11.4.2 (dbg), 11.5.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.5.25 (opt), 10.6.18 (opt), 10.11.8 (opt), 11.0.6 (opt), 11.1.5 (opt), 11.2.4 (opt), 11.4.2 (opt), 11.5.0 (opt)

      Attachments

        Activity

          People

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