<p dir="ltr"><br>
On Mar 24, 2015 10:48 PM, &quot;Emmanuel Dreyfus&quot; &lt;<a href="mailto:manu@netbsd.org">manu@netbsd.org</a>&gt; wrote:<br>
&gt;<br>
&gt; Hi<br>
&gt;<br>
&gt; The merge of <a href="http://review.gluster.org/9953/">http://review.gluster.org/9953/</a> removed a few crashes from<br>
&gt; NetBSD regression tests, but the thing remains uterly broken since the<br>
&gt; merge of <a href="http://review.gluster.org/9708/">http://review.gluster.org/9708/</a> though I cannot tell if I have<br>
&gt; bugs leftover form this commit or if I face new problems.<br>
&gt;<br>
&gt; Here are the known problem so far:<br>
&gt;<br>
&gt; 1) This needs to be merged:<br>
&gt; <a href="http://review.gluster.org/9831">http://review.gluster.org/9831</a><br>
&gt; <a href="http://review.gluster.org/9944">http://review.gluster.org/9944</a><br>
&gt;<br>
&gt; 2) I still experience memory corruption, which usually crash glsuterfsd<br>
&gt; because some pointer waas replaced by value 0x3. This strikes on iobref<br>
&gt; most of the time, but it can happens elsewhere.<br>
&gt;<br>
&gt; I would be glad if someone could help here. On nbslave70:/autobuild I<br>
&gt; added code to check for iobref/iobuf sanity at random place (by calling<br>
&gt; iobref_sanity()). I do this in synask_wrap and in STACK_WIND/UNWIND,<br>
&gt; but I have not been able to spot the source of the problem yet.</p>
<p dir="ltr">I&#39;ll take a look at this tomorrow.</p>
<p dir="ltr">&gt;<br>
&gt; The weird thing is that memory seems to always be overwritten by the<br>
&gt; same values, and magic 0xcafebabe number before the buffer is preserved.<br>
&gt; Here is an example: where iobref-&gt;iobrefs = 0xbb11a458<br>
&gt; 0xbb11a44c:     0xcafebabe      0x00000000      0x00000000      0x00000003<br>
&gt; 0xbb11a45c:     0x00000003      0x00000008      0x00000003      0x0000000c<br>
&gt; 0xbb11a46c:     0x00000003      0x0000000e      0x00000003      0x00000010<br>
&gt; 0xbb11a47c:     0x00000003      0x00000009      0x00000003      0x0000000d<br>
&gt; 0xbb11a48c:     0x00000003      0x00000015      0x00000003      0x00000016<br>
&gt; 0xbb11a49c:     0x00000003      0x00000032      0x00000034      0xbb1e2018<br>
&gt; 0xbb11a4ac:     0xcafebabe      0x00000000      0x00000000      0xbb11a5d8<br>
&gt;<br>
&gt;<br>
&gt; Additionnaly, there are two workarounds I had to make for crashes<br>
&gt; that happen sometime:<br>
&gt; 3) I had to make this change (not yet posted on gerrit) to avoid crashing<br>
&gt; because op = GD_OP_NONE. Things seems to go fins without the test.<br>
&gt; a cause or a symptom:<br>
&gt;<br>
&gt; diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c<br>
&gt; index 02d2cfb..c06959c 100644<br>
&gt; --- a/xlators/mgmt/glusterd/src/glusterd-utils.c<br>
&gt; +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c<br>
&gt; @@ -8301,15 +8301,12 @@ out:<br>
&gt;  int<br>
&gt;  glusterd_volume_heal_use_rsp_dict (dict_t *aggr, dict_t *rsp_dict)<br>
&gt;  {<br>
&gt;          int            ret      = 0;<br>
&gt;          dict_t        *ctx_dict = NULL;<br>
&gt; -        glusterd_op_t  op       = GD_OP_NONE;<br>
&gt; +        glusterd_op_t  op       = GD_OP_HEAL_VOLUME;<br>
&gt;<br>
&gt;          GF_ASSERT (rsp_dict);<br>
&gt;<br>
&gt; -        op = glusterd_op_get_op ();<br>
&gt; -        GF_ASSERT (GD_OP_HEAL_VOLUME == op);<br>
&gt; -<br>
&gt;          if (aggr) {<br>
&gt;                  ctx_dict = aggr;<br>
&gt;<br>
&gt;<br>
&gt; 4) Here I crash because this-&gt;private = NULL, and here is a<br>
&gt; workaround:<br>
&gt;<br>
&gt; diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c<br>
&gt; index ae08adc..3918e07 100644<br>
&gt; --- a/xlators/storage/posix/src/posix.c<br>
&gt; +++ b/xlators/storage/posix/src/posix.c<br>
&gt; @@ -913,6 +913,7 @@ posix_opendir (call_frame_t *frame, xlator_t *this,<br>
&gt;<br>
&gt;          VALIDATE_OR_GOTO (frame, out);<br>
&gt;          VALIDATE_OR_GOTO (this, out);<br>
&gt; +        VALIDATE_OR_GOTO (this-&gt;private, out);<br>
&gt;          VALIDATE_OR_GOTO (loc, out);<br>
&gt;          VALIDATE_OR_GOTO (fd, out);<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; 4)<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Emmanuel Dreyfus<br>
&gt; <a href="mailto:manu@netbsd.org">manu@netbsd.org</a><br>
&gt; _______________________________________________<br>
&gt; Gluster-devel mailing list<br>
&gt; <a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
&gt; <a href="http://www.gluster.org/mailman/listinfo/gluster-devel">http://www.gluster.org/mailman/listinfo/gluster-devel</a><br>
</p>