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

bool btr_search_hash_table_validate(THD *, ulint): Assertion `0' failed

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      SET GLOBAL innodb_adaptive_hash_index=ON;
      CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(1)) ENGINE=InnoDB;
      INSERT INTO t1 SELECT seq,'' FROM seq_1_to_200;
      SELECT SUM((SELECT a FROM t1 WHERE a=seq)) FROM seq_1_to_200;
      SET GLOBAL innodb_adaptive_hash_index=IF_SPECIFIED;
      UPDATE t1 SET b='x';
      CHECK TABLE t1;
      

      Leads to:

      CS 13.2.0 fb47ec835c4e48c181b5e4402dc3846b65496240 (Debug, Clang 22.1.8-20260621) Build 10/11/2026

      mariadbd: /test/13.1_dbg/storage/innobase/btr/btr0sea.cc:2410: bool btr_search_hash_table_validate(THD *, ulint): Assertion `0' failed.
      

      CS 13.2.0 fb47ec835c4e48c181b5e4402dc3846b65496240 (Debug, Clang 22.1.8-20260621) Build 10/11/2026

      Core was generated by `/test/MD101126-mariadb-13.2.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --loo'.
      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 30368)]
      (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  0x000077b402a4527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x000077b402a288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x000077b402a2881b in __assert_fail_base (fmt=0x77b402bd1208 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5d355a8adcc9 "0", file=file@entry=0x5d355a943db7 "/test/13.1_dbg/storage/innobase/btr/btr0sea.cc", line=line@entry=2410, function=function@entry=0x5d355a944ffc "bool btr_search_hash_table_validate(THD *, ulint)") at ./assert/assert.c:96
      #6  0x000077b402a3b517 in __assert_fail (assertion=0x5d355a8adcc9 "0", file=0x5d355a943db7 "/test/13.1_dbg/storage/innobase/btr/btr0sea.cc", line=2410, function=0x5d355a944ffc "bool btr_search_hash_table_validate(THD *, ulint)") at ./assert/assert.c:105
      #7  0x00005d355a24ce8a in btr_search_hash_table_validate (thd=0x6fb2ec000d60, hash_table_id=7) at /test/13.1_dbg/storage/innobase/btr/btr0sea.cc:2410
      #8  0x00005d355a24c6cc in btr_search_validate (thd=0x6fb2ec000d60)at /test/13.1_dbg/storage/innobase/btr/btr0sea.cc:2462
      #9  0x00005d3559f30a88 in ha_innobase::check (this=0x6fb2ec29d3a0, thd=0x6fb2ec000d60, check_opt=0x6fb2ec006720)at /test/13.1_dbg/storage/innobase/handler/ha_innodb.cc:16253
      #10 0x00005d3559b37c09 in handler::ha_check (this=0x6fb2ec29d3a0, thd=0x6fb2ec000d60, check_opt=0x6fb2ec006720)at /test/13.1_dbg/sql/handler.cc:5787
      #11 0x00005d355990084a in mysql_admin_table (thd=0x6fb2ec000d60, tables=0x6fb2ec01a790, check_opt=0x6fb2ec006720, operator_name=0x5d355b08d958 <msg_check>, lock_type=TL_READ_NO_INSERT, org_open_for_modify=false, no_errors_from_open=false, extra_open_options=32, prepare_func=0x0, operator_func=(int (handler::*)(class handler * const, class THD *, HA_CHECK_OPT *)) 0x5d3559b37a70 <handler::ha_check(THD*, st_ha_check_opt*)>, view_operator_func=0x5d355987e7d0 <view_check(THD*, TABLE_LIST*, st_ha_check_opt*)>, is_cmd_replicated=false) at /test/13.1_dbg/sql/sql_admin.cc:949
      #12 0x00005d35599032c3 in Sql_cmd_check_table::execute (this=0x6fb2ec01aef0, thd=0x6fb2ec000d60) at /test/13.1_dbg/sql/sql_admin.cc:1703
      #13 0x00005d3559719d49 in mysql_execute_command (thd=0x6fb2ec000d60, is_called_from_prepared_stmt=false) at /test/13.1_dbg/sql/sql_parse.cc:5954
      #14 0x00005d355970ad38 in mysql_parse (thd=0x6fb2ec000d60, rawbuf=0x6fb2ec01a6b0 "CHECK TABLE t1", length=14, parser_state=0x77b3dc2509c0) at /test/13.1_dbg/sql/sql_parse.cc:8020
      #15 0x00005d35597084ee in dispatch_command (command=COM_QUERY, thd=0x6fb2ec000d60, packet=0x6fb2ec00b6a1 "", packet_length=14, blocking=true) at /test/13.1_dbg/sql/sql_parse.cc:1903
      #16 0x00005d355970b7ba in do_command (thd=0x6fb2ec000d60, blocking=true)at /test/13.1_dbg/sql/sql_parse.cc:1437
      #17 0x00005d35598e89ce in do_handle_one_connection (connect=0x5d35742348c0, put_in_cache=true) at /test/13.1_dbg/sql/sql_connect.cc:1529
      #18 0x00005d35598e87b1 in handle_one_connection (arg=0x5d35742d8140)at /test/13.1_dbg/sql/sql_connect.cc:1441
      #19 0x000077b402a9cb84 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #20 0x000077b402b29ecc in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug Detection Matrix

          Rel    o/d  Build   Commit                                    UniqueID observed             
      CS  10.11  dbg  101126  40e829509c789d7ae404000c81303ffa735f59f1  No bug found                  
      CS  10.11  opt  101126  40e829509c789d7ae404000c81303ffa735f59f1  No bug found                  
      CS  11.4   dbg  101126  707efb615611d7d56153cee6747d060ab91bf8a3  No bug found                  
      CS  11.4   opt  101126  707efb615611d7d56153cee6747d060ab91bf8a3  No bug found                  
      CS  11.8   dbg  101126  e1b4f63b099fad09649878e168f110a18253e68a  No bug found                  
      CS  11.8   opt  101126  e1b4f63b099fad09649878e168f110a18253e68a  No bug found                  
      CS  12.3   dbg  101126  691265a82e526e336e56c32fc8a98a74eea544f7  No bug found                  
      CS  12.3   opt  101126  691265a82e526e336e56c32fc8a98a74eea544f7  No bug found                  
      CS  13.0   dbg  101126  620a4b5624222048fece7fe1789978ae0675cae2  No bug found                  
      CS  13.0   opt  101126  620a4b5624222048fece7fe1789978ae0675cae2  No bug found                  
      CS  13.2   dbg  101126  fb47ec835c4e48c181b5e4402dc3846b65496240  0|SIGABRT|btr_search_hash_table_validate|btr_search_validate|ha_innobase::check|handler::ha_check
      CS  13.2   opt  101126  fb47ec835c4e48c181b5e4402dc3846b65496240  No bug found                  
      ES  10.6   dbg  101126  228f96588d91fcec8428b5d7f6c53627ef93b48a  No bug found                  
      ES  10.6   opt  101126  228f96588d91fcec8428b5d7f6c53627ef93b48a  No bug found                  
      ES  11.4   dbg  101126  d39d6bbe10b7c9401ac02eb82668dbccd04d41ba  No bug found                  
      ES  11.4   opt  101126  d39d6bbe10b7c9401ac02eb82668dbccd04d41ba  No bug found                  
      ES  11.8   dbg  101126  fb7fd3f6cda7a76e93fb0d4ebf97b1ad1ebfb823  No bug found                  
      ES  11.8   opt  101126  fb7fd3f6cda7a76e93fb0d4ebf97b1ad1ebfb823  No bug found                  
      ES  12.3   dbg  101126  167b8d5c73897dfb38cc959dafadaeac5068734f  No bug found                  
      ES  12.3   opt  101126  167b8d5c73897dfb38cc959dafadaeac5068734f  No bug found                  
      

      Attachments

        Activity

          People

            thiru Thirunarayanan Balathandayuthapani
            saahil Saahil Alam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 1h
                1h

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.