<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 26 November 2013 23:29, Kaylor, Andrew <span dir="ltr"><<a href="mailto:andrew.kaylor@intel.com" target="_blank">andrew.kaylor@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Looking at the code, one obvious source of intermittent failure is that the Linux implementations of ReadBytes and WriteBytes don’t check for EINTR.  I doubt
 that’s the failure you’re seeing because it would be more randomly distributed but it’s something that should be fixed.</span></p></div></div></blockquote><div><br></div><div>Agreed.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:11pt">More likely as the cause of failure in your case is that read is returning less than the number of bytes requested.   In theory, this can happen if we read
 one end of the pipe while the other end is being written, but the current code doesn’t check for it.  A race condition like this seems more likely than a code generation problem.</span></p></div></div></blockquote><div>
<br></div><div>Right. What I meant by a codegen problem was not *just* a crash in the client, but code movement that would induce instability, like moving things beyond memory barriers, etc. However, I agree that the code, as it is, is not robust enough and that the compiler can be more aggressive to remove the lucky balance it has now.</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:11pt">I’m attaching a patch (which I haven’t even tried to compile) that I think addresses these issues.  Can you try it out and see if it fixes this problem for
 you?</span></p></div></div></blockquote><div><br></div><div>The patch indeed fixes the problem, but it introduces lock-ups on other (random) tests when they run simultaneously, but not so when I run them independently.</div>
<div></div></div><br></div><div class="gmail_extra">cheers,</div><div class="gmail_extra">--renato</div></div>