+++ This bug was initially created as a clone of Bug #1635100 +++
Description of problem:
Use “gluster volume status volume_name –detail” each 15s in our product to check glusterfsd process status that will cause glusterd memory increase continues.
For 20 days, the memory is 6%, in the beginning, it is just 0.9%, from statedump, the glusterd will increase about 3M a day.
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 2078 0.4 6.2 662084 128564 ? Ssl Sep11 124:01 /usr/sbin/glusterd –vol
Could you check my patch ? I already test it, the glusterd memory leak stop increase and keep memory occupy around of that value for 12 hours.
root 2132 0.3 1.2 662080 25152 ? Ssl 16:05 0:24 /usr/sbin/glusterd --volfile=/opt/nokia/libexec/StorageUtils/etc/glusterd/glusterd.vol -p /run/glusterd.pid
root 2132 0.3 1.2 662080 25152 ? Ssl Oct01 3:00 /usr/sbin/glusterd --volfile=/opt/nokia/libexec/StorageUtils/etc/glusterd/glusterd.vol -p /run/glusterd.pid
root 2132 0.3 1.2 662080 25140 ? Ssl Oct01 3:05 /usr/sbin/glusterd --volfile=/opt/nokia/libexec/StorageUtils/etc/glusterd/glusterd.vol -p /run/glusterd.pid
In the gluster v status process ,The cli response is allocated by glusterd and should be freed by cli, but cli do not free it, so glusterd memory will keep increased.
@@ -8436,6 +8436,7 @@
ret = rsp.op_ret;
--- Additional comment from Atin Mukherjee on 2018-10-02 09:35:05 EDT ---
upstream patch : https://review.gluster.org/#/c/21316/
REVIEW: https://review.gluster.org/21316 (cli: fix glusterd memory leak cause by \"gluster v status volume_name\") posted (#2) for review on master by Atin Mukherjee
Interestingly the bot didn't move this BZ to modified even though the patch is merged.
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-6.0, please open a new bug report.
glusterfs-6.0 has been announced on the Gluster mailinglists , packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist  and the update infrastructure for your distribution.