Created attachment 1448299 [details] the patch Description of problem: There is a known a memory leak in pam_mysql since 2009. The leak happens because mysql_library_end call is missing. The discussion is available by this link: https://sourceforge.net/p/pam-mysql/bugs/27/ Version-Release number of selected component (if applicable): 0.7RC1 How reproducible: Always if it works for some time Steps to Reproduce: Launch saslauthd configured to use pam_mysql and wait for some time. Actual results: Memory leaks Expected results: Memory doesn't leak
yeah I can confirm I've known about this bug for years. I didn't know there was a solution however. There's a discussion here https://sourceforge.net/p/pam-mysql/bugs/27/#c2aa and the patch there as well. I've applied it to a epel7 build and am running it now. Sorry for the inline patch, but I'm lazy. :) --- pam_mysql-0.7RC1/pam_mysql.c.org 2018-07-27 10:16:52.781480556 -0600 +++ pam_mysql-0.7RC1/pam_mysql.c 2018-07-27 10:17:23.731647527 -0600 @@ -2338,6 +2338,7 @@ } mysql_close(ctx->mysql_hdl); + mysql_library_end(); xfree(ctx->mysql_hdl); ctx->mysql_hdl = NULL;
pam_mysql-0.8.1-0.2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-bb07632c10
pam_mysql-0.8.1-0.2.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e600272170
pam_mysql-0.8.1-0.2.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-bb07632c10
pam_mysql-0.8.1-0.2.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-e600272170
An update associated with this bug has been pushed to stable.
A Fedora update associated with this bug has been pushed to the stable repository.