Hide Forgot
this is observed in 3.0.5rc6.
There is a memory-leak in sp_process_inode_ctx. This is the valgrind output reporting the leak. 279 bytes in 10 blocks are definitely lost in loss record 94 of 145 ==4084== at 0x4C24E27: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==4084== by 0x55234D1: strdup (in /lib64/libc-2.9.so) ==4084== by 0x4E4262B: loc_copy (xlator.c:1024) ==4084== by 0x73013AD: sp_process_inode_ctx (stat-prefetch.c:284) ==4084== by 0x730EED3: sp_getxattr (stat-prefetch.c:3064) ==4084== by 0x75269B7: fuse_getxattr (fuse-bridge.c:2669) ==4084== by 0x7528C0F: fuse_thread_proc (fuse-bridge.c:3193) ==4084== by 0x528E39F: start_thread (in /lib64/libpthread-2.9.so) ==4084== by 0x5587BDC: clone (in /lib64/libc-2.9.so) in sp_getxattr_cbk it should be SP_STACK_UNWIND which frees the local structure, but STACK_UNWIND is used, thus causing a leak.
PATCH: http://patches.gluster.com/patch/3413 in release-3.0 (free local->loc structure by using SP_STACK_UNWIND instead of STACK_UNWIND)
Raghu - is this code going in 3.1 also ?
PATCH: http://patches.gluster.com/patch/4227 in master (performance/stat-prefetch: use SP_STACK_UNWIND instead of STACK_UNWIND_STRICT.)