Bug 235305 - net/glusterfs: Memory leak in 3.11/3.12
Summary: net/glusterfs: Memory leak in 3.11/3.12
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs mailing list
URL:
Keywords: needs-patch
Depends on:
Blocks:
 
Reported: 2019-01-29 19:39 UTC by Vincent Milum
Modified: 2019-07-03 10:15 UTC (History)
3 users (show)

See Also:
koobs: maintainer-feedback+
koobs: merge-quarterly?


Attachments
upgrade to 3.12.15 (1.81 KB, patch)
2019-07-03 07:54 UTC, Lapo Luchini
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Milum 2019-01-29 19:39:26 UTC
There are known memory leaks in upstream Gluster 3.11 and 3.12 which has since been resolved. Those patches have yet to hit FreeBSD, and I can easily confirm that I'm hitting the exact same memory leaks described in the upstream bugs. 

Working with a large number of files (in my case, writing 100k-1m files into Gluster) will eventually cause GlusterFS to consume all RAM and SWAP until the system becomes unresponsive due to OOM.

Upstream details: https://bugzilla.redhat.com/show_bug.cgi?id=1593884
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-01-30 03:04:09 UTC
Upstream "backport to 3.12.x" request: https://bugzilla.redhat.com/show_bug.cgi?id=1613512

"This is fixed with 3.12.13 now.
Comment 2 craig001 2019-02-14 14:42:44 UTC
please patch and change maintainer
Comment 3 Lapo Luchini 2019-06-14 13:10:24 UTC
I guess the previous comment could be read as a resignation from maintainership and, thus, this PR should not anymore be waiting on "maintainer feedback".

Hoping this will be fixed soon!
(and so soon as I have some time on hand I could try the backport myself)
Comment 4 Lapo Luchini 2019-06-14 13:21:02 UTC
I guess the previous comment could be read as a resignation from maintainership and, thus, this PR should not anymore be waiting on "maintainer feedback".

Hoping this will be fixed soon!
(and so soon as I have some time on hand I could try the backport myself)
Comment 5 Lapo Luchini 2019-07-03 07:54:16 UTC
Created attachment 205495 [details]
upgrade to 3.12.15

This is the easiest upgrade (with current patchset) from current version that contains a fix for this leak (was fixed upstream in 3.12.13).

Unfortunately, to my testing, it doesn't change much (if at all) as there are other leaks.

Upgrading to 3.13 or later might solve those, but that needs new patches that I didn't attempt.
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2019-07-03 09:08:18 UTC
(In reply to Lapo Luchini from comment #5)

Thank you for the patch Lapo. Could you reference from where this patch came?

Upstream issue/pr/commit references would be great to comment the patch with
Comment 7 Lapo Luchini 2019-07-03 10:12:09 UTC
It's a simple upgrade s/3.11.1/3.12.15/ but that had a compilation error, which I fixed by adding a missing "gf_" in a function name (as suggested by the compiler itself). (I don't understand how that even compiles upstream)

Truth said: I'm not *sure* what that function does and if my fix is strictly correct, but given the absence of "uuid_is_null()" in the sources, the presence of "gf_uuid_is_null()" and the fact that the variable is called "gfid" and the following line calls "gf_uuid_copy()" I'd say it's safe to assume that's the correct fix.