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

Assertion `!thd->rgi_slave' failed on START SLAVE

    XMLWordPrintable

Details

    • Not for Release Notes
    • Q4/2025 Server Development

    Description

      --source include/master-slave.inc
       
      CREATE OR REPLACE GLOBAL TEMPORARY TABLE mysql.gtid_slave_pos_bkp LIKE mysql.gtid_slave_pos;
      CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root';
      START SLAVE;
      

      Leads to

      MDEV-35915 CS 12.2.0 c7ea08421d34fa7d45e27919a869ade968bd88c4 (Optimized) Build 21/10/2025

      Core was generated by `/test/mtest/MDEV-35915/GAL_MD211025-mariadb-12.2.0-linux-x86_64-opt/bin/mariadb'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __pthread_kill_implementation (no_tid=0, signo=11, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
       
      [Current thread is 1 (LWP 1928538)]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=11, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=11, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=<optimized out>, signo=11)at ./nptl/pthread_kill.c:89
      #3  0x00005cf3b47621c8 in handle_fatal_signal (sig=11)at /test/mtest/MDEV-35915/12.2_opt/sql/signal_handler.cc:298
      #4  <signal handler called>
      #5  0x00005cf3b4594b81 in open_global_temporary_table (thd=thd@entry=0x752b040015b8, source=source@entry=0x752b04019c30, out_table=out_table@entry=0x7546183d8b80, mdl_ticket=mdl_ticket@entry=0x752b04017590)at /test/mtest/MDEV-35915/12.2_opt/sql/sql_table.cc:6324
      #6  0x00005cf3b444cd85 in open_table (thd=thd@entry=0x752b040015b8, table_list=table_list@entry=0x7546183d8b80, ot_ctx=ot_ctx@entry=0x7546183d8a90)at /test/mtest/MDEV-35915/12.2_opt/sql/sql_base.cc:2351
      #7  0x00005cf3b4456a8a in open_and_process_table (ot_ctx=0x7546183d8a90, has_prelocking_list=<optimized out>, prelocking_strategy=<optimized out>, flags=<optimized out>, counter=<optimized out>, tables=0x7546183d8b80, thd=0x752b040015b8) at /test/mtest/MDEV-35915/12.2_opt/sql/sql_base.cc:4308
      #8  open_tables (thd=thd@entry=0x752b040015b8, options=@0x752b04006dbc: {m_options = DDL_options_st::OPT_NONE}, start=start@entry=0x7546183d8b18, counter=counter@entry=0x7546183d8b2c, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x7546183d8b78)at /test/mtest/MDEV-35915/12.2_opt/sql/sql_base.cc:4791
      #9  0x00005cf3b44579e9 in open_and_lock_tables (thd=thd@entry=0x752b040015b8, options=<optimized out>, tables=<optimized out>, tables@entry=0x7546183d8b80, derived=derived@entry=false, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x7546183d8b78)at /test/mtest/MDEV-35915/12.2_opt/sql/sql_base.cc:5779
      #10 0x00005cf3b45f6686 in open_and_lock_tables (flags=0, derived=false, tables=0x7546183d8b80, thd=0x752b040015b8)at /test/mtest/MDEV-35915/12.2_opt/sql/sql_base.h:544
      #11 find_gtid_pos_tables_cb (thd=thd@entry=0x752b040015b8, table_name=table_name@entry=0x752b0400d3b0, arg=arg@entry=0x7546183d95f0)at /test/mtest/MDEV-35915/12.2_opt/sql/rpl_rli.cc:1998
      #12 0x00005cf3b45f5e03 in scan_all_gtid_slave_pos_table (thd=0x752b040015b8, cb=0x5cf3b45f6440 <find_gtid_pos_tables_cb(THD*, LEX_CSTRING*, void*)>, cb_data=0x7546183d95f0)at /test/mtest/MDEV-35915/12.2_opt/sql/rpl_rli.cc:1738
      #13 0x00005cf3b45f944b in find_gtid_slave_pos_tables (thd=0x752b040015b8)at /test/mtest/MDEV-35915/12.2_opt/sql/rpl_rli.cc:2040
      #14 0x00005cf3b440198e in handle_slave_sql (arg=0x5cf3f3fc3260)at /test/mtest/MDEV-35915/12.2_opt/sql/slave.cc:5368
      #15 0x00007549f809caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #16 0x00007549f8129c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      MDEV-35915 CS 12.2.0 c7ea08421d34fa7d45e27919a869ade968bd88c4 (Debug) Build 21/10/2025

      mariadbd: /test/mtest/MDEV-35915/12.2_dbg/sql/sql_table.cc:6244: my_bool open_global_temporary_table(THD*, TABLE_SHARE*, TABLE_LIST*, MDL_ticket*): Assertion `!thd->rgi_slave' failed.
      

      MDEV-35915 CS 12.2.0 c7ea08421d34fa7d45e27919a869ade968bd88c4 (Debug) Build 21/10/2025

      Core was generated by `/test/mtest/MDEV-35915/GAL_MD211025-mariadb-12.2.0-linux-x86_64-dbg/bin/mariadb'.
      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 1396338)]
      (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=6)at ./nptl/pthread_kill.c:89
      #3  0x000064aafbf4fb7e in my_write_core (sig=6)at /test/mtest/MDEV-35915/12.2_dbg/mysys/stacktrace.c:424
      #4  0x000064aafb60da95 in handle_fatal_signal (sig=6)at /test/mtest/MDEV-35915/12.2_dbg/sql/signal_handler.cc:298
      #5  <signal handler called>
      #6  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
      #7  __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
      #8  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
      #9  0x00007ed1e824527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #10 0x00007ed1e82288ff in __GI_abort () at ./stdlib/abort.c:79
      #11 0x00007ed1e822881b in __assert_fail_base (fmt=0x7ed1e83d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x64aafc11c446 "!thd->rgi_slave", file=file@entry=0x64aafc11ab20 "/test/mtest/MDEV-35915/12.2_dbg/sql/sql_table.cc", line=line@entry=6244, function=function@entry=0x64aafc11c458 "my_bool open_global_temporary_table(THD*, TABLE_SHARE*, TABLE_LIST*, MDL_ticket*)") at ./assert/assert.c:96
      #12 0x00007ed1e823b517 in __assert_fail (assertion=0x64aafc11c446 "!thd->rgi_slave", file=0x64aafc11ab20 "/test/mtest/MDEV-35915/12.2_dbg/sql/sql_table.cc", line=6244, function=0x64aafc11c458 "my_bool open_global_temporary_table(THD*, TABLE_SHARE*, TABLE_LIST*, MDL_ticket*)") at ./assert/assert.c:105
      #13 0x000064aafb30bf94 in open_global_temporary_table (thd=0x7eb2f0001b18, source=0x7eb2f001ec30, out_table=0x7ed1dc0adab0, mdl_ticket=0x7eb2f001c450)at /test/mtest/MDEV-35915/12.2_dbg/sql/sql_table.cc:6244
      #14 0x000064aafb11ee07 in open_table (thd=0x7eb2f0001b18, table_list=0x7ed1dc0adab0, ot_ctx=0x7ed1dc0ad960)at /test/mtest/MDEV-35915/12.2_dbg/sql/sql_base.cc:2351
      #15 0x000064aafb1234b0 in open_and_process_table (thd=0x7eb2f0001b18, tables=0x7ed1dc0adab0, counter=0x7ed1dc0ad9f4, flags=0, prelocking_strategy=0x7ed1dc0ada48, has_prelocking_list=false, ot_ctx=0x7ed1dc0ad960)at /test/mtest/MDEV-35915/12.2_dbg/sql/sql_base.cc:4308
      #16 0x000064aafb1245ac in open_tables (thd=0x7eb2f0001b18, options=@0x7eb2f00074f4: {m_options = (DDL_options_st::OPT_LIKE | DDL_options_st::OPT_OR_REPLACE_SLAVE_GENERATED | DDL_options_st::OPT_CREATE_SELECT | DDL_options_st::OPT_IMPORT_TABLESPACE | unknown: 0xa5a5a401)}, start=0x7ed1dc0ad9d8, counter=0x7ed1dc0ad9f4, flags=0, prelocking_strategy=0x7ed1dc0ada48)at /test/mtest/MDEV-35915/12.2_dbg/sql/sql_base.cc:4791
      #17 0x000064aafb1260ed in open_and_lock_tables (thd=0x7eb2f0001b18, options=@0x7eb2f00074f4: {m_options = (DDL_options_st::OPT_LIKE | DDL_options_st::OPT_OR_REPLACE_SLAVE_GENERATED | DDL_options_st::OPT_CREATE_SELECT | DDL_options_st::OPT_IMPORT_TABLESPACE | unknown: 0xa5a5a401)}, tables=0x7ed1dc0adab0, derived=false, flags=0, prelocking_strategy=0x7ed1dc0ada48)at /test/mtest/MDEV-35915/12.2_dbg/sql/sql_base.cc:5779
      #18 0x000064aafb1356b0 in open_and_lock_tables (thd=0x7eb2f0001b18, tables=0x7ed1dc0adab0, derived=false, flags=0)at /test/mtest/MDEV-35915/12.2_dbg/sql/sql_base.h:544
      #19 0x000064aafb3b9fe8 in find_gtid_pos_tables_cb (thd=0x7eb2f0001b18, table_name=0x7eb2f000ff80, arg=0x7ed1dc0ae530)at /test/mtest/MDEV-35915/12.2_dbg/sql/rpl_rli.cc:1998
      #20 0x000064aafb3b9455 in scan_all_gtid_slave_pos_table (thd=0x7eb2f0001b18, cb=0x64aafb3b9f31 <find_gtid_pos_tables_cb(THD*, LEX_CSTRING*, void*)>, cb_data=0x7ed1dc0ae530)at /test/mtest/MDEV-35915/12.2_dbg/sql/rpl_rli.cc:1738
      #21 0x000064aafb3ba198 in find_gtid_slave_pos_tables (thd=0x7eb2f0001b18)at /test/mtest/MDEV-35915/12.2_dbg/sql/rpl_rli.cc:2040
      #22 0x000064aafb0bad2f in handle_slave_sql (arg=0x64ab3b66df80)at /test/mtest/MDEV-35915/12.2_dbg/sql/slave.cc:5368
      #23 0x00007ed1e829caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #24 0x00007ed1e8329c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Attachments

        Issue Links

          Activity

            People

              nikitamalyavin Nikita Malyavin
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: