<div dir="ltr"><div><div>+Prasanna<br><br></div>Prasanna changed qemu code to reuse the glfs object for adding multiple disks from same volume using refcounting. So the memory usage went down from 2GB to 200MB in the case he targetted. Wondering if the same can be done for this case too.<br><br></div>Prasanna could you let us know if we can use refcounting even in this case.<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 7, 2016 at 10:28 AM, Oleksandr Natalenko <span dir="ltr">&lt;<a href="mailto:oleksandr@natalenko.name" target="_blank">oleksandr@natalenko.name</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Correct.<br>
<div class="HOEnZb"><div class="h5"><br>
On September 7, 2016 1:51:08 AM GMT+03:00, Pranith Kumar Karampuri &lt;<a href="mailto:pkarampu@redhat.com">pkarampu@redhat.com</a>&gt; wrote:<br>
&gt;On Wed, Sep 7, 2016 at 12:24 AM, Oleksandr Natalenko &lt;<br>
&gt;<a href="mailto:oleksandr@natalenko.name">oleksandr@natalenko.name</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; Hello,<br>
&gt;&gt;<br>
&gt;&gt; thanks, but that is not what I want. I have no issues debugging gfapi<br>
&gt;apps,<br>
&gt;&gt; but have an issue with GlusterFS FUSE client not being handled<br>
&gt;properly by<br>
&gt;&gt; Massif tool.<br>
&gt;&gt;<br>
&gt;&gt; Valgrind+Massif does not handle all forked children properly, and I<br>
&gt;believe<br>
&gt;&gt; that happens because of some memory corruption in GlusterFS FUSE<br>
&gt;client.<br>
&gt;&gt;<br>
&gt;<br>
&gt;Is this the same libc issue that we debugged and provided with the<br>
&gt;option<br>
&gt;to avoid it?<br>
&gt;<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt;   Oleksandr<br>
&gt;&gt;<br>
&gt;&gt; On субота, 3 вересня 2016 р. 18:21:59 EEST <a href="mailto:feihu929@sina.com">feihu929@sina.com</a> wrote:<br>
&gt;&gt; &gt;  Hello,  Oleksandr<br>
&gt;&gt; &gt;     You can compile that simple test code posted<br>
&gt;&gt; &gt; here(<a href="http://www.gluster.org/pipermail/gluster-users/2016-" rel="noreferrer" target="_blank">http://www.gluster.org/<wbr>pipermail/gluster-users/2016-</a><br>
&gt;&gt; August/028183.html<br>
&gt;&gt; &gt; ). Then, run the command<br>
&gt;&gt; &gt; $&gt;valgrind cmd: G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind<br>
&gt;&gt; &gt; --tool=massif  ./glfsxmp the cmd will produce a file like<br>
&gt;&gt; massif.out.xxxx,<br>
&gt;&gt; &gt;  the file is the memory leak log file , you can use ms_print tool<br>
&gt;as<br>
&gt;&gt; below<br>
&gt;&gt; &gt; command $&gt;ms_print  massif.out.xxxx<br>
&gt;&gt; &gt; the cmd will output the memory alloc detail.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; the simple test code just call glfs_init and glfs_fini 100 times to<br>
&gt;found<br>
&gt;&gt; &gt; the memory leak,  by my test, all xlator init and fini is the main<br>
&gt;memory<br>
&gt;&gt; &gt; leak function. If you can locate the simple code memory leak code,<br>
&gt;maybe,<br>
&gt;&gt; &gt; you can locate the leak code in fuse client.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; please enjoy.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt; Gluster-users mailing list<br>
&gt;&gt; <a href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br>
&gt;&gt; <a href="http://www.gluster.org/mailman/listinfo/gluster-users" rel="noreferrer" target="_blank">http://www.gluster.org/<wbr>mailman/listinfo/gluster-users</a><br>
&gt;&gt;<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Pranith<br></div></div>
</div>