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

Assertion `!thd->rgi_slave' failed on INSERT w/ parallel slave

    XMLWordPrintable

Details

    • Not for Release Notes

    Description

      Sporadic. Can crash many times in a row, then many times without a crash; please use --repeat etc.

      --source include/have_binlog_format_row.inc
      --source include/master-slave.inc
      --source include/have_innodb.inc
      --connection slave
      STOP SLAVE;
      SET GLOBAL slave_parallel_threads=10;
      START SLAVE;
      --connection master
      CREATE TABLE t1 (c INT) ENGINE=InnoDB;
      CREATE GLOBAL TEMPORARY TABLE t (c INT) ENGINE=InnoDB ON COMMIT DELETE ROWS;
      SET SESSION gtid_domain_id=1;
      DROP TABLE t;
      CREATE TABLE t (c INT) ENGINE=InnoDB;
      INSERT INTO t VALUES (1);
      --source include/rpl_end.inc
      

      Leads to:

      MDEV-35915-7 CS 12.2.0 87e89a3e8300009e00c1c480ffbb2062db9a87ec (Debug, Clang 21.1.3-20250923) Build 14/10/2025

      Core was generated by `/test/MDEV-35915_7_MD141025-mariadb-12.2.0-linux-x86_64-dbg/bin/mariadbd --defa'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
       
      [Current thread is 1 (LWP 1381805)]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
      #3  0x00007aa35644526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x00007aa3564288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x00007aa35642881b in __assert_fail_base (fmt=0x7aa3565d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x609e6e7a4b47 "!thd->rgi_slave", file=file@entry=0x609e6e6dde7a "/test/bb-12.2-nikita-global-tmp_dbg/sql/sql_table.cc", line=line@entry=6244, function=function@entry=0x609e6e76c78c "my_bool open_global_temporary_table(THD *, TABLE_SHARE *, TABLE_LIST *, MDL_ticket *)") at ./assert/assert.c:94
      #6  0x00007aa35643b507 in __assert_fail (assertion=0x609e6e7a4b47 "!thd->rgi_slave", file=0x609e6e6dde7a "/test/bb-12.2-nikita-global-tmp_dbg/sql/sql_table.cc", line=6244, function=0x609e6e76c78c "my_bool open_global_temporary_table(THD *, TABLE_SHARE *, TABLE_LIST *, MDL_ticket *)") at ./assert/assert.c:103
      #7  0x0000609e6f4cad1b in open_global_temporary_table (thd=0x7aa220000d58, source=0x7aa220019420, out_table=0x7aa220017508, mdl_ticket=0x7aa220019010)at /test/bb-12.2-nikita-global-tmp_dbg/sql/sql_table.cc:6244
      #8  0x0000609e6f246269 in open_table (thd=0x7aa220000d58, table_list=0x7aa220017508, ot_ctx=0x7aa31e9b3308)at /test/bb-12.2-nikita-global-tmp_dbg/sql/sql_base.cc:2351
      #9  0x0000609e6f24b2d1 in open_and_process_table (thd=0x7aa220000d58, tables=0x7aa220017508, counter=0x7aa31e9b33bc, flags=0, prelocking_strategy=0x7aa31e9b3420, has_prelocking_list=false, ot_ctx=0x7aa31e9b3308)at /test/bb-12.2-nikita-global-tmp_dbg/sql/sql_base.cc:4308
      #10 0x0000609e6f24a11b in open_tables (thd=0x7aa220000d58, options=@0x7aa220006734: {m_options = DDL_options_st::OPT_NONE}, start=0x7aa31e9b33d0, counter=0x7aa31e9b33bc, flags=0, prelocking_strategy=0x7aa31e9b3420)at /test/bb-12.2-nikita-global-tmp_dbg/sql/sql_base.cc:4791
      #11 0x0000609e6f24ceca in open_and_lock_tables (thd=0x7aa220000d58, options=@0x7aa220006734: {m_options = DDL_options_st::OPT_NONE}, tables=0x7aa220017508, derived=false, flags=0, prelocking_strategy=0x7aa31e9b3420)at /test/bb-12.2-nikita-global-tmp_dbg/sql/sql_base.cc:5779
      #12 0x0000609e6f0cf53e in open_and_lock_tables (thd=0x7aa220000d58, tables=0x7aa220017508, derived=false, flags=0)at /test/bb-12.2-nikita-global-tmp_dbg/sql/sql_base.h:544
      #13 0x0000609e6f0c32fd in Rows_log_event::do_apply_event (this=0x7aa24c04f278, rgi=0x7aa24c04d520)at /test/bb-12.2-nikita-global-tmp_dbg/sql/log_event_server.cc:4962
      #14 0x0000609e6f0dd6a2 in Log_event::apply_event (this=0x7aa24c04f278, rgi=0x7aa24c04d520)at /test/bb-12.2-nikita-global-tmp_dbg/sql/log_event.cc:3984
      #15 0x0000609e6f1c659b in apply_event_and_update_pos_apply (ev=0x7aa24c04f278, thd=0x7aa220000d58, rgi=0x7aa24c04d520, reason=0)at /test/bb-12.2-nikita-global-tmp_dbg/sql/slave.cc:3615
      #16 0x0000609e6f1c699b in apply_event_and_update_pos_for_parallel (ev=0x7aa24c04f278, thd=0x7aa220000d58, rgi=0x7aa24c04d520)at /test/bb-12.2-nikita-global-tmp_dbg/sql/slave.cc:3822
      #17 0x0000609e6f668735 in rpt_handle_event (qev=0x7aa24c04f3e8, rpt=0x7aa24c00e018)at /test/bb-12.2-nikita-global-tmp_dbg/sql/rpl_parallel.cc:66
      #18 0x0000609e6f666593 in handle_rpl_parallel_thread (arg=0x7aa24c00e018)at /test/bb-12.2-nikita-global-tmp_dbg/sql/rpl_parallel.cc:1597
      #19 0x00007aa35649ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #20 0x00007aa356529c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Attachments

        Issue Links

          Activity

            People

              nikitamalyavin Nikita Malyavin
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: