We have found one code(the same is for up_fsetxxatR and up_removexattr/up_fremovexattr) path that holds dict leak but there could be other path also those are having leak .
0x7ff423dac373 : mem_get0+0x13/0x90 [/usr/lib64/libglusterfs.so.0.0.1]
0x7ff423d7d355 : get_new_dict_full+0x25/0x120 [/usr/lib64/libglusterfs.so.0.0.1]
0x7ff423d7dbab : dict_new+0xb/0x20 [/usr/lib64/libglusterfs.so.0.0.1]
0x7ff423d7fa0a : dict_copy_with_ref+0x3a/0xe0 [/usr/lib64/libglusterfs.so.0.0.1]
0x7ff41419733a : up_setxattr+0x3a/0x450 [/usr/lib64/glusterfs/3.8.4/xlator/features/upcall.so]
0x7ff423e16684 : default_setxattr_resume+0x1d4/0x250 [/usr/lib64/libglusterfs.so.0.0.1]
0x7ff423da86ed : call_resume+0x7d/0xd0 [/usr/lib64/libglusterfs.so.0.0.1]
0x7ff40fdf9957 : iot_worker+0x117/0x220 [/usr/lib64/glusterfs/3.8.4/xlator/performance/io-threads.so]
0x7ff422be6dc5 : 0x7ff422be6dc5 [/usr/lib64/libpthread-2.17.so+0x7dc5/0x218000]
I am trying to find other path also, will send a patch after spend some more time on this.
REVIEW: http://review.gluster.org/16392 (upcall: Resolve dict leak in up_removexattr/up_setxattr code path.) posted (#1) for review on master by MOHIT AGRAWAL (firstname.lastname@example.org)
REVIEW: http://review.gluster.org/16392 (upcall: Resolve leak from up_(f)removexattr in upcall code path) posted (#2) for review on master by MOHIT AGRAWAL (email@example.com)
REVIEW: http://review.gluster.org/16392 (upcall: Resolve dict leak from up_(f)removexattr in upcall code path) posted (#3) for review on master by MOHIT AGRAWAL (firstname.lastname@example.org)
COMMIT: http://review.gluster.org/16392 committed in master by Niels de Vos (email@example.com)
Author: Mohit Agrawal <firstname.lastname@example.org>
Date: Fri Jan 13 12:17:05 2017 +0530
upcall: Resolve dict leak from up_(f)removexattr in upcall code path
Problem: In up_(f)removexattr() dict_for_key_value() is used to create a
new dict. This dict is not correctly unref'd and gets leaked.
Solution: To avoid the leak up_(f)removexattr() now also does a
dict_unref() on the newly created dict.
While reviewing the code in up_(f)setxattr() for a similar problem, it
was noticed that there is an extra dict created. There is no need for
this copy, upcall_local_init() can just take the dict that was passed as
argument to the FOP.
Signed-off-by: Mohit Agrawal <email@example.com>
NetBSD-regression: NetBSD Build System <firstname.lastname@example.org>
CentOS-regression: Gluster Build System <email@example.com>
Reviewed-by: Niels de Vos <firstname.lastname@example.org>
Smoke: Gluster Build System <email@example.com>
Mohit, bug 1417606 is for backporting this change to release-3.9. Because there are some differences in the code with respect to 3.8, I'd like your opinion on backporting it to 3.8 as well. Could you consider doing that, and if it makes sense, please clone this bug for 3.8 as well.
I have raised a request to backport the same in release-3.9.After checked the code of
release-3.8 i think we don't need to backport it in release-3.8 because in 3.8 code upcall
does not support up_setxattr or up_removexattr .
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-3.10.0, please open a new bug report.
glusterfs-3.10.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.