Bug 1564419

Summary: Client side memory leak in encryption xlator (crypt.c).
Product: [Community] GlusterFS Reporter: Gergo Huszty <gergo.huszty>
Component: encryption-xlatorAssignee: bugs <bugs>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: glusterfs-5.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-23 15:06:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gergo Huszty 2018-04-06 08:42:07 UTC
Description of problem:
Memory leak is identified on gluster client side when using encrypted volumes.
The leak is triggered mainly with read/access operations.

Version-Release number of selected component (if applicable):


How reproducible:
Lot of file read/access.

Steps to Reproduce:
1. Mount an encrypted GlusterFS volume.
2. Create a few thousand files on it.
3. while true; do ls -R /mnt/test/ > /dev/null 2>&1; done &

Actual results:
Memory usage is increasing, visible with valgrind.

Expected results:
Memory usage is not increasing, or not forever.

Additional info:
Fix implemented, will submit into Gerrit.

Comment 1 Worker Ant 2018-04-06 08:53:20 UTC
REVIEW: https://review.gluster.org/19830 (Fix for memory-leak in crypt xlator) posted (#1) for review on master by

Comment 2 Worker Ant 2018-05-21 07:39:39 UTC
COMMIT: https://review.gluster.org/19830 committed in master by "Amar Tumballi" <amarts> with a commit message- Fix for memory-leak in crypt xlator

Crypt xlator occasionaly uses local storage in it's call frame.
These frames are managed with common macroes, which does not take
care about cleaning up such local storages. The fix is similar to
the other xlators' solution. A crypt specific macro handles the
cleaning of the local storage when it is allocated.

Change-Id: Ibb5b91551fbe70905e9c8c688d999fe702433e35
fixes: bz#1564419
Signed-off-by: Gergo Huszty <gergo.huszty>

Comment 3 Shyamsundar 2018-10-23 15:06:59 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-5.0, please open a new bug report.

glusterfs-5.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] https://lists.gluster.org/pipermail/announce/2018-October/000115.html
[2] https://www.gluster.org/pipermail/gluster-users/