<div dir="ltr">Hi Ulrich,<div><br></div><div>Thanks very much for tracking that down! I'll disable these tests temporarily to get your bot building again, then write a less hacky version of the QueueChannel to fix this.</div><div><br></div><div>Cheers,</div><div>Lang.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 14, 2016 at 10:24 AM, Ulrich Weigand <span dir="ltr"><<a href="mailto:Ulrich.Weigand@de.ibm.com" target="_blank">Ulrich.Weigand@de.ibm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><p>This causes several unit tests to simply hang on s390x, which breaks the build bot:<br><br>  OrcJITTests --gtest_filter=DummyRPC.<wbr>TestAsyncIntInt<br>  OrcJITTests --gtest_filter=DummyRPC.<wbr>TestAsyncVoidBool<br>  OrcJITTests --gtest_filter=DummyRPC.<wbr>TestSerialization<br><br>In all these cases, the symptom is the same: both threads spin endlessly in QueueChannel::readBytes.   Looking at the code, the problem seems to be here:<br><br>      // If there's nothing to read then yield.<br>      while (InQueue.empty())<br>        std::this_thread::yield();<br><br>At least when using a GCC 4.8.5 host compiler with its associated libcstdc++ headers to build this test, the "yield" function is a no-op and optimized out, so we end up with effectively:<br><br>      while (InQueue.empty())<br>        ;<br><br>Since the "empty" function just tests some non-volatile member variables, this in turn gets optimized by the compiler to:<br><br>      if (InQueue.empty())<br>        for (;;);<br><br>And here we indeed spin:<br>=> 0x00000000010d5058 <+64>:    j       0x10d5058 <_<wbr>ZN12QueueChannel9readBytesEPcj<wbr>+64><br><br><br>Mit freundlichen Gruessen / Best Regards<span class="HOEnZb"><font color="#888888"><br><br>Ulrich Weigand<br><br>-- <br>  Dr. Ulrich Weigand | Phone: <a href="tel:%2B49-7031%2F16-3727" value="+497031163727" target="_blank">+49-7031/16-3727</a><br>  STSM, GNU/Linux compilers and toolchain<br>  IBM Deutschland Research & Development GmbH<br>  Vorsitzende des Aufsichtsrats: Martina Koederitz | Geschäftsführung: Dirk Wittkopp<br>  Sitz der Gesellschaft: Böblingen | Registergericht: Amtsgericht Stuttgart, HRB 243294<br>
</font></span></p></div>
</blockquote></div><br></div>