Description of problem: Memory leak in stripe in stripe_readv_fstat_cbk when this condition is true: if ((local->replies[i].op_ret < local->replies[i].requested_size) && (local->stbuf_size > (local->offset + op_ret))) { When iobuf is created it has reference count = 1. After iobref_add (local->iobref, iobuf); reference count becomes 2. After iobref_unref(local->iobref); it becomes 1 and never becomes 0. So iobuf never deletes and this causes a memory leak. Version-Release number of selected component (if applicable): 3.2.5 and git latest How reproducible: Always Steps to Reproduce: 1. Make a files on bricks that makes this condition true 2. Read them and look on memory consumption. Outpu from top: 4618 root 20 0 1721m 1.5g 1868 S 0.0 16.2 5:41.77 glusterfs I don't know if a condition can be true in usual environment, but when is true the memory leaks. Actual results: Memory leaks. Expected results: Memory doesn't leak. Additional info: See my proposed patch on review board: http://review.gluster.com/#change,3340
CHANGE: http://review.gluster.com/3340 (Fixed a memory leak in stripe translator.) merged in master by Anand Avati (avati)
tried with glusterfs-3.3.0 and no more leaks were found. Made sure that 'stripe_readv_fstat_cbk() is called by adding a gf_log() in that function for verification.