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

Assertion failure in SET GLOBAL innodb_ft_aux_table

Details

    Description

      --source include/have_innodb.inc
       
      CREATE TABLE t (a INT) ENGINE=INNODB;
      SET GLOBAL innodb_ft_aux_table='test/t';
      

      Leads to:

      CS 10.6.22 191209d8abea03713c1bd81395d71552c4f5e86f (Debug) Build 27/03/2025

      mariadbd: /test/10.6_dbg/storage/innobase/sync/srw_lock.cc:667: void srw_lock_debug::wr_unlock(): Assertion `have_wr()' failed.
      

      CS 10.6.22 191209d8abea03713c1bd81395d71552c4f5e86f (Debug) Build 27/03/2025

      Core was generated by `/test/MD270325-mariadb-10.6.22-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
      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 (Thread 0x14aa0bfff6c0 (LWP 2522122))]
      (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  0x000014aa10c4527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x000014aa10c288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x000014aa10c2881b in __assert_fail_base (fmt=0x14aa10dd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55a99260acb2 "have_wr()", file=file@entry=0x55a9926309f1 "/test/10.6_dbg/storage/innobase/sync/srw_lock.cc", line=line@entry=667, function=function@entry=0x55a992630ce3 "void srw_lock_debug::wr_unlock()")at ./assert/assert.c:96
      #6  0x000014aa10c3b517 in __assert_fail (assertion=0x55a99260acb2 "have_wr()", file=0x55a9926309f1 "/test/10.6_dbg/storage/innobase/sync/srw_lock.cc", line=667, function=0x55a992630ce3 "void srw_lock_debug::wr_unlock()")at ./assert/assert.c:105
      #7  0x000055a991fd9d32 in srw_lock_debug::wr_unlock (this=0x55a992d79880 <dict_sys+64>)at /test/10.6_dbg/storage/innobase/sync/srw_lock.cc:667
      #8  0x000055a991d7ce99 in dict_sys_t::unlock (this=0x55a992d79840 <dict_sys>)at include/dict0dict.h:1480
      #9  0x000055a991d79ffb in innodb_ft_aux_table_validate (thd=0x14a9bc000d58, save=0x14a9bc0134e0, value=0x14aa0bffc138)at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:17545
      #10 0x000055a9915d30b4 in sys_var_pluginvar::do_check (this=0x55a9b653bbe0, thd=0x14a9bc000d58, var=0x14a9bc0134c0)at /test/10.6_dbg/sql/sql_plugin.cc:3611
      #11 0x000055a99147d1a8 in sys_var::check (this=0x55a9b653bbe0, thd=0x14a9bc000d58, var=0x14a9bc0134c0)at /test/10.6_dbg/sql/set_var.cc:248
      #12 0x000055a99147f0f8 in set_var::check (this=0x14a9bc0134c0, thd=0x14a9bc000d58) at /test/10.6_dbg/sql/set_var.cc:815
      #13 0x000055a99147ed50 in sql_set_variables (thd=0x14a9bc000d58, var_list=0x14a9bc005ec0, free=true) at /test/10.6_dbg/sql/set_var.cc:742
      #14 0x000055a9915b7b3c in mysql_execute_command (thd=0x14a9bc000d58, is_called_from_prepared_stmt=false) at /test/10.6_dbg/sql/sql_parse.cc:5160
      #15 0x000055a9915aa2e4 in mysql_parse (thd=0x14a9bc000d58, rawbuf=0x14a9bc013360 "SET GLOBAL innodb_ft_aux_table='test/t'", length=39, parser_state=0x14aa0bffda48)at /test/10.6_dbg/sql/sql_parse.cc:8209
      #16 0x000055a9915a77a4 in dispatch_command (command=COM_QUERY, thd=0x14a9bc000d58, packet=0x14a9bc00ade9 "SET GLOBAL innodb_ft_aux_table='test/t'", packet_length=39, blocking=true) at /test/10.6_dbg/sql/sql_parse.cc:1908
      #17 0x000055a9915aae93 in do_command (thd=0x14a9bc000d58, blocking=true)at /test/10.6_dbg/sql/sql_parse.cc:1421
      #18 0x000055a991767139 in do_handle_one_connection (connect=0x55a9b678d668, put_in_cache=true) at /test/10.6_dbg/sql/sql_connect.cc:1386
      #19 0x000055a991766ed2 in handle_one_connection (arg=0x55a9b6878e68)at /test/10.6_dbg/sql/sql_connect.cc:1298
      #20 0x000014aa10c9caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #21 0x000014aa10d29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      The assertion is happening after this commit

      commit 67caeca2849384b4e77f8741c6461a5162e3b7bc (HEAD)
      Author: Marko Mäkelä <marko.makela@mariadb.com>
      Date:   Wed Mar 26 14:22:58 2025 +0200
       
          MDEV-36122: Protect table references with a lock
          
          dict_table_open_on_id(): Simplify the logic.
      

      Attachments

        Issue Links

          Activity

            ramesh Ramesh Sivaraman created issue -
            ramesh Ramesh Sivaraman made changes -
            Field Original Value New Value
            ramesh Ramesh Sivaraman made changes -
            Priority Major [ 3 ] Blocker [ 1 ]
            marko Marko Mäkelä added a comment -

            Sorry, we were missing a test where innodb_ft_aux_table is being assigned to an invalid table that exists in InnoDB.

            marko Marko Mäkelä added a comment - Sorry, we were missing a test where innodb_ft_aux_table is being assigned to an invalid table that exists in InnoDB.
            marko Marko Mäkelä made changes -
            Summary Assertion `have_wr()' failed in void srw_lock_debug::wr_unlock() Assertion failure in SET GLOBAL innodb_ft_aux_table
            marko Marko Mäkelä made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ] Debarun Banerjee [ JIRAUSER54513 ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            debarun Debarun Banerjee made changes -
            Assignee Debarun Banerjee [ JIRAUSER54513 ] Marko Mäkelä [ marko ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            marko Marko Mäkelä added a comment -

            Thank you for promptly finding this regression, ramesh! As far as I can tell, this could have caused unexpected hangs in non-debug builds.

            marko Marko Mäkelä added a comment - Thank you for promptly finding this regression, ramesh ! As far as I can tell, this could have caused unexpected hangs in non-debug builds.
            marko Marko Mäkelä made changes -
            issue.field.resolutiondate 2025-03-28 08:57:27.0 2025-03-28 08:57:26.909
            marko Marko Mäkelä made changes -
            Fix Version/s 10.6.22 [ 29997 ]
            Fix Version/s 10.11.12 [ 29998 ]
            Fix Version/s 11.4.6 [ 29999 ]
            Fix Version/s 11.8.2 [ 30001 ]
            Fix Version/s 10.6 [ 24028 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            marko Marko Mäkelä made changes -
            Affects Version/s N/A [ 14700 ]
            Affects Version/s 10.6 [ 24028 ]

            People

              marko Marko Mäkelä
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.