aws package fails to build with master
The aws
package from Hackage fails to build with master
,
[22 of 76] Compiling Aws.DynamoDb.Core ( Aws/DynamoDb/Core.hs, /home/ben/code/mediawiki-annotate/dist-newstyle/build/x86_64-linux/ghc-8.1.20170209/aws-0.14.1/build/Aws/DynamoDb/Core.p_o )
ghc: panic! (the 'impossible' happened)
(GHC version 8.1.20170209 for x86_64-unknown-linux):
completeCall
$wloop_length_s18Cv
Stop[BoringCtxt] Int# -> Int# -> Int
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1188:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1192:37 in ghc:Outputable
pprPanic, called at compiler/simplCore/Simplify.hs:1598:9 in ghc:Simplify
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | highest |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Ben Gamari changed milestone to %8.2.1
changed milestone to %8.2.1
- Ben Gamari changed weight to 10
changed weight to 10
- Ben Gamari added Tbug Trac import labels
added Tbug Trac import labels
- Ben Gamari assigned to @bgamari
assigned to @bgamari
- Developer
How do I reproduce this? I get
cabal install --with-ghc=/home/simonpj/5builds/HEAD-4/inplace/bin/ghc-stage2 Resolving dependencies... cabal: Could not resolve dependencies: trying: base-4.10.0.0/installed-4.1... (dependency of aws-0.15) next goal: vector (dependency of aws-0.15) rejecting: vector-0.12.0.0 (conflict: base==4.10.0.0/installed-4.1..., vector => base>=4.5 && <4.10) rejecting: vector-0.11.0.0 (conflict: base==4.10.0.0/installed-4.1..., vector => base>=4.3 && <4.10) trying: vector-0.10.12.3 next goal: primitive (dependency of vector-0.10.12.3) rejecting: primitive-0.6.2.0 (conflict: vector => primitive>=0.5.0.1 && <0.6.2) rejecting: primitive-0.6.1.0 (conflict: base==4.10.0.0/installed-4.1..., primitive => base>=4.3 && <4.10) rejecting: primitive-0.5.4.0 (conflict: base==4.10.0.0/installed-4.1..., primitive => base>=4.3 && <4.9) rejecting: primitive-0.5.3.0, primitive-0.5.2.1 (conflict: base==4.10.0.0/installed-4.1..., primitive => base>=4.3 && <4.8) rejecting: primitive-0.5.1.0 (conflict: base==4.10.0.0/installed-4.1..., primitive => base>=4 && <4.8) rejecting: primitive-0.5.0.1 (conflict: base==4.10.0.0/installed-4.1..., primitive => base>=4 && <4.7) rejecting: primitive-0.5, primitive-0.4.1, primitive-0.4.0.1, primitive-0.4, primitive-0.3.1, primitive-0.3, primitive-0.2.1, primitive-0.2, primitive-0.1 (conflict: vector => primitive>=0.5.0.1 && <0.6.2) rejecting: primitive-0.6 (conflict: base==4.10.0.0/installed-4.1..., primitive => base>=4.3 && <4.9) Dependency tree exhaustively searched. simonpj@cam-05-unx:~/tmp/aws-0.15$
- Author Maintainer
Just plain
cabal install aws --allow-newer --with-ghc=...
should do it.N.B. `--allow-newer is quite handy when testing pre-release GHC's against Cabal packages; it tells Cabal to ignore upper bounds on the packages dependencies.
- Developer
I can't reproduce this with HEAD
- Author Maintainer
Interesting; I have been able to reproduce this pretty reliably. I'll try to have a look.
- Maintainer
Indeed, I can't reproduce this either with a regular GHC HEAD. I wonder if having a profiled GHC HEAD makes a difference, as I noticed in your log that you were compiling a file with the suffix
.p_o
. - Maintainer
Yep, a profiled GHC HEAD is crucial here. I couldn't reproduce this with a profiled 8.0.2, but with a profiled GHC HEAD, I get:
$ cabal build Building aws-0.16... Preprocessing library aws-0.16... [69 of 78] Compiling Aws.DynamoDb.Core ( Aws/DynamoDb/Core.hs, dist/build/Aws/DynamoDb/Core.p_o ) <no location info>: error: ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.1.20170213 for x86_64-unknown-linux): completeCall $wloop_length_s1bOu Stop[BoringCtxt] Int# -> Int# -> Int Call stack: CallStack (from HasCallStack): prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1197:58 in ghc:Outputable callStackDoc, called at compiler/utils/Outputable.hs:1201:37 in ghc:Outputable pprPanic, called at compiler/simplCore/Simplify.hs:1598:9 in ghc:Simplify CallStack (from -prof): SimplCore.SimplTopBinds (compiler/simplCore/SimplCore.hs:729:29-64) SimplCore.Simplify (compiler/simplCore/SimplCore.hs:426:40-55) HscMain.Core2Core (compiler/main/HscMain.hs:1170:7-42) HscMain.hscSimplify' (compiler/main/HscMain.hs:(1167,1)-(1170,42)) HscMain.finish (compiler/main/HscMain.hs:(728,1)-(740,20)) HscMain.hscIncrementalCompile (compiler/main/HscMain.hs:(639,1)-(694,32)) GhcMake.upsweep_mod.compile_it (compiler/main/GhcMake.hs:(1380,13)-(1382,66)) GhcMake.upsweep_mod (compiler/main/GhcMake.hs:(1328,1)-(1482,49)) GhcMake.parUpsweep_one.withSem (compiler/main/GhcMake.hs:1104:13-66) GhcMake.parUpsweep_one (compiler/main/GhcMake.hs:(1009,1)-(1164,65)) GhcMake.parUpsweep.\.spawnWorkers.\.\ (compiler/main/GhcMake.hs:(867,43)-(918,49)) GhcMake.parUpsweep.\.spawnWorkers.\ (compiler/main/GhcMake.hs:(867,13)-(918,49)) GhcMake.parUpsweep.\.spawnWorkers (compiler/main/GhcMake.hs:(866,11)-(918,49)) GhcMake.parUpsweep.\.finallySyncSession (compiler/main/GhcMake.hs:(832,9)-(834,30)) GhcMake.parUpsweep.\ (compiler/main/GhcMake.hs:(829,62)-(949,44)) GhcMake.parUpsweep (compiler/main/GhcMake.hs:(796,1)-(979,36)) GhcMake.load'.upsweep_fn (compiler/main/GhcMake.hs:(351,9)-(352,41)) GhcMake.load'.checkHowMuch (compiler/main/GhcMake.hs:(233,9)-(235,27)) GhcMake.load' (compiler/main/GhcMake.hs:(210,1)-(439,38)) GhcMake.load (compiler/main/GhcMake.hs:(202,1)-(204,44)) GHC.withCleanupSession (compiler/main/GHC.hs:(450,1)-(459,37)) GHC.runGhc (compiler/main/GHC.hs:(425,1)-(430,26)) GHC.defaultErrorHandler (compiler/main/GHC.hs:(365,1)-(397,7)) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
- Author Maintainer
Ahh, yes, that would make sense. Good catch, RyanGlScott!
- Maintainer
I've managed the problem to isolate this smaller example:
module Bug where ------------------------------------------------------------------------------- import qualified Data.ByteString.Base64 as Base64 import qualified Data.ByteString.Char8 as B import qualified Data.Set as S import qualified Data.Text as T import qualified Data.Text.Encoding as T data DValue = DBinary B.ByteString | DBool Bool | DBoolSet (S.Set Bool) ------------------------------------------------------------------------------- class DynSize a where dynSize :: a -> Int instance DynSize DValue where dynSize (DBool _) = 8 dynSize (DBoolSet s) = sum $ map (dynSize . DBool) $ S.toList s dynSize (DBinary bs) = T.length . T.decodeUtf8 $ Base64.encode bs
You'll need to run
cabal install base64-bytestring text --enable-library-profiling
beforehand. Then you can reproduce it like so:$ ~/Software/ghc3/inplace/bin/ghc-stage2 -O2 -prof -fforce-recomp Bug.hs [1 of 1] Compiling Bug ( Bug.hs, Bug.o ) ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.1.20170213 for x86_64-unknown-linux): completeCall $wloop_length_s87d Stop[BoringCtxt] Int# -> Int# -> Int Call stack: CallStack (from HasCallStack): prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1197:58 in ghc:Outputable callStackDoc, called at compiler/utils/Outputable.hs:1201:37 in ghc:Outputable pprPanic, called at compiler/simplCore/Simplify.hs:1598:9 in ghc:Simplify CallStack (from -prof): SimplCore.SimplTopBinds (compiler/simplCore/SimplCore.hs:729:29-64) SimplCore.Simplify (compiler/simplCore/SimplCore.hs:426:40-55) HscMain.Core2Core (compiler/main/HscMain.hs:1170:7-42) HscMain.hscSimplify' (compiler/main/HscMain.hs:(1167,1)-(1170,42)) HscMain.finish (compiler/main/HscMain.hs:(728,1)-(740,20)) HscMain.hscIncrementalCompile (compiler/main/HscMain.hs:(639,1)-(694,32)) GhcMake.upsweep_mod.compile_it (compiler/main/GhcMake.hs:(1380,13)-(1382,66)) GhcMake.upsweep_mod (compiler/main/GhcMake.hs:(1328,1)-(1482,49)) GhcMake.upsweep.upsweep' (compiler/main/GhcMake.hs:(1197,3)-(1296,91)) GhcMake.upsweep (compiler/main/GhcMake.hs:(1189,1)-(1296,91)) GhcMake.load'.upsweep_fn (compiler/main/GhcMake.hs:(351,9)-(352,41)) GhcMake.load'.checkHowMuch (compiler/main/GhcMake.hs:(233,9)-(235,27)) GhcMake.load' (compiler/main/GhcMake.hs:(210,1)-(439,38)) GhcMake.load (compiler/main/GhcMake.hs:(202,1)-(204,44)) GHC.withCleanupSession (compiler/main/GHC.hs:(450,1)-(459,37)) GHC.runGhc (compiler/main/GHC.hs:(425,1)-(430,26)) GHC.defaultErrorHandler (compiler/main/GHC.hs:(365,1)-(397,7)) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
- Maintainer
I've confirmed that this bug first appears after commit 8d5cf8bf (Join points).
- Developer
Great test case! I'm on it
- Ben Gamari assigned to @simonpj and unassigned @bgamari
- Simon Peyton Jones mentioned in commit 2d5be63d
mentioned in commit 2d5be63d
- Ben Gamari closed
closed
- Author Maintainer
This was fixed in 5cef996c. About to push a commit adding the testcase from ticket:13255#comment:131994.
Trac metadata
Trac field Value Resolution Unresolved → ResolvedFixed Test case - → simplCore/should_compile/T13255 - Author Maintainer
Unfortunately I hadn't previously noticed that the repro from ticket:13255#comment:131994 involved
Text
andbytestring-base64
, neither of which are anywhere near being boot packages. I'm afraid it looks like adding a testcase for this one isn't currently possible.Trac metadata
Trac field Value Test case simplCore/should_compile/T13255 → - - Developer
Are you sure that 5cef996c is merged to HEAD? I don't see it.
- Simon Peyton Jones reopened
reopened
- Developer
Trac metadata
Trac field Value Resolution ResolvedFixed → Unresolved - Simon Peyton Jones mentioned in commit 6e328847
mentioned in commit 6e328847
- Ben Gamari closed
closed
- Author Maintainer
Indeed the commit was lost during a rebase. There we are.
Trac metadata
Trac field Value Resolution Unresolved → ResolvedFixed - trac-import added compiler crash label
added compiler crash label
- Ben Gamari added Phighest label
added Phighest label