Ok,<div><br></div><div>I&#39;ve simplified the example even more. Now, there is no buffer sent. Only a uint32_t as a parameter of the message handler. Each time this integer is being incremented by 1. This keeps going till it aborts when the integer received by the second core is not what it should be.</div>
<div><br></div><div>As before, there are 2 cores, one sending and the other receiving with 1 thread per core. x86_64 is the architecture.</div><div><br></div><div>This error prevents my benchmarks from running as I&#39;m sending a lot of messages from one node to another and at some point it aborts because the gasnet handler index is not correct.</div>
<div><br></div><div>Thanks for your help!</div><div><br></div><div>zeus.</div><div><br><div class="gmail_quote">El 17 de enero de 2012 15:06, Zeus Gómez Marmolejo <span dir="ltr">&lt;<a href="mailto:zeus.gomez@bsc.es">zeus.gomez@bsc.es</a>&gt;</span> escribió:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Andrew,<br><br><div class="gmail_quote">El 16 de enero de 2012 20:58, Baumann  Andrew <span dir="ltr">&lt;<a href="mailto:andrewb@inf.ethz.ch" target="_blank">andrewb@inf.ethz.ch</a>&gt;</span> escribió:<div class="im">
<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">






<div lang="EN-AU" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Hi Zeus,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">At first look your program appears to be correct if sizeof(unsigned) == 4 on both source and destination. Although sending 4kB buffers through the IDC system
 in this way is madness, it should work.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u></span></p></div></div></blockquote><div><br></div></div><div>Yes, I forgot to say that the architecture I was running is x86_64. </div>
<div class="im">
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-AU" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> <u></u></span></p>


<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Unfortunately I’m not in a good position to run this right now (… it’s a long story involving snow and an out-of-date QEMU). When it fails, is the incorrect
 value one from the previous iteration, or is it garbage?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> </span></p></div></div></blockquote><div><br></div></div><div>The incorrect value is 0 almost all the time is failing.</div>
<div class="im">
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-AU" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u></span></p>


<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">BTW, there is a minor use-after-free bug in your debug_printf() in the receive handler.<u></u><u></u></span></p>


<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> </span></p></div></div></blockquote><div><br></div></div><div>You are right, but placing the debug_printf() before the free() doesn&#39;t make the error go away.</div>
<div class="im">
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-AU" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u></span></p>


<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Andrew<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Zeus Gómez Marmolejo [mailto:<a href="mailto:zeus.gomez@bsc.es" target="_blank">zeus.gomez@bsc.es</a>]
<br>
<b>Sent:</b> Monday, 16 January 2012 11:39<br>
<b>To:</b> <a href="mailto:barrelfish-users@lists.inf.ethz.ch" target="_blank">barrelfish-users@lists.inf.ethz.ch</a><br>
<b>Subject:</b> [Barrelfish-users] Corruption sending buffer<u></u><u></u></span></p>
</div>
</div><div><div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Dear Barrelfish developers,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I believe that I&#39;ve found a bug in the message passing interface when a buffer is sent between two endpoints. I would like you to have a look at this example I&#39;m sending to you. You can copy it to the folder &quot;usr/tests/idctest&quot; of the latest
 version of the public repository. It should build correctly.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">This is a very simple example: it has 2 cores, with one thread per core. Only one core is sending a message to the other core. The message is a simple buffer of 1024 unsigned integers where the first integer and the last one is the same,
 it&#39;s incremented in each message sent. The message handler on the receiver is just checking that the first and the last integer of the buffer are the same.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The application keeps running until it finds that the two integers differ. This means that the buffer has been sent incorrectly. I&#39;ve tested this in qemu and in a real machine and after a while the program aborts because of a corrupt buffer.
 In both systems, the error happens before 2 minutes approx.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Can you have a look at this example and check whether I&#39;m doing something wrong? <br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Many thanks!!<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">-- <br>
Zeus Gómez Marmolejo<br>
Barcelona Supercomputing Center<br>
PhD student<br>
<a href="http://www.bsc.es" target="_blank">http://www.bsc.es</a><br>
<br>
<u></u><u></u></p>
</div>
</div></div></div>
</div>
</div>

</blockquote></div></div><div class="HOEnZb"><div class="h5"><br><br clear="all"><div><br></div>-- <br>Zeus Gómez Marmolejo<br>Barcelona Supercomputing Center<br>PhD student<br><a href="http://www.bsc.es" target="_blank">http://www.bsc.es</a><br>
<br><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Zeus Gómez Marmolejo<br>Barcelona Supercomputing Center<br>PhD student<br><a href="http://www.bsc.es" target="_blank">http://www.bsc.es</a><br><br>
<br>
</div>