<div dir="ltr">Hi,<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 5, 2013 at 9:10 PM, Kazu Yamamoto <span dir="ltr">&lt;<a href="mailto:kazu@iij.ad.jp" target="_blank">kazu@iij.ad.jp</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<div class="im"><br>
&gt; If you need two Ctrl-Cs to kill the program, it probably means that it<br>
&gt; deadlocked somewhere, maybe in the RTS.  Kazu: if you can attach to<br>
&gt; the deadlocked process with gdb and get stack traces of all the<br>
&gt; threads, that might help.<br>
<br>
</div>To debug with GDB, I complied Mighty with &quot;-debug&quot;. This changes the<br>
behavior and I got the following error:<br>
<br>
mighty-20130905: internal error: ASSERTION FAILED: file rts/sm/MarkWeak.c, line 371<br>
<br>
    (GHC version 7.7.20130901 for i386_unknown_linux)<br>
    Please report this as a GHC bug:  <a href="http://www.haskell.org/ghc/reportabug" target="_blank">http://www.haskell.org/ghc/reportabug</a><br></blockquote><div><br>I wonder if this issue could have been introduced by the commit:<br>
<br><a href="https://github.com/ghc/ghc/commit/6770663f764db76dbb7138ccb3aea0527d194151">https://github.com/ghc/ghc/commit/6770663f764db76dbb7138ccb3aea0527d194151</a><br><br>It looks like after the commit, addCFinalizerToWeak# can call into the GC with the closure lock held. This means the info pointer points to stg_WHITEHOLE_info, breaking the asserted invariant. I haven&#39;t done any testing to confirm this, however.<br>
<br>-- Takano Akio<br></div></div></div></div>