[MDEV-18684] mysql_thread_end memory leak in compat libmysqlclient.so.18 Created: 2019-02-21  Updated: 2019-05-06

Status: Open
Project: MariaDB Server
Component/s: Scripts & Clients
Affects Version/s: 5.5, 10.0, 10.1
Fix Version/s: 5.5, 10.1

Type: Bug Priority: Major
Reporter: Peter van Dijk Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 1
Labels: None


 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?



 Comments   
Comment by Michal Schorm [ 2019-05-03 ]

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)

Generated at Thu Feb 08 08:45:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.