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

Memory not freed: 512, 560 bytes on shutdown with previously dropped user

    XMLWordPrintable

Details

    Description

      Testcase outcome is somewhat sporadic.

      SET GLOBAL log_bin_trust_function_creators=1;
      DROP USER CURRENT_USER();
      CREATE FUNCTION f1 (b INT) RETURNS INT RETURN 1;
      CREATE VIEW v1 AS SELECT f1();
      CREATE TABLE t1 (c1 INT UNSIGNED AUTO_INCREMENT NOT NULL UNIQUE KEY);
      LOCK TABLES t1 WRITE, v1 READ;
      CREATE VIEW v2 AS SELECT * FROM v1 WITH CASCADED CHECK OPTION;
      SHUTDOWN;
      

      Will lead, sporadically, to:

      10.6.5 78c7d50e4f2d80ad93aea9ead15b013c16366d15 (Optimized)

      2021-08-10 20:42:57 0 [Note] /test/MD100821-mariadb-10.6.5-linux-x86_64-opt/bin/mysqld: Shutdown complete
       
      Warning: Memory not freed: 560
      

      10.5.11 2c6d5c92c7e0e8b38dcb9fad94c7bf11ef4ba4b6 (Debug)

      2021-08-10 20:42:57 0 [Note] /test/MD140621-mariadb-10.5.11-linux-x86_64-dbg/bin/mysqld: Shutdown complete
       
      Warning: Memory not freed: 560
      Warning:  280 bytes lost at 0x145cc804a520, allocated by T@0 at
      

      Note the partial stack in the output above.

      10.7.0 71ed8c136fa203b9b3a678a6d5cc72235ef73ef7 (Optimized)

      2021-08-10 20:42:57 0 [Note] /test/MD200721-mariadb-10.7.0-linux-x86_64-opt/bin/mysqld: Shutdown complete
       
      Warning: Memory not freed: 560
      

      CLI based execution (using copy/paste and/or SOURCE) seems to produce more reliable/clear output. For example:

      10.7.0 71ed8c136fa203b9b3a678a6d5cc72235ef73ef7 (Debug)

      2021-08-10 20:46:12 0 [Note] /test/MD200721-mariadb-10.7.0-linux-x86_64-dbg/bin/mysqld: Shutdown complete
      {noformat:title=10.7.0 71ed8c136fa203b9b3a678a6d5cc72235ef73ef7 (Debug)}
      Warning: Memory not freed: 560
      Warning:  280 bytes lost at 0x1535340514c0, allocated by T@0 at 0x562ef7fd593a, mysys/array.c:71, mysys/hash.c:98, sql/sp.cc:2324, sql/sp.cc:2639, sql/item_create.cc:2601, sql/item_create.cc:2450, sql/sql_yacc.yy:10748
      Warning:  280 bytes lost at 0x1535340466c0, allocated by T@0 at sql/sql_parse.cc:10378, mysys/array.c:71, mysys/hash.c:98, sql/sp.cc:2324, sql/sp.cc:2639, sql/item_create.cc:2601, sql/item_create.cc:2450, sql/sql_yacc.yy:10748
      Memory lost: 560 bytes in 2 chunks
      Warning:  280 bytes lost at 0x1535340514c0, allocated by T@0 at sql/sql_parse.cc:10378, mysys/array.c:71, mysys/hash.c:98, sql/sp.cc:2324, sql/sp.cc:2639, sql/item_create.cc:2601, sql/item_create.cc:2450, sql/sql_yacc.yy:10748
      Warning:  280 bytes lost at 0x1535340466c0, allocated by T@0 at sql/sql_parse.cc:10378, mysys/array.c:71, mysys/hash.c:98, sql/sp.cc:2324, sql/sp.cc:2639, sql/item_create.cc:2601, sql/item_create.cc:2450, sql/sql_yacc.yy:10748
      Memory lost: 560 bytes in 2 chunks
      

      10.4.20 8a2b4d531dc661ee605eeecdfc901bc833f86564 (Debug)

      Warning: Memory not freed: 512
      Warning:  256 bytes lost at 0x14ba400532e0, allocated by T@0 at mysys/array.c:70, mysys/hash.c:98, sql/sp.cc:2285, sql/sp.cc:2600, sql/item_create.cc:3551, sql/item_create.cc:3400, sql/sql_yacc.yy:11432, sql/sql_parse.cc:10336
      Warning:  256 bytes lost at 0x14ba40052890, allocated by T@0 at mysys/array.c:70, mysys/hash.c:98, sql/sp.cc:2285, sql/sp.cc:2600, sql/item_create.cc:3551, sql/item_create.cc:3400, sql/sql_yacc.yy:11432, sql/sql_parse.cc:10336
      Memory lost: 512 bytes in 2 chunks
      Warning:  256 bytes lost at 0x14ba400532e0, allocated by T@0 at mysys/array.c:70, mysys/hash.c:98, sql/sp.cc:2285, sql/sp.cc:2600, sql/item_create.cc:3551, sql/item_create.cc:3400, sql/sql_yacc.yy:11432, sql/sql_parse.cc:10336
      Warning:  256 bytes lost at 0x14ba40052890, allocated by T@0 at mysys/array.c:70, mysys/hash.c:98, sql/sp.cc:2285, sql/sp.cc:2600, sql/item_create.cc:3551, sql/item_create.cc:3400, sql/sql_yacc.yy:11432, sql/sql_parse.cc:10336
      Memory lost: 512 bytes in 2 chunks
      

      10.3.30 75a65d3201a4486af96cf3277b6c5a4ba460eef7 (Debug)

      2021-08-10 20:53:10 0 [Note] /test/MD140621-mariadb-10.3.30-linux-x86_64-dbg/bin/mysqld: Shutdown complete
       
      Warning: Memory not freed: 512
      Warning:  256 bytes lost at 0x14a728047560, allocated by T@0 at mysys/array.c:70, mysys/hash.c:98, sql/sp.cc:2284, sql/sp.cc:2599, sql/item_create.cc:3512, sql/item_create.cc:3361, sql/sql_yacc.yy:11195, sql/sql_parse.cc:10163
      Warning:  256 bytes lost at 0x14a728046b10, allocated by T@0 at mysys/array.c:70, mysys/hash.c:98, sql/sp.cc:2284, sql/sp.cc:2599, sql/item_create.cc:3512, sql/item_create.cc:3361, sql/sql_yacc.yy:11195, sql/sql_parse.cc:10163
      Memory lost: 512 bytes in 2 chunks
      Warning:  256 bytes lost at 0x14a728047560, allocated by T@0 at mysys/array.c:70, mysys/hash.c:98, sql/sp.cc:2284, sql/sp.cc:2599, sql/item_create.cc:3512, sql/item_create.cc:3361, sql/sql_yacc.yy:11195, sql/sql_parse.cc:10163
      Warning:  256 bytes lost at 0x14a728046b10, allocated by T@0 at mysys/array.c:70, mysys/hash.c:98, sql/sp.cc:2284, sql/sp.cc:2599, sql/item_create.cc:3512, sql/item_create.cc:3361, sql/sql_yacc.yy:11195, sql/sql_parse.cc:10163
      Memory lost: 512 bytes in 2 chunks
      

      10.2.39 (Debug)

      2021-08-10 20:55:03 23267450083072 [Note] /test/MD140621-mariadb-10.2.39-linux-x86_64-dbg/bin/mysqld: Shutdown complete
       
      Warning: Memory not freed: 512
      Warning:  256 bytes lost at 0x152910046740, allocated by T@0 at mysys/array.c:70, mysys/hash.c:98, sql/sp.cc:1915, sql/sp.cc:1962, sql/item_create.cc:3475, sql/item_create.cc:3327, sql/sql_yacc.yy:10276, sql/sql_parse.cc:10099
      Warning:  256 bytes lost at 0x152910045cf0, allocated by T@0 at mysys/array.c:70, mysys/hash.c:98, sql/sp.cc:1915, sql/sp.cc:1962, sql/item_create.cc:3475, sql/item_create.cc:3327, sql/sql_yacc.yy:10276, sql/sql_parse.cc:10099
      Memory lost: 512 bytes in 2 chunks
      Warning:  256 bytes lost at 0x152910046740, allocated by T@0 at mysys/array.c:70, mysys/hash.c:98, sql/sp.cc:1915, sql/sp.cc:1962, sql/item_create.cc:3475, sql/item_create.cc:3327, sql/sql_yacc.yy:10276, sql/sql_parse.cc:10099
      Warning:  256 bytes lost at 0x152910045cf0, allocated by T@0 at mysys/array.c:70, mysys/hash.c:98, sql/sp.cc:1915, sql/sp.cc:1962, sql/item_create.cc:3475, sql/item_create.cc:3327, sql/sql_yacc.yy:10276, sql/sql_parse.cc:10099
      Memory lost: 512 bytes in 2 chunks
      

      Part, but not all, of these also appear in MDEV-26186 (different testcase).

      Attachments

        Issue Links

          Activity

            People

              Elkin Andrei Elkin
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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