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

buf_pool_t::shrink_status buf_pool_t::shrink(size_t): Assertion `!b->oldest_modification()' failed

    XMLWordPrintable

Details

    • Not for Release Notes

    Description

      Got a CLI based test case , this might need to run multiple times to hit a crash .

      # mysqld options required for replay: --log_bin --maximum-range_alloc_block_size=1M --max_allowed_packet=33554432 --maximum-bulk_insert_buffer_size=1M --maximum-join_buffer_size=1M --maximum-max_heap_table_size=1M --maximum-max_join_size=1M --maximum-myisam_max_sort_file_size=1M --maximum-myisam_mmap_size=1M --maximum-myisam_sort_buffer_size=1M --maximum-optimizer_trace_max_mem_size=1M --maximum-query_alloc_block_size=1M
      set sql_mode='';
      SET @@max_statement_time=0.0001;
      SET GLOBAL innodb_adaptive_flushing_lwm=FALSE;
      SET GLOBAL innodb_buffer_pool_size=8388608;
      INSERT INTO t VALUES ('0','0');
      SET @inserted_value=REPEAT('0',16777217);
      CREATE TEMPORARY TABLE t (c MEDIUMTEXT);
      SET GLOBAL innodb_buffer_pool_size=33554432;
      INSERT IGNORE INTO t VALUES (@inserted_value);
      SET GLOBAL innodb_buffer_pool_size=16777216;
      SET GLOBAL innodb_buffer_pool_size=8388608;
      SHOW CREATE TABLE t ;
      DROP TABLE t;
      SET @@max_statement_time=0.0001;
      SET GLOBAL innodb_adaptive_flushing_lwm=FALSE;
      SET GLOBAL innodb_buffer_pool_size=8388608;
      SET @inserted_value=REPEAT('0',16777217);
      CREATE TEMPORARY TABLE t (c MEDIUMTEXT);
      SET GLOBAL innodb_buffer_pool_size=33554432;
      INSERT IGNORE INTO t VALUES (@inserted_value);
      SET GLOBAL innodb_buffer_pool_size=16777216;
      SET GLOBAL innodb_buffer_pool_size=8388608;
      SET @@max_statement_time=0.0001;
      SET GLOBAL innodb_adaptive_flushing_lwm=FALSE;
      SET GLOBAL innodb_buffer_pool_size=8388608;
      SET @inserted_value=REPEAT('0',16777217);
      CREATE TEMPORARY TABLE t (c MEDIUMTEXT);
      SET GLOBAL innodb_buffer_pool_size=33554432;
      INSERT IGNORE INTO t VALUES (@inserted_value);
      SET GLOBAL innodb_buffer_pool_size=16777216;
      SET GLOBAL innodb_buffer_pool_size=8388608;
      SET @@max_statement_time=0.0001;
      SET GLOBAL innodb_adaptive_flushing_lwm=FALSE;
      SET GLOBAL innodb_buffer_pool_size=8388608;
      SET @inserted_value=REPEAT('0',16777217);
      CREATE TEMPORARY TABLE t (c MEDIUMTEXT);
      SET GLOBAL innodb_buffer_pool_size=33554432;
      INSERT IGNORE INTO t VALUES (@inserted_value);
      SET GLOBAL innodb_buffer_pool_size=16777216;
      SET GLOBAL innodb_buffer_pool_size=8388608;
      

      Leads to:

      CS 11.4.8 dbeef00562dd7088a9f0163268f9eb5e5ba072fe (Debug, Clang) Build 07/07/2025

      mariadbd: /test/11.4_dbg/storage/innobase/buf/buf0buf.cc:1630: buf_pool_t::shrink_status buf_pool_t::shrink(size_t): Assertion `!b->oldest_modification()' failed.
      

      CS 11.4.8 dbeef00562dd7088a9f0163268f9eb5e5ba072fe (Debug, Clang) Build 07/07/2025

      Core was generated by `/test/MD070725-mariadb-11.4.8-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
      Program terminated with signal SIGABRT, Aborted.
      Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_kill.c.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
       
      [Current thread is 1 (LWP 1791590)]
      (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  0x000070ee34c4527e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x000070ee34c288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x000070ee34c2881b in __assert_fail_base (fmt=0x70ee34dd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x6337298c3372 "!b->oldest_modification()", file=file@entry=0x6337298c30e2 "/test/11.4_dbg/storage/innobase/buf/buf0buf.cc", line=line@entry=1630, function=function@entry=0x6337298c378a "buf_pool_t::shrink_status buf_pool_t::shrink(size_t)") at ./assert/assert.c:96
      #6  0x000070ee34c3b517 in __assert_fail (assertion=0x6337298c3372 "!b->oldest_modification()", file=0x6337298c30e2 "/test/11.4_dbg/storage/innobase/buf/buf0buf.cc", line=1630, function=0x6337298c378a "buf_pool_t::shrink_status buf_pool_t::shrink(size_t)") at ./assert/assert.c:105
      #7  0x00006337292ce10d in buf_pool_t::shrink (this=0x63372a112700 <buf_pool>, size=8388608) at /test/11.4_dbg/storage/innobase/buf/buf0buf.cc:1630
      #8  0x00006337292d04dd in buf_pool_t::resize (this=0x63372a112700 <buf_pool>, size=8388608, thd=0x70ed2c000d58)at /test/11.4_dbg/storage/innobase/buf/buf0buf.cc:2055
      #9  0x0000633728fb3eef in innodb_buffer_pool_size_update (thd=0x70ed2c000d58, save=0x70ed2c019cf8)at /test/11.4_dbg/storage/innobase/handler/ha_innodb.cc:3649
      #10 0x00006337287e67c0 in sys_var_pluginvar::global_update (this=0x63375bac5ea8, thd=0x70ed2c000d58, var=0x70ed2c019cd8)at /test/11.4_dbg/sql/sql_plugin.cc:3705
      #11 0x000063372867646a in sys_var::update (this=0x63375bac5ea8, thd=0x70ed2c000d58, var=0x70ed2c019cd8)at /test/11.4_dbg/sql/set_var.cc:209
      #12 0x00006337286786e4 in set_var::update (this=0x70ed2c019cd8, thd=0x70ed2c000d58) at /test/11.4_dbg/sql/set_var.cc:856
      #13 0x0000633728678228 in sql_set_variables (thd=0x70ed2c000d58, var_list=0x70ed2c005fa8, free=true) at /test/11.4_dbg/sql/set_var.cc:737
      #14 0x00006337287b2b51 in mysql_execute_command (thd=0x70ed2c000d58, is_called_from_prepared_stmt=false) at /test/11.4_dbg/sql/sql_parse.cc:4880
      #15 0x00006337287a6854 in mysql_parse (thd=0x70ed2c000d58, rawbuf=0x70ed2c019b70 "SET GLOBAL innodb_buffer_pool_size=8388608", length=42, parser_state=0x70ee07b56a30)at /test/11.4_dbg/sql/sql_parse.cc:7898
      #16 0x00006337287a3d04 in dispatch_command (command=COM_QUERY, thd=0x70ed2c000d58, packet=0x70ed2c00b089 "SET GLOBAL innodb_buffer_pool_size=8388608", packet_length=42, blocking=true) at /test/11.4_dbg/sql/sql_parse.cc:1904
      #17 0x00006337287a7403 in do_command (thd=0x70ed2c000d58, blocking=true)at /test/11.4_dbg/sql/sql_parse.cc:1417
      #18 0x0000633728989b79 in do_handle_one_connection (connect=0x63375c2222b8, put_in_cache=true) at /test/11.4_dbg/sql/sql_connect.cc:1408
      #19 0x0000633728989912 in handle_one_connection (arg=0x63375c222248)at /test/11.4_dbg/sql/sql_connect.cc:1320
      #20 0x000070ee34c9caa4 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #21 0x000070ee34d29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug Detection Matrix

          Rel    o/d  Build   Commit                                    UniqueID observed             
      CS  10.6   dbg  070725  31aa8b6939ee9326b4145a9cceae7e5a3711d7bf  No bug found                  
      CS  10.6   opt  070725  31aa8b6939ee9326b4145a9cceae7e5a3711d7bf  No bug found                  
      CS  10.11  dbg  070725  e79aa9ca382ce6d293edeab880212bf472c33f36  !b->oldest_modification()|SIGABRT|buf_pool_t::shrink|buf_pool_t::resize|innodb_buffer_pool_size_update|sys_var_pluginvar::global_update
      CS  10.11  opt  070725  e79aa9ca382ce6d293edeab880212bf472c33f36  MARIADBD_ERROR|mariadbd: innodb_buffer_pool_size change aborted
      CS  11.4   dbg  070725  dbeef00562dd7088a9f0163268f9eb5e5ba072fe  !b->oldest_modification()|SIGABRT|buf_pool_t::shrink|buf_pool_t::resize|innodb_buffer_pool_size_update|sys_var_pluginvar::global_update
      CS  11.4   opt  070725  dbeef00562dd7088a9f0163268f9eb5e5ba072fe  MARIADBD_ERROR|mariadbd: innodb_buffer_pool_size change aborted
      CS  11.8   dbg  070725  9a4a30aec003a8efdf9d35d3ac669385286ba4b4  MARIADBD_ERROR|mariadbd: innodb_buffer_pool_size change aborted
      CS  11.8   opt  070725  9a4a30aec003a8efdf9d35d3ac669385286ba4b4  MARIADBD_ERROR|mariadbd: innodb_buffer_pool_size change aborted
      CS  12.0   dbg  070725  107291bf980822fcc3c02bd4e01ecbc4db7fd192  !b->oldest_modification()|SIGABRT|buf_pool_t::shrink|buf_pool_t::resize|innodb_buffer_pool_size_update|sys_var_pluginvar::global_update
      CS  12.0   opt  070725  107291bf980822fcc3c02bd4e01ecbc4db7fd192  MARIADBD_ERROR|mariadbd: innodb_buffer_pool_size change aborted
      CS  12.1   dbg  070725  d4d0dd00b761b3e94454dff9aa93e2e17232339e  MARIADBD_ERROR|mariadbd: innodb_buffer_pool_size change aborted
      CS  12.1   opt  070725  d4d0dd00b761b3e94454dff9aa93e2e17232339e  MARIADBD_ERROR|mariadbd: innodb_buffer_pool_size change aborted
      ES  10.5   dbg  070725  70586522eacf09d04d49962072e14325a75d8155  No bug found                  
      ES  10.5   opt  070725  70586522eacf09d04d49962072e14325a75d8155  No bug found                  
      ES  10.6   dbg  070725  6879c0c0bcdd1b7a88de65dd581cf86195a2cd11  No bug found                  
      ES  10.6   opt  070725  6879c0c0bcdd1b7a88de65dd581cf86195a2cd11  No bug found                  
      ES  11.4   dbg  070725  6ac3c1547652a4391fe0b1210ec241a804293567  !b->oldest_modification()|SIGABRT|buf_pool_t::shrink|buf_pool_t::resize|innodb_buffer_pool_size_update|sys_var_pluginvar::global_update
      ES  11.4   opt  070725  6ac3c1547652a4391fe0b1210ec241a804293567  MARIADBD_ERROR|mariadbd: innodb_buffer_pool_size change aborted
      ES  11.8   dbg  070725  e09b21aaddefcf0d7ddd96eca5b1d48c1d688de5  !b->oldest_modification()|SIGABRT|buf_pool_t::shrink|buf_pool_t::resize|innodb_buffer_pool_size_update|sys_var_pluginvar::global_update
      ES  11.8   opt  070725  e09b21aaddefcf0d7ddd96eca5b1d48c1d688de5  MARIADBD_ERROR|mariadbd: innodb_buffer_pool_size change aborted
      

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              saahil Saahil Alam
              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.