<html><body><p>This causes several unit tests to simply hang on s390x, which breaks the build bot:<br><br> OrcJITTests --gtest_filter=DummyRPC.TestAsyncIntInt<br> OrcJITTests --gtest_filter=DummyRPC.TestAsyncVoidBool<br> OrcJITTests --gtest_filter=DummyRPC.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 <_ZN12QueueChannel9readBytesEPcj+64><br><br><br>Mit freundlichen Gruessen / Best Regards<br><br>Ulrich Weigand<br><br>-- <br> Dr. Ulrich Weigand | Phone: +49-7031/16-3727<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>
</body></html>