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

dict_acquire_mdl_shared() aborts when table mode is DICT_TABLE_OP_OPEN_ONLY_IF_CACHED

    XMLWordPrintable

Details

    Description

      --source include/have_innodb.inc
      --source include/have_sequence.inc
       
      SET foreign_key_checks=0,unique_checks=0;
      SET GLOBAL innodb_defragment_stats_accuracy=1;
      CREATE TABLE t (a INT ) ENGINE=INNODB;
      INSERT INTO t SELECT * FROM seq_1_to_1000;
      DROP TABLE t;
      

      Leads to:

      CS 10.6.22 ee947fae80dc5f82d2c964cd0d8e897e9c244002 (Debug) Build 15/04/2025

      Core was generated by `/test/MD150425-mariadb-10.6.22-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __memcpy_evex_unaligned_erms ()at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:523
       
      [Current thread is 1 (Thread 0x14725de006c0 (LWP 901191))]
      (gdb) bt
      #0  __memcpy_evex_unaligned_erms ()at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:523
      #1  0x00005581b91cac7f in dict_acquire_mdl_shared<false> (table=0x0, mdl_context=0x14722c001500, mdl=0x14725ddff980, table_op=DICT_TABLE_OP_OPEN_ONLY_IF_CACHED)at /test/10.6_dbg/storage/innobase/dict/dict0dict.cc:819
      #2  0x00005581b91cb132 in dict_acquire_mdl_shared<false> (table=0x1472140254d0, thd=0x14722c0013a8, mdl=0x14725ddff980, table_op=DICT_TABLE_OP_OPEN_ONLY_IF_CACHED)at /test/10.6_dbg/storage/innobase/dict/dict0dict.cc:864
      #3  0x00005581b91b986d in dict_table_open_on_id (table_id=18, dict_locked=false, table_op=DICT_TABLE_OP_OPEN_ONLY_IF_CACHED, thd=0x14722c0013a8, mdl=0x14725ddff980)at /test/10.6_dbg/storage/innobase/dict/dict0dict.cc:896
      #4  0x00005581b91fe8ff in dict_stats_process_entry_from_defrag_pool (thd=0x14722c0013a8)at /test/10.6_dbg/storage/innobase/dict/dict0defrag_bg.cc:192
      #5  0x00005581b91fe820 in dict_defrag_process_entries_from_defrag_pool (thd=0x14722c0013a8)at /test/10.6_dbg/storage/innobase/dict/dict0defrag_bg.cc:209
      #6  0x00005581b91fa933 in dict_stats_func ()at /test/10.6_dbg/storage/innobase/dict/dict0stats_bg.cc:394
      #7  0x00005581b92a74a4 in tpool::thread_pool_generic::timer_generic::run (this=0x5581bbf4dca0) at /test/10.6_dbg/tpool/tpool_generic.cc:336
      #8  0x00005581b92a72dd in tpool::thread_pool_generic::timer_generic::execute (arg=0x5581bbf4dca0) at /test/10.6_dbg/tpool/tpool_generic.cc:356
      #9  0x00005581b92ab17f in tpool::task::execute (this=0x5581bbf4dce0)at /test/10.6_dbg/tpool/task.cc:37
      #10 0x00005581b92a3dfb in tpool::thread_pool_generic::worker_main (this=0x5581bbe8f080, thread_var=0x5581bbe8f620)at /test/10.6_dbg/tpool/tpool_generic.cc:574
      #11 0x00005581b92a85d4 in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*>(__f=@0x147258001128: (void (tpool::thread_pool_generic::*)(tpool::thread_pool_generic * const, tpool::worker_data *)) 0x5581b92a3cf0 <tpool::thread_pool_generic::worker_main(tpool::worker_data*)>, __t=@0x147258001120: 0x5581bbe8f080, __args=@0x147258001118: 0x5581bbe8f620)at /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/invoke.h:74
      #12 0x00005581b92a84f5 in std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=@0x147258001128: (void (tpool::thread_pool_generic::*)(tpool::thread_pool_generic * const, tpool::worker_data *)) 0x5581b92a3cf0 <tpool::thread_pool_generic::worker_main(tpool::worker_data*)>, __args=@0x147258001118: 0x5581bbe8f620, __args=@0x147258001118: 0x5581bbe8f620)at /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/invoke.h:96
      #13 0x00005581b92a84c3 in std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=0x147258001118)at /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/std_thread.h:301
      #14 0x00005581b92a8475 in std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=0x147258001118)at /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/std_thread.h:308
      #15 0x00005581b92a82e9 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=0x147258001110)at /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/std_thread.h:253
      #16 0x000014726f2ecdb4 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
      #17 0x000014726ee9caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #18 0x000014726ef29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug Detection Matrix

          Rel    o/d  Build   Commit                                    UniqueID observed             
      CS  10.5   dbg  040425  25737dbab7fec6d05a50353baf5b15ad97dcbd0f  No bug found                 
      CS  10.5   opt  040425  25737dbab7fec6d05a50353baf5b15ad97dcbd0f  No bug found
      CS  10.6   dbg  150425  ee947fae80dc5f82d2c964cd0d8e897e9c244002  SIGSEGV|dict_acquire_mdl_shared<false>|dict_acquire_mdl_shared<false>|dict_table_open_on_id|dict_stats_process_entry_from_defrag_pool
      CS  10.6   opt  150425  ee947fae80dc5f82d2c964cd0d8e897e9c244002  No bug found
      CS  10.11  dbg  040425  c06c36218a59cf3ada01b096cb715a5e1cedfe2b  No bug found                  
      CS  10.11  opt  040425  c06c36218a59cf3ada01b096cb715a5e1cedfe2b  No bug found                  
      CS  11.4   dbg  010425  30140c066d50f7e4ac4f490a9e081d9d605aea07  No bug found                  
      CS  11.4   opt  010425  30140c066d50f7e4ac4f490a9e081d9d605aea07  No bug found                  
      CS  11.8   dbg  160425  f9125dffc624809731e22fd64e4158fb3a76da69  No bug found                  
      CS  11.8   opt  160425  f9125dffc624809731e22fd64e4158fb3a76da69  No bug found                  
      CS  12.0   dbg  010425  22efc2c784e1b7199fb5804e6330168277ea7dce  No bug found                  
      CS  12.0   opt  010425  22efc2c784e1b7199fb5804e6330168277ea7dce  No bug found                  
      ES  10.5   dbg  170325  e99e19fae843c6ab174d0793e82b76bf6d980147  No bug found                  
      ES  10.5   opt  170325  e99e19fae843c6ab174d0793e82b76bf6d980147  No bug found                  
      ES  10.6   dbg  170325  ee1d68c27bc578f7750b898d7c65acfec33dc30b  No bug found                  
      ES  10.6   opt  170325  ee1d68c27bc578f7750b898d7c65acfec33dc30b  No bug found                  
      ES  11.4   dbg  170325  c623275dc5fb705004d716e4c32386cf89649b9d  No bug found                  
      ES  11.4   opt  170325  c623275dc5fb705004d716e4c32386cf89649b9d  No bug found                  
      

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.