<div dir="ltr">Here's some more debug output. Can someone interpret it:<div><br></div><div><div>genRaInsn</div><div>    <span class="" style="white-space:pre">       </span>cmpxchgl %vI_n1nF,8(%vI_n1nD,%vI_n1nE,4)</div><div>

    r_dying      =  [%vI_n1nD, %vI_n1nE, %vI_n1nF]</div><div>    w_dying      =  []</div><div>    virt_read    =  [%vI_n1nD, %vI_n1nE, %vI_n1nF]</div><div>    virt_written =  []</div><div>    freeregs     =  FreeRegs 4282318848</div>

<div>    assig        =  [n1nD :-> InMem 0,</div><div>                     n1nE :-> InReg (RealRegSingle 2), n1nF :-> InReg (RealRegSingle 3)]</div><div>ghc-stage1: panic! (the 'impossible' happened)</div>

<div>  (GHC version 7.9.20140626 for i386-unknown-linux):</div><div><span class="" style="white-space:pre">        </span>RegAllocLinear.allocRegsAndSpill: no spill candidates</div><div><br></div><div>    allocating vreg:  VirtualRegI n1nD</div>

<div>    assignment:       [(n1nD,InMem 0),(n1nE,InReg (RealRegSingle 2)),(n1nF,InReg (RealRegSingle 3))]</div><div>    freeRegs:         FreeRegs 4282318848</div><div>    initFreeRegs:     FreeRegs 4282318861</div></div>

<div><br></div><div>(i.e. it's the cmpxchg instruction which is causing the failure.)</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 26, 2014 at 8:17 PM, Johan Tibell <span dir="ltr"><<a href="mailto:johan.tibell@gmail.com" target="_blank">johan.tibell@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm trying to understand the output from the register allocator:<div><br></div><div><div>  (GHC version 7.9.20140626 for i386-unknown-linux):</div>

<div><span style="white-space:pre-wrap">  </span>RegAllocLinear.allocRegsAndSpill: no spill candidates</div>
<div><br></div><div>    allocating vreg:  VirtualRegI n1nD</div><div>    assignment:       [(n1nD,InMem 0),(n1nE,InReg (RealRegSingle 2)),(n1nF,InReg (RealRegSingle 3))]</div><div class=""><div>    freeRegs:         FreeRegs 4282318848</div>


<div>    initFreeRegs:     FreeRegs 4282318861</div></div></div><div><br></div><div>Without understanding exactly what's wrong, the message above suggests that we're trying to allocate a reg for n1nD, but there's already an assignment for that virtual reg, is that right?</div>


<div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 26, 2014 at 3:05 PM, Johan Tibell <span dir="ltr"><<a href="mailto:johan.tibell@gmail.com" target="_blank">johan.tibell@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Herbert pushed my revert for me a minute ago. Everyone should be good once they sync.</div><div>
<div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 26, 2014 at 2:51 PM, Johan Tibell <span dir="ltr"><<a href="mailto:johan.tibell@gmail.com" target="_blank">johan.tibell@gmail.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I guess you don't have <span style="font-family:arial,sans-serif;font-size:13px">04dd7cb3423f1940242fdfe2ea2e3b</span><span style="font-family:arial,sans-serif;font-size:13px">8abd68a177 (which I pushed this morning) which is fine. You should be in a good state now when </span><span style="font-family:arial,sans-serif;font-size:13px">d8abf85f8ca176854e9d5d0b12371c</span><span style="font-family:arial,sans-serif;font-size:13px">4bc402aac3 is reverted.</span></div>



<div><div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 26, 2014 at 2:49 PM, Simon Peyton Jones <span dir="ltr"><<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.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-GB" link="blue" vlink="purple">
<div>
<p><span>git revert d8abf85f8ca176854e9d5d0b12371c4bc402aac3
<u></u><u></u></span></p>
<p><span>[master f958079] Revert "Add more primops for atomic ops on byte arrays"<u></u><u></u></span></p>
<p><span>23 files changed, 86 insertions(+), 1016 deletions(-)<u></u><u></u></span></p>
<p><span>rewrite compiler/nativeGen/CPrim.hs (62%)<u></u><u></u></span></p>
<p><span>delete mode 100644 libraries/ghc-prim/cbits/atomic.c<u></u><u></u></span></p>
<p><span>delete mode 100644 testsuite/tests/concurrent/should_run/AtomicPrimops.hs<u></u><u></u></span></p>
<p><span>delete mode 100644 testsuite/tests/concurrent/should_run/AtomicPrimops.stdout<u></u><u></u></span></p>
<p><span>HEAD $ git revert 04dd7cb3423f1940242fdfe2ea2e3b8abd68a177
<u></u><u></u></span></p>
<p><span>fatal: bad object 04dd7cb3423f1940242fdfe2ea2e3b8abd68a177<u></u><u></u></span></p>
<p><span>HEAD $<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">What now?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Simon<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> Johan Tibell [mailto:<a href="mailto:johan.tibell@gmail.com" target="_blank">johan.tibell@gmail.com</a>]
<br>
<b>Sent:</b> 26 June 2014 13:25<br>
<b>To:</b> Simon Peyton Jones<br>
<b>Cc:</b> Karel Gardas; ghc-devs<br>
<b>Subject:</b> Re: Two days old build breakage on i386.<u></u><u></u></span></p>
</div>
</div><div><div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
Just to make sure this is the same breakage, are you on an i386 Windows machine? If so git revert d8abf85f8ca176854e9d5d0b12371c4bc402aac3 and 04dd7cb3423f1940242fdfe2ea2e3b8abd68a177 to get unstuck.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm">
<u></u> <u></u></p>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
On Thu, Jun 26, 2014 at 2:13 PM, Simon Peyton Jones <<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
Aaaargh!  Once again the Windows build is broken.  I am utterly stalled.<br>
<br>
Moreover -fregs-graph and -fregs-iterative now *silently* do nothing.  At least they should elicit warnings saying that they are disabled pending the fix to X and Y.<br>
<br>
Please can someone bisect to find out which patch is the culprit?<br>
<br>
I wish we had a more systematic way to find this out. I hate being the main person who gets stuck because some unrelated change has broken the Windows build.  (Thanks for Karel, who got to it a day before me.)<br>
<br>
Thanks<br>
<br>
Simon<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
<br>
| -----Original Message-----<br>
| From: ghc-devs [mailto:<a href="mailto:ghc-devs-bounces@haskell.org" target="_blank">ghc-devs-bounces@haskell.org</a>] On Behalf Of Karel<br>
| Gardas<br>
| Sent: 26 June 2014 09:56<br>
| To: ghc-devs; Johan Tibell<br>
| Subject: Two days old build breakage on i386.<br>
|<br>
|<br>
| Hello,<br>
|<br>
| builders running on i386 building for this platform caught issue which<br>
| shows as a build breakage:<br>
|<br>
| ghc-stage1: panic! (the 'impossible' happened)<br>
| (GHC version 7.9.20140624 for i386-unknown-linux):<br>
| RegAllocLinear.allocRegsAndSpill: no spill candidates<br>
| allocating vreg: VirtualRegI n1Q6<br>
| assignment: [(c1PV,InMem 2),(n1Q5,InBoth (RealRegSingle 3)<br>
| 0),(n1Q6,InMem 1),(n1Q7,InMem 3),(n1Q9,InReg (RealRegSingle 2))]<br>
| freeRegs: FreeRegs 4282318848<br>
| initFreeRegs: FreeRegs 4282318861<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>
| make[1]: ***<br>
| [libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.o] Error 1<br>
| libraries/ghc-prim/<a href="http://ghc.mk:4" target="_blank">ghc.mk:4</a>: recipe for target<br>
| 'libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.o' failed<br>
|<br>
| Have a look for example on linux-i386 buildot log here:<br>
| <a href="http://haskell.inf.elte.hu/builders/validator1-linux-x86-head/18/7.html" target="_blank">
http://haskell.inf.elte.hu/builders/validator1-linux-x86-head/18/7.html</a><br>
|<br>
| Anyway, this happens on Linux, FreeBSD and Solaris buildbots on i386 so<br>
| it's OS independent and probably 32bit/i386 platform specific and it's<br>
| two days old breakage now. The last two night builds fail on all<br>
| mentioned buildbots. I'm not sure but perhaps:<br>
|<br>
| commit d8abf85f8ca176854e9d5d0b12371c4bc402aac3<br>
| Author: Johan Tibell <<a href="mailto:johan.tibell@gmail.com" target="_blank">johan.tibell@gmail.com</a>><br>
| Date:   Mon Jun 9 11:43:21 2014 +0200<br>
|<br>
| triggers that issue? I'm not claiming that the commit is actual culprit,<br>
| this may be just recently un-hidden issue in linear regs allocator on<br>
| i386!<br>
|<br>
| Thanks!<br>
| Karel<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
| _______________________________________________<br>
| ghc-devs mailing list<br>
| <a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
| <a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-devs</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
<u></u> <u></u></p>
</div>
</div></div></div>
</div>
</div>

</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>