<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 1, 2015 at 10:34 PM, Justin Clift <span dir="ltr">&lt;<a href="mailto:justin@gluster.org" target="_blank">justin@gluster.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On 1 Apr 2015, at 10:57, Emmanuel Dreyfus &lt;<a href="mailto:manu@netbsd.org">manu@netbsd.org</a>&gt; wrote:<br>
&gt; Hi<br>
&gt;<br>
&gt; crypt.t was recently broken in NetBSD regression. The glusterfs returns<br>
&gt; a node with file type invalid to FUSE, and that breaks the test.<br>
&gt;<br>
&gt; After running a git bisect, I found the offending commit after which<br>
&gt; this behavior appeared:<br>
&gt;    8a2e2b88fc21dc7879f838d18cd0413dd88023b7<br>
&gt;    mem-pool: invalidate memory on GF_FREE to aid debugging<br>
&gt;<br>
&gt; This means the bug has always been there, but this debugging aid<br>
&gt; caused it to be reliable.<br>
<br>
</span>Sounds like that commit is a good win then. :)<br>
<br>
Harsha/Pranith/Lala, your names are on the git blame for crypt.c...<br>
any ideas? :)<br>
<br></blockquote><div><br></div><div>I found one issue that local is not allocated using GF_CALLOC and with a mem-type.</div><div>This is a patch which *might* fix it.</div><div><br></div><div>diff --git a/xlators/encryption/crypt/src/crypt-mem-types.h b/xlators/encryption/crypt/src/crypt-mem-types.h</div><div>index 2eab921..c417b67 100644</div><div>--- a/xlators/encryption/crypt/src/crypt-mem-types.h</div><div>+++ b/xlators/encryption/crypt/src/crypt-mem-types.h</div><div>@@ -24,6 +24,7 @@ enum gf_crypt_mem_types_ {</div><div>        gf_crypt_mt_key,</div><div>        gf_crypt_mt_iovec,</div><div>        gf_crypt_mt_char,</div><div>+        gf_crypt_mt_local,</div><div>        gf_crypt_mt_end,</div><div> };</div><div> </div><div>diff --git a/xlators/encryption/crypt/src/crypt.c b/xlators/encryption/crypt/src/crypt.c</div><div>index ae8cdb2..63c0977 100644</div><div>--- a/xlators/encryption/crypt/src/crypt.c</div><div>+++ b/xlators/encryption/crypt/src/crypt.c</div><div>@@ -48,7 +48,7 @@ static crypt_local_t *crypt_alloc_local(call_frame_t *frame, xlator_t *this,</div><div> {</div><div>        crypt_local_t *local = NULL;</div><div> </div><div>-       local = mem_get0(this-&gt;local_pool);</div><div>+        local = GF_CALLOC (sizeof (*local), 1, gf_crypt_mt_local);</div><div>        if (!local) {</div><div>                gf_log(this-&gt;name, GF_LOG_ERROR, &quot;out of memory&quot;);</div><div>                return NULL;</div><div><br></div><div><br></div><div>Niels should be able to recognize if this is sufficient fix or not.</div><div><br></div><div>Thanks,</div><div>Raghavendra Talur</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+ Justin<br>
<br>
--<br>
GlusterFS - <a href="http://www.gluster.org" target="_blank">http://www.gluster.org</a><br>
<br>
An open source, distributed file system scaling to several<br>
petabytes, and handling thousands of clients.<br>
<br>
My personal twitter: <a href="http://twitter.com/realjustinclift" target="_blank">twitter.com/realjustinclift</a><br>
<div class=""><div class="h5"><br>
_______________________________________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
<a href="http://www.gluster.org/mailman/listinfo/gluster-devel" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><font color="#666666"><b>Raghavendra Talur </b></font><div><br></div></div></div>
</div></div>