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

mysql_thread_end memory leak in compat libmysqlclient.so.18

Details

    Description

      https://bugs.mysql.com/bug.php?id=66740 describes a memory leak in older versions of libmysqlclient (from MySQL). I have an app suffering from this leak on CentOS 7 with the mariadb-libs 5.5.60 package it ships. I noticed that the -compat packages from downloads.mariadb.org offer a dropin libmysqlclient.so.18, but to my surprise, those also have the leak!

      libmariadb.so.3 from MariaDB-shared does not leak (when compiled against, it's not a drop in replacement apparently).

      Would it be possible to backport the fix for that leak from libmariadb to compat/libmysqlclient?

      Attachments

        Activity

          habbie Peter van Dijk created issue -
          mschorm Michal Schorm added a comment -

          There's another confirmed user affected, on RHEL7.

          Example of memory leak :

          ==179== 2,080 bytes in 10 blocks are definitely lost in loss record 300 of 320
          ==179==    at 0x4C2B955: calloc (vg_replace_malloc.c:711)
          ==179==    by 0x9C50A36: ??? (in /usr/lib64/mysql/libmysqlclient.so.18.0.0)
          ==179==    by 0x9C15BC4: mysql_server_init (in /usr/lib64/mysql/libmysqlclient.so.18.0.0)
          ==179==    by 0x9C1CE96: mysql_init (in /usr/lib64/mysql/libmysqlclient.so.18.0.0)
          ==179==    by 0x99EAC9D: SMySQL::connect() (in /usr/lib64/pdns/libgmysqlbackend.so)
          

          mschorm Michal Schorm added a comment - There's another confirmed user affected, on RHEL7. Example of memory leak : ==179== 2,080 bytes in 10 blocks are definitely lost in loss record 300 of 320 ==179== at 0x4C2B955: calloc (vg_replace_malloc.c:711) ==179== by 0x9C50A36: ??? ( in /usr/lib64/mysql/libmysqlclient .so.18.0.0) ==179== by 0x9C15BC4: mysql_server_init ( in /usr/lib64/mysql/libmysqlclient .so.18.0.0) ==179== by 0x9C1CE96: mysql_init ( in /usr/lib64/mysql/libmysqlclient .so.18.0.0) ==179== by 0x99EAC9D: SMySQL::connect() ( in /usr/lib64/pdns/libgmysqlbackend .so)
          serg Sergei Golubchik made changes -
          Field Original Value New Value
          Issue Type Task [ 3 ] Bug [ 1 ]
          serg Sergei Golubchik made changes -
          Affects Version/s 5.5 [ 15800 ]
          Affects Version/s 10.0 [ 16000 ]
          Affects Version/s 10.1 [ 16100 ]
          serg Sergei Golubchik made changes -
          Priority Minor [ 4 ] Major [ 3 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 5.5 [ 15800 ]
          Fix Version/s 10.1 [ 16100 ]
          serg Sergei Golubchik made changes -
          Assignee Oleksandr Byelkin [ sanja ]
          serg Sergei Golubchik made changes -
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 92773 ] MariaDB v4 [ 141171 ]

          People

            sanja Oleksandr Byelkin
            habbie Peter van Dijk
            Votes:
            1 Vote for this issue
            Watchers:
            3 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.