<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jan 29, 2015 at 5:59 PM, Michael Orlitzky <span dir="ltr"><<a href="mailto:michael@orlitzky.com" target="_blank">michael@orlitzky.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":2uk" class="a3s" style="overflow:hidden">and we want to run its test suite. Basically:<br>
<br>
  * If you run the test suite using runghc, then it works fine.<br>
  * If you compile Setup.hs to setup, then the test suite hangs.<br>
  * But if you compile Setup.hs to setup using -threaded, it works?<br></div></blockquote></div><br>IIRC bytecode (runghc, ghci) always uses the threaded runtime, and this problem can be a symptom of an FFI call that can block but wasn't declared as potentially blocking; so the runtime calls it expecting it to not block and the program freezes when it does block. In the threaded runtime, other OS threads can continue executing in this case; in the non-threaded runtime, this will block the "green" thread scheduler.<br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</div></div>