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

Another memory leak in cmp_item_sort_string

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.2(EOL)
    • N/A
    • Server
    • None

    Description

      Reproduced with 10.2, I didn't check earlier versions:
      ./mtr main.system_mysql_db_refs

      main.system_mysql_db_refs                [ pass ]     32
      ***Warnings generated in error logs during shutdown after running tests: main.system_mysql_db_refs
       
      mysqld: /home/svoj/devel/maria/mariadb/sql/mysqld.cc:2174: void mysqld_exit(int): Assertion `global_status_var.global_memory_used == 0' failed.
      Attempting backtrace. You can use the following information to find out
      

      Valgrind says:

      ==33496== 612 bytes in 3 blocks are still reachable in loss record 30 of 99
      ==33496==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==33496==    by 0x10A2A8F: sf_malloc (safemalloc.c:118)
      ==33496==    by 0x1090079: my_malloc (my_malloc.c:101)
      ==33496==    by 0x775F13: String::real_alloc(unsigned long) (sql_string.cc:45)
      ==33496==    by 0x5F6AE0: String::alloc(unsigned long) (sql_string.h:361)
      ==33496==    by 0x7763A5: String::copy(String const&) (sql_string.cc:176)
      ==33496==    by 0x983564: cmp_item_sort_string::store_value(Item*) (item_cmpfunc.h:1389)
      ==33496==    by 0x97FCBC: Item_equal::val_int() (item_cmpfunc.cc:6662)
      ==33496==    by 0x72DF98: join_read_const_table(THD*, st_join_table*, st_position*) (sql_select.cc:19175)
      ==33496==    by 0x708D2C: make_join_statistics(JOIN*, List<TABLE_LIST>&, st_dynamic_array*) (sql_select.cc:4170)
      ==33496==    by 0x6FFDA9: JOIN::optimize_inner() (sql_select.cc:1537)
      ==33496==    by 0x6FE5E0: JOIN::optimize() (sql_select.cc:1113)
      ==33496==    by 0x70768D: mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:3747)
      ==33496==    by 0x6FBDDF: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:376)
      ==33496==    by 0x6C7A54: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:6470)
      ==33496==    by 0x6BD714: mysql_execute_command(THD*) (sql_parse.cc:3481)
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              svoj Sergey Vojtovich
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.