Opened 3 years ago

Closed 3 years ago

#9964 closed bug (fixed)

GHC crash with NOINLINE and weird IO stuff

Reported by: dfeuer Owned by:
Priority: normal Milestone: 7.10.2
Component: Compiler Version: 7.11
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Compile-time crash Test Case: codeGen/should_compile/T9964
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by dfeuer)

{-# LANGUAGE UnboxedTuples #-}
module Crash where

import GHC.Base

crash :: IO ()
crash = IO (\s ->
  let
    {-# NOINLINE s' #-}
    s' = s
  in (# s', () #))

This compiles under 7.6.3, but both 7.8.3 and head choke:

ghc: panic! (the 'impossible' happened)
  (GHC version 7.8.3 for x86_64-unknown-linux):
        StgCmmEnv: variable not found
    s{v sLw} [lid]
    local binds for:

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Change History (15)

comment:1 Changed 3 years ago by dfeuer

Description: modified (diff)

comment:2 Changed 3 years ago by dfeuer

Note that the same thing happens with ST instead of IO, or in fact with a bare function of type State# a -> (# State# a, () #). It is not affected by optimization level.

The NOINLINE is essential, as is using something that handles a State# token—substituting another unboxed type like Int# in its place does not cause this problem. Using undefined or s instead of s' in the return value makes the problem go away.

Here's the tail end of -v3 -dverbose-core2core:

==================== CorePrep ====================
Result size of CorePrep = {terms: 12, types: 17, coercions: 3}

a_rHJ
  :: GHC.Prim.State# GHC.Prim.RealWorld
     -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #)
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType, Unf=OtherCon []]
a_rHJ =
  \ (s_sJW [Occ=Once] :: GHC.Prim.State# GHC.Prim.RealWorld) ->
    case s_sJW of s'_sJX [InlPrag=NOINLINE] { __DEFAULT ->
    (# s'_sJX, GHC.Tuple.() #)
    }

Crash.crash :: GHC.Types.IO ()
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType, Unf=OtherCon []]
Crash.crash =
  (\ (eta_B1 [Occ=Once, OS=OneShot]
        :: GHC.Prim.State# GHC.Prim.RealWorld) ->
     a_rHJ eta_B1)
  `cast` (Sym (GHC.Types.NTCo:IO[0] <()>_R)
          :: (GHC.Prim.State# GHC.Prim.RealWorld
              -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #))
               ~#
             GHC.Types.IO ())



*** Stg2Stg:
*** CodeOutput:
*** New CodeGen:
*** CPSZ:
*** CPSZ:
*** Deleting temp files:
Warning: deleting non-existent /tmp/ghc3661_0/ghc3661_3.c
Warning: deleting non-existent /tmp/ghc3661_0/ghc3661_1.s
*** Deleting temp dirs:
ghc: panic! (the 'impossible' happened)
  (GHC version 7.8.3 for x86_64-unknown-linux):
        StgCmmEnv: variable not found
    s{v sJW} [lid]
    local binds for:

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

comment:3 Changed 3 years ago by dfeuer

Milestone: 7.10.1

rwbarton suggests setting a 7.10.1 milestone for this. Obviously if the problem turns out to be a deep one we can push it back.

comment:4 Changed 3 years ago by thoughtpolice

Milestone: 7.10.17.10.2

Simon says this is a real bug, but it's a corner case and a bit tricky to solve. So at the moment, I'm punting this one to a bugfix release.

comment:5 Changed 3 years ago by Simon Peyton Jones <simonpj@…>

In 9c78d09e344e97d2d5c37b9bb46e311a3cf031e2/ghc:

Add a bizarre corner-case to cgExpr (Trac #9964)

David Feuer managed to tickle a corner case in the
code generator. See Note [Scrutinising VoidRep]
in StgCmmExpr.

I rejigged the comments in that area of the code generator
  Note [Dodgy unsafeCoerce 1]
  Note [Dodgy unsafeCoerce 2]
but I can't say I fully understand them, alas.

comment:6 Changed 3 years ago by simonpj

Status: newmerge
Test Case: codeGen/should_compile/T9964

Well that is indeed a bizarre example David. Did it arise from real code in some way?

Anyway I believe I've fixed it.

Merge to 7.10

Simon

comment:7 in reply to:  6 Changed 3 years ago by dfeuer

Replying to simonpj:

Well that is indeed a bizarre example David. Did it arise from real code in some way?

Anyway I believe I've fixed it.

Merge to 7.10

Simon

A while back, I asked whether seq# was really necessary to implement evaluate. I was trying to figure out if sufficient NOINLINE use would be able to avoid it. I was a bit surprised to crash the compiler! The example given is only slightly stripped down from my initial experiment.

comment:8 Changed 3 years ago by mietek

I may have found a way to reliably reproduce this bug using real code: attempt to bootstrap cabal-install 1.20.0.3 on 32-bit Red Hat Enterprise Linux 6.5, released on 11/11/2014 (available on Amazon EC2).

The official 32-bit GHC 7.8.4 bindist panics:

...
Configuring Cabal-1.20.0.0...
Building Cabal-1.20.0.0...
Preprocessing library Cabal-1.20.0.0...
[ 1 of 78] Compiling Paths_Cabal      ( dist/build/autogen/Paths_Cabal.hs, dist/build/Paths_Cabal.o )
[ 2 of 78] Compiling Distribution.TestSuite ( Distribution/TestSuite.hs, dist/build/Distribution/TestSuite.o )
[ 3 of 78] Compiling Distribution.Simple.PreProcess.Unlit ( Distribution/Simple/PreProcess/Unlit.hs, dist/build/Distribution/Simple/PreProcess/Unlit.o )
[ 4 of 78] Compiling Distribution.GetOpt ( Distribution/GetOpt.hs, dist/build/Distribution/GetOpt.o )
[ 5 of 78] Compiling Distribution.PackageDescription.Utils ( Distribution/PackageDescription/Utils.hs, dist/build/Distribution/PackageDescription/Utils.o )
[ 6 of 78] Compiling Distribution.Simple.CCompiler ( Distribution/Simple/CCompiler.hs, dist/build/Distribution/Simple/CCompiler.o )
[ 7 of 78] Compiling Distribution.Compat.ReadP ( Distribution/Compat/ReadP.hs, dist/build/Distribution/Compat/ReadP.o )
[ 8 of 78] Compiling Distribution.Text ( Distribution/Text.hs, dist/build/Distribution/Text.o )
[ 9 of 78] Compiling Distribution.Version ( Distribution/Version.hs, dist/build/Distribution/Version.o )
[10 of 78] Compiling Distribution.Compiler ( Distribution/Compiler.hs, dist/build/Distribution/Compiler.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 7.8.4 for i386-unknown-linux):
	StgCmmEnv: variable not found
    $dOrd_aJIr{v} [lid]
    local binds for:
    Cabal-1.20.0.0:Distribution.Compiler.knownCompilerFlavors{v rJxS} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.parseCompilerFlavorCompat{v rJxU} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.buildCompilerFlavor{v rJxV} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.buildCompilerId{v rJxX} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.defaultCompilerFlavor{v rJxY} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerId{v rJyS} [gid[DFunId]]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor{v rJyV} [gid[DFunId]]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerFlavor{v rJyX} [gid[DFunId]]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor{v rJyZ} [gid[DFunId]]
    Cabal-1.20.0.0:Distribution.Compiler.$fEqCompilerFlavor{v rJz1} [gid[DFunId]]
    Cabal-1.20.0.0:Distribution.Compiler.$fOrdCompilerFlavor{v rJz3} [gid[DFunId]]
    Cabal-1.20.0.0:Distribution.Compiler.$fTypeableCompilerFlavor{v rJz5} [gid[DFunId(nt)]]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor{v rJz8} [gid[DFunId]]
    Cabal-1.20.0.0:Distribution.Compiler.$fEqCompilerId{v rJza} [gid[DFunId]]
    Cabal-1.20.0.0:Distribution.Compiler.$fOrdCompilerId{v rJzc} [gid[DFunId]]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerId{v rJze} [gid[DFunId]]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerId{v rJzg} [gid[DFunId]]
    Cabal-1.20.0.0:Distribution.Compiler.$tCompilerFlavor{v rJzi} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$cGHC{v rJA5} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$cNHC{v rJA6} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$cYHC{v rJA7} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$cHugs{v rJA8} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$cHBC{v rJA9} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$cHelium{v rJAa} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$cJHC{v rJAb} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$cLHC{v rJAc} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$cUHC{v rJAd} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$cHaskellSuite{v rJAe} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$cOtherCompiler{v rJAf} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor_$cgmapMo{v rJNI} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$w$cgmapMo{v rKP4} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor_$cgmapMp{v rKP5} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$w$cgmapMp{v rKP6} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor_$cgmapM{v rKP7} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor_$cgfoldl{v rKP8} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor1{v rKP9} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor2{v rKPa} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor_$cgmapQi{v rKPb} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$w$cgmapQi{v rKPc} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor_$cgmapQ{v rKPd} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor_$cgmapQr{v rKPe} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor_$cgmapQl{v rKPf} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor_$cgmapT{v rKPg} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor_$cdataCast2{v rKPh} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor_$cdataCast1{v rKPi} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor_$cdataTypeOf{v rKPj} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor3{v rKPk} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor4{v rKPl} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor5{v rKPm} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor6{v rKPn} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor7{v rKPo} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor8{v rKPp} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor9{v rKPq} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor10{v rKPr} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor11{v rKPs} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor12{v rKPt} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor13{v rKPu} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor14{v rKPv} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor15{v rKPw} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor_$ctoConstr{v rKPx} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor_$cgunfold{v rKPy} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$w$cgunfold{v rKPz} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor_$ctypeRep#{v rKPA} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor16{v rKPB} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor17{v rKPC} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor_ww5{v rKPD} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor_ww4{v rKPE} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fDataCompilerFlavor_ww3{v rKPF} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fEqCompilerFlavor_$c/={v rKPG} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fEqCompilerFlavor_$c=={v rKPH} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fEqCompilerId_$c/={v rKPI} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fEqCompilerId_$c=={v rKPJ} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$w$c=={v rKPK} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fOrdCompilerFlavor_$cmin{v rKPL} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fOrdCompilerFlavor_$ccompare{v rKPM} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fOrdCompilerFlavor_$cmax{v rKPN} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fOrdCompilerFlavor_$c<={v rKPO} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fOrdCompilerFlavor_$c>{v rKPP} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fOrdCompilerFlavor_$c>={v rKPQ} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fOrdCompilerFlavor_$c<{v rKPR} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fOrdCompilerId_$cmin{v rKPS} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fOrdCompilerId_$cmax{v rKPT} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fOrdCompilerId_$c<={v rKPU} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$w$c<={v rKPV} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fOrdCompilerId_$c>{v rKPW} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$w$c>{v rKPX} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fOrdCompilerId_$c>={v rKPY} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$w$c>={v rKPZ} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fOrdCompilerId1{v rKQ0} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fOrdCompilerId_$c<{v rKQ2} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$w$c<{v rKQ3} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fOrdCompilerId_$ccompare{v rKQ4} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$w$ccompare{v rKQ5} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor_$creadListPrec{v rKQ6} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor1{v rKQ7} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor2{v rKQ8} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor3{v rKQ9} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor4{v rKQa} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor5{v rKQb} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor6{v rKQc} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor7{v rKQd} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor8{v rKQe} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor9{v rKQf} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor10{v rKQg} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor11{v rKQh} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor12{v rKQi} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor13{v rKQj} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor14{v rKQk} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor15{v rKQl} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor16{v rKQm} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor17{v rKQn} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor18{v rKQo} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor19{v rKQp} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor20{v rKQq} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor21{v rKQr} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor22{v rKQs} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor23{v rKQt} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor24{v rKQu} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor25{v rKQv} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor26{v rKQw} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor27{v rKQx} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor28{v rKQy} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor29{v rKQz} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor30{v rKQA} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor31{v rKQB} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor32{v rKQC} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor33{v rKQD} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor34{v rKQE} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor35{v rKQF} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor36{v rKQG} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor37{v rKQH} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor38{v rKQI} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor39{v rKQJ} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor40{v rKQK} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor41{v rKQL} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor_$creadPrec{v rKQM} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor_$creadList{v rKQN} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor42{v rKQO} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerFlavor_$creadsPrec{v rKQP} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerId_$creadListPrec{v rKQQ} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerId1{v rKQR} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerId2{v rKQS} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerId3{v rKQT} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$wa{v rKQU} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerId4{v rKQV} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerId5{v rKQW} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerId_$creadPrec{v rKQX} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerId_$creadList{v rKQY} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerId6{v rKQZ} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fReadCompilerId_$creadsPrec{v rKR0} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerFlavor_$cshowList{v rKR1} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerFlavor1{v rKR2} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerFlavor2{v rKR3} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerFlavor_$cshowsPrec{v rKR4} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerFlavor3{v rKR5} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerFlavor4{v rKR6} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerFlavor5{v rKR7} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerFlavor6{v rKR8} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerFlavor7{v rKR9} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerFlavor8{v rKRa} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerFlavor9{v rKRb} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerFlavor10{v rKRc} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerFlavor11{v rKRd} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerFlavor12{v rKRe} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerFlavor13{v rKRf} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerFlavor_$cshow{v rKRg} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerId_$cshowList{v rKRh} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerId1{v rKRi} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$w$cshowsPrec{v rKRj} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerId2{v rKRk} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerId_$cshow{v rKRl} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$w$cshow{v rKRm} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fShowCompilerId_$cshowsPrec{v rKRn} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor_$cparse{v rKRo} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor1{v rKRp} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$wa1{v rKRq} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor2{v rKRr} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor3{v rKRs} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor4{v rKRt} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor5{v rKRu} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor6{v rKRv} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor7{v rKRw} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor8{v rKRx} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor9{v rKRy} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor10{v rKRz} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor_go{v rKRA} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor_$cdisp{v rKRB} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor11{v rKRC} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor12{v rKRD} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor_s{v rKRE} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor13{v rKRF} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor14{v rKRG} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor15{v rKRH} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor16{v rKRI} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor17{v rKRJ} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor18{v rKRK} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor19{v rKRL} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerFlavor20{v rKRM} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerId_$cparse{v rKRN} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerId1{v rKRO} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$wa2{v rKRP} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerId2{v rKRQ} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerId3{v rKRR} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerId4{v rKRS} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerId_$cdisp{v rKRT} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$w$cdisp{v rKRU} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerId5{v rKRV} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$fTextCompilerId6{v rKRW} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.buildCompilerFlavor1{v rKRX} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.parseCompilerFlavorCompat1{v rKRY} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.$wa3{v rKRZ} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.parseCompilerFlavorCompat_compilerMap{v rKS0} [gid]
    Cabal-1.20.0.0:Distribution.Compiler.parseCompilerFlavorCompat_go{v rKS1} [gid]
    lvl{v rKS2} [gid]
    lvl1{v rKS3} [gid]
    lvl2{v rKS4} [gid]
    lvl3{v rKS5} [gid]
    lvl4{v rKS6} [gid]
    lvl5{v rKS7} [gid]
    lvl6{v rKS8} [gid]
    lvl7{v rKS9} [gid]
    lvl8{v rKSa} [gid]
    lvl9{v rKSb} [gid]
    lvl10{v rKSc} [gid]
    lvl11{v rKSd} [gid]
    lvl12{v rKSe} [gid]
    lvl13{v rKSf} [gid]
    lvl14{v rKSg} [gid]
    lvl15{v rKSh} [gid]
    lvl16{v rKSi} [gid]
    lvl17{v rKSj} [gid]
    lvl18{v rKSk} [gid]
    lvl19{v rKSl} [gid]

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
Last edited 3 years ago by mietek (previous) (diff)

comment:9 Changed 3 years ago by mietek

Similarly, 32-bit GHC 7.8.3 segfaults:

...
Configuring Cabal-1.20.0.0...
Building Cabal-1.20.0.0...
Preprocessing library Cabal-1.20.0.0...
[ 1 of 78] Compiling Paths_Cabal      ( dist/build/autogen/Paths_Cabal.hs, dist/build/Paths_Cabal.o )
[ 2 of 78] Compiling Distribution.TestSuite ( Distribution/TestSuite.hs, dist/build/Distribution/TestSuite.o )
[ 3 of 78] Compiling Distribution.Simple.PreProcess.Unlit ( Distribution/Simple/PreProcess/Unlit.hs, dist/build/Distribution/Simple/PreProcess/Unlit.o )
[ 4 of 78] Compiling Distribution.GetOpt ( Distribution/GetOpt.hs, dist/build/Distribution/GetOpt.o )
[ 5 of 78] Compiling Distribution.PackageDescription.Utils ( Distribution/PackageDescription/Utils.hs, dist/build/Distribution/PackageDescription/Utils.o )
[ 6 of 78] Compiling Distribution.Simple.CCompiler ( Distribution/Simple/CCompiler.hs, dist/build/Distribution/Simple/CCompiler.o )
[ 7 of 78] Compiling Distribution.Compat.ReadP ( Distribution/Compat/ReadP.hs, dist/build/Distribution/Compat/ReadP.o )
[ 8 of 78] Compiling Distribution.Text ( Distribution/Text.hs, dist/build/Distribution/Text.o )
[ 9 of 78] Compiling Distribution.Version ( Distribution/Version.hs, dist/build/Distribution/Version.o )
[10 of 78] Compiling Distribution.Compiler ( Distribution/Compiler.hs, dist/build/Distribution/Compiler.o )
./bootstrap.sh: line 212: 27240 Segmentation fault      (core dumped) ./Setup build ${EXTRA_BUILD_OPTS} ${VERBOSE}
Last edited 3 years ago by mietek (previous) (diff)

comment:10 Changed 3 years ago by mietek

However, 32-bit GHC 7.8.2 does not fail, and manages to bootstrap cabal-install 1.20.0.3 successfully.

comment:11 Changed 3 years ago by simonpj

I may have found a way to reliably reproduce this bug using real code:

Well you are reliably producing some bug, but I think it's pretty unlikely that it is the subject of this ticket!

Does it happen with the 7.10 release candidate? Have you got -dcore-lint on?

comment:12 Changed 3 years ago by mietek

I wasn’t able to check this with the 7.10 release candidates yet, as the available bindists don’t support RHEL 6. I haven’t tried to compile 7.10 for RHEL 6 from source yet.

When trying to bootstrap cabal-install 1.22.0.0 with 32-bit GHC 7.8.4, there’s another failure:

...
Configuring Cabal-1.22.0.0...
Building Cabal-1.22.0.0...
Preprocessing library Cabal-1.22.0.0...
[ 1 of 80] Compiling Paths_Cabal      ( dist/build/autogen/Paths_Cabal.hs, dist/build/Paths_Cabal.o )
[ 2 of 80] Compiling Distribution.TestSuite ( Distribution/TestSuite.hs, dist/build/Distribution/TestSuite.o )
[ 3 of 80] Compiling Distribution.Simple.PreProcess.Unlit ( Distribution/Simple/PreProcess/Unlit.hs, dist/build/Distribution/Simple/PreProcess/Unlit.o )
[ 4 of 80] Compiling Distribution.GetOpt ( Distribution/GetOpt.hs, dist/build/Distribution/GetOpt.o )
[ 5 of 80] Compiling Distribution.PackageDescription.Utils ( Distribution/PackageDescription/Utils.hs, dist/build/Distribution/PackageDescription/Utils.o )
[ 6 of 80] Compiling Distribution.Simple.CCompiler ( Distribution/Simple/CCompiler.hs, dist/build/Distribution/Simple/CCompiler.o )
[ 7 of 80] Compiling Distribution.Compat.ReadP ( Distribution/Compat/ReadP.hs, dist/build/Distribution/Compat/ReadP.o )
[ 8 of 80] Compiling Distribution.Text ( Distribution/Text.hs, dist/build/Distribution/Text.o )
[ 9 of 80] Compiling Distribution.Version ( Distribution/Version.hs, dist/build/Distribution/Version.o )
[10 of 80] Compiling Language.Haskell.Extension ( Language/Haskell/Extension.hs, dist/build/Language/Haskell/Extension.o )
[11 of 80] Compiling Distribution.Compiler ( Distribution/Compiler.hs, dist/build/Distribution/Compiler.o )
[12 of 80] Compiling Distribution.Simple.Compiler ( Distribution/Simple/Compiler.hs, dist/build/Distribution/Simple/Compiler.o )
[13 of 80] Compiling Distribution.Simple.GHC.ImplInfo ( Distribution/Simple/GHC/ImplInfo.hs, dist/build/Distribution/Simple/GHC/ImplInfo.o )

Distribution/Simple/GHC/ImplInfo.hs:17:1: Warning:
    The import of ‘CompilerId’
    from module ‘Distribution.Simple.Compiler’ is redundant
[14 of 80] Compiling Distribution.License ( Distribution/License.hs, dist/build/Distribution/License.o )
[15 of 80] Compiling Distribution.ModuleName ( Distribution/ModuleName.hs, dist/build/Distribution/ModuleName.o )
[16 of 80] Compiling Distribution.Package ( Distribution/Package.hs, dist/build/Distribution/Package.o )
[17 of 80] Compiling Distribution.System ( Distribution/System.hs, dist/build/Distribution/System.o )
[18 of 80] Compiling Distribution.PackageDescription ( Distribution/PackageDescription.hs, dist/build/Distribution/PackageDescription.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 7.8.4 for i386-unknown-linux):
	(Array.!): undefined array element

comment:13 Changed 3 years ago by mietek

Similarly, 32-bit GHC 7.8.3 segfaults — however, not when compiling the Cabal library, but the cabal-install executable:

...
Configuring cabal-install-1.22.0.0...
Building cabal-install-1.22.0.0...
Preprocessing executable 'cabal' for cabal-install-1.22.0.0...
[ 1 of 77] Compiling Distribution.Client.Dependency.Modular.Version ( Distribution/Client/Dependency/Modular/Version.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Modular/Version.o )
[ 2 of 77] Compiling Distribution.Client.Dependency.Modular.PSQ ( Distribution/Client/Dependency/Modular/PSQ.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Modular/PSQ.o )
[ 3 of 77] Compiling Distribution.Client.Dependency.Modular.Package ( Distribution/Client/Dependency/Modular/Package.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Modular/Package.o )
[ 4 of 77] Compiling Distribution.Client.Compat.ExecutablePath ( Distribution/Client/Compat/ExecutablePath.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Compat/ExecutablePath.o )
[ 5 of 77] Compiling Distribution.Client.Haddock ( Distribution/Client/Haddock.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Haddock.o )
[ 6 of 77] Compiling Distribution.Client.Compat.Environment ( Distribution/Client/Compat/Environment.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Compat/Environment.o )
[ 7 of 77] Compiling Distribution.Client.PackageUtils ( Distribution/Client/PackageUtils.hs, dist/build/cabal/cabal-tmp/Distribution/Client/PackageUtils.o )
[ 8 of 77] Compiling Distribution.Client.World ( Distribution/Client/World.hs, dist/build/cabal/cabal-tmp/Distribution/Client/World.o )
[ 9 of 77] Compiling Distribution.Client.ParseUtils ( Distribution/Client/ParseUtils.hs, dist/build/cabal/cabal-tmp/Distribution/Client/ParseUtils.o )
[10 of 77] Compiling Distribution.Client.BuildReports.Types ( Distribution/Client/BuildReports/Types.hs, dist/build/cabal/cabal-tmp/Distribution/Client/BuildReports/Types.o )
[11 of 77] Compiling Distribution.Client.Compat.FilePerms ( Distribution/Client/Compat/FilePerms.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Compat/FilePerms.o )
[12 of 77] Compiling Distribution.Client.GZipUtils ( Distribution/Client/GZipUtils.hs, dist/build/cabal/cabal-tmp/Distribution/Client/GZipUtils.o )
[13 of 77] Compiling Distribution.Client.Compat.Semaphore ( Distribution/Client/Compat/Semaphore.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Compat/Semaphore.o )
[14 of 77] Compiling Distribution.Client.JobControl ( Distribution/Client/JobControl.hs, dist/build/cabal/cabal-tmp/Distribution/Client/JobControl.o )
[15 of 77] Compiling Distribution.Client.Compat.Process ( Distribution/Client/Compat/Process.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Compat/Process.o )
[16 of 77] Compiling Distribution.Client.PackageIndex ( Distribution/Client/PackageIndex.hs, dist/build/cabal/cabal-tmp/Distribution/Client/PackageIndex.o )
[17 of 77] Compiling Distribution.Client.Types ( Distribution/Client/Types.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Types.o )
[18 of 77] Compiling Distribution.Client.Dependency.Modular.Flag ( Distribution/Client/Dependency/Modular/Flag.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Modular/Flag.o )
[19 of 77] Compiling Distribution.Client.Dependency.Modular.Dependency ( Distribution/Client/Dependency/Modular/Dependency.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Modular/Dependency.o )
[20 of 77] Compiling Distribution.Client.Dependency.Modular.Tree ( Distribution/Client/Dependency/Modular/Tree.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Modular/Tree.o )
[21 of 77] Compiling Distribution.Client.Dependency.Modular.Index ( Distribution/Client/Dependency/Modular/Index.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Modular/Index.o )
[22 of 77] Compiling Distribution.Client.Dependency.Modular.Builder ( Distribution/Client/Dependency/Modular/Builder.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Modular/Builder.o )
[23 of 77] Compiling Distribution.Client.Dependency.Modular.Message ( Distribution/Client/Dependency/Modular/Message.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Modular/Message.o )
[24 of 77] Compiling Distribution.Client.Dependency.Modular.Configured ( Distribution/Client/Dependency/Modular/Configured.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Modular/Configured.o )
[25 of 77] Compiling Distribution.Client.Dependency.Modular.Assignment ( Distribution/Client/Dependency/Modular/Assignment.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Modular/Assignment.o )
[26 of 77] Compiling Distribution.Client.Dependency.Modular.Validate ( Distribution/Client/Dependency/Modular/Validate.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Modular/Validate.o )
[27 of 77] Compiling Distribution.Client.Dependency.TopDown.Types ( Distribution/Client/Dependency/TopDown/Types.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/TopDown/Types.o )
[28 of 77] Compiling Distribution.Client.Dependency.Modular.IndexConversion ( Distribution/Client/Dependency/Modular/IndexConversion.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Modular/IndexConversion.o )
[29 of 77] Compiling Distribution.Client.Init.Licenses ( Distribution/Client/Init/Licenses.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Init/Licenses.o )
[30 of 77] Compiling Distribution.Client.Init.Types ( Distribution/Client/Init/Types.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Init/Types.o )
[31 of 77] Compiling Distribution.Client.Compat.Time ( Distribution/Client/Compat/Time.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Compat/Time.o )
[32 of 77] Compiling Distribution.Client.Tar ( Distribution/Client/Tar.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Tar.o )
[33 of 77] Compiling Paths_cabal_install ( dist/build/autogen/Paths_cabal_install.hs, dist/build/cabal/cabal-tmp/Paths_cabal_install.o )
[34 of 77] Compiling Distribution.Client.HttpUtils ( Distribution/Client/HttpUtils.hs, dist/build/cabal/cabal-tmp/Distribution/Client/HttpUtils.o )
[35 of 77] Compiling Distribution.Client.FetchUtils ( Distribution/Client/FetchUtils.hs, dist/build/cabal/cabal-tmp/Distribution/Client/FetchUtils.o )
[36 of 77] Compiling Distribution.Client.Utils ( Distribution/Client/Utils.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Utils.o )
[37 of 77] Compiling Distribution.Client.Init.Heuristics ( Distribution/Client/Init/Heuristics.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Init/Heuristics.o )
[38 of 77] Compiling Distribution.Client.IndexUtils ( Distribution/Client/IndexUtils.hs, dist/build/cabal/cabal-tmp/Distribution/Client/IndexUtils.o )
[39 of 77] Compiling Distribution.Client.Sandbox.Index ( Distribution/Client/Sandbox/Index.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Sandbox/Index.o )
[40 of 77] Compiling Distribution.Client.InstallPlan ( Distribution/Client/InstallPlan.hs, dist/build/cabal/cabal-tmp/Distribution/Client/InstallPlan.o )
[41 of 77] Compiling Distribution.Client.Dependency.Types ( Distribution/Client/Dependency/Types.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Types.o )
[42 of 77] Compiling Distribution.Client.Dependency.Modular.Log ( Distribution/Client/Dependency/Modular/Log.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Modular/Log.o )
[43 of 77] Compiling Distribution.Client.Dependency.Modular.Explore ( Distribution/Client/Dependency/Modular/Explore.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Modular/Explore.o )
[44 of 77] Compiling Distribution.Client.Dependency.Modular.Preference ( Distribution/Client/Dependency/Modular/Preference.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Modular/Preference.o )
[45 of 77] Compiling Distribution.Client.Dependency.Modular.Solver ( Distribution/Client/Dependency/Modular/Solver.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Modular/Solver.o )
[46 of 77] Compiling Distribution.Client.Dependency.Modular.ConfiguredConversion ( Distribution/Client/Dependency/Modular/ConfiguredConversion.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Modular/ConfiguredConversion.o )
[47 of 77] Compiling Distribution.Client.Dependency.Modular ( Distribution/Client/Dependency/Modular.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/Modular.o )
[48 of 77] Compiling Distribution.Client.BuildReports.Anonymous ( Distribution/Client/BuildReports/Anonymous.hs, dist/build/cabal/cabal-tmp/Distribution/Client/BuildReports/Anonymous.o )
[49 of 77] Compiling Distribution.Client.BuildReports.Storage ( Distribution/Client/BuildReports/Storage.hs, dist/build/cabal/cabal-tmp/Distribution/Client/BuildReports/Storage.o )
[50 of 77] Compiling Distribution.Client.BuildReports.Upload ( Distribution/Client/BuildReports/Upload.hs, dist/build/cabal/cabal-tmp/Distribution/Client/BuildReports/Upload.o )
[51 of 77] Compiling Distribution.Client.Dependency.TopDown.Constraints ( Distribution/Client/Dependency/TopDown/Constraints.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/TopDown/Constraints.o )
[52 of 77] Compiling Distribution.Client.Dependency.TopDown ( Distribution/Client/Dependency/TopDown.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Dependency/TopDown.o )
./bootstrap.sh: line 288:  4943 Segmentation fault      (core dumped) ./Setup build ${EXTRA_BUILD_OPTS} ${VERBOSE}

comment:14 Changed 3 years ago by mietek

And finally, 32-bit GHC 7.8.2 also segfaults:

...
Configuring Cabal-1.22.0.0...
Building Cabal-1.22.0.0...
Preprocessing library Cabal-1.22.0.0...
[ 1 of 80] Compiling Paths_Cabal      ( dist/build/autogen/Paths_Cabal.hs, dist/build/Paths_Cabal.o )
[ 2 of 80] Compiling Distribution.TestSuite ( Distribution/TestSuite.hs, dist/build/Distribution/TestSuite.o )
[ 3 of 80] Compiling Distribution.Simple.PreProcess.Unlit ( Distribution/Simple/PreProcess/Unlit.hs, dist/build/Distribution/Simple/PreProcess/Unlit.o )
[ 4 of 80] Compiling Distribution.GetOpt ( Distribution/GetOpt.hs, dist/build/Distribution/GetOpt.o )
[ 5 of 80] Compiling Distribution.PackageDescription.Utils ( Distribution/PackageDescription/Utils.hs, dist/build/Distribution/PackageDescription/Utils.o )
[ 6 of 80] Compiling Distribution.Simple.CCompiler ( Distribution/Simple/CCompiler.hs, dist/build/Distribution/Simple/CCompiler.o )
[ 7 of 80] Compiling Distribution.Compat.ReadP ( Distribution/Compat/ReadP.hs, dist/build/Distribution/Compat/ReadP.o )
[ 8 of 80] Compiling Distribution.Text ( Distribution/Text.hs, dist/build/Distribution/Text.o )
[ 9 of 80] Compiling Distribution.Version ( Distribution/Version.hs, dist/build/Distribution/Version.o )
[10 of 80] Compiling Language.Haskell.Extension ( Language/Haskell/Extension.hs, dist/build/Language/Haskell/Extension.o )
./bootstrap.sh: line 288:  6161 Segmentation fault      (core dumped) ./Setup build ${EXTRA_BUILD_OPTS} ${VERBOSE}

To summarise, on 32-bit RHEL 6 —

  1. Bootstrapping cabal-install 1.20.0.3 fails with GHC 7.8.4 and 7.8.3, but succeeds with GHC 7.8.2.
  1. Bootstrapping cabal-install 1.22.0.0 fails with GHC 7.8.4, 7.8.3, and 7.8.2.

comment:15 Changed 3 years ago by thoughtpolice

Resolution: fixed
Status: mergeclosed

Merged to ghc-7.10.

@mietek - please file another bug for the behavior you're seeing; it's likely unrelated to this I think.

Note: See TracTickets for help on using tickets.