[GHC] #13956: ghc panic compiling lame-0.1.1

#13956: ghc panic compiling lame-0.1.1 -------------------------------------+------------------------------------- Reporter: uznx | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1-rc3 Keywords: | Operating System: Linux Architecture: x86_64 | Type of failure: Compile-time (amd64) | crash or panic Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Compiling the package lame-0.1.1 using cabal, with profiling: [2 of 2] Compiling Codec.Audio.LAME ( Codec/Audio/LAME.hs, dist/build/Codec/Audio/LAME.p_o ) ghc: panic! (the 'impossible' happened) (GHC version 8.2.0.20170704 for x86_64-unknown-linux): Simplifier ticks exhausted When trying UnfoldingDone lvl_soT9 To increase the limit, use -fsimpl-tick-factor=N (default 100) If you need to do this, let GHC HQ know, and what factor you needed To see detailed counts use -ddump-simpl-stats Total ticks: 504681 Call stack: CallStack (from HasCallStack): prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable pprPanic, called at compiler/simplCore/SimplMonad.hs:199:31 in ghc:SimplMonad Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug This is a regression; the package compiles fine with GHC 8.0.2 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13956 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13956: ghc panic compiling lame-0.1.1 -------------------------------------+------------------------------------- Reporter: uznx | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.2.2 Component: Compiler | Version: 8.2.1-rc3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Compile-time | (amd64) crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: => 8.2.2 Old description:
Compiling the package lame-0.1.1 using cabal, with profiling:
[2 of 2] Compiling Codec.Audio.LAME ( Codec/Audio/LAME.hs, dist/build/Codec/Audio/LAME.p_o ) ghc: panic! (the 'impossible' happened) (GHC version 8.2.0.20170704 for x86_64-unknown-linux): Simplifier ticks exhausted When trying UnfoldingDone lvl_soT9 To increase the limit, use -fsimpl-tick-factor=N (default 100) If you need to do this, let GHC HQ know, and what factor you needed To see detailed counts use -ddump-simpl-stats Total ticks: 504681 Call stack: CallStack (from HasCallStack): prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable pprPanic, called at compiler/simplCore/SimplMonad.hs:199:31 in ghc:SimplMonad
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
This is a regression; the package compiles fine with GHC 8.0.2
New description: Compiling the package lame-0.1.1 using cabal, with profiling: {{{ [2 of 2] Compiling Codec.Audio.LAME ( Codec/Audio/LAME.hs, dist/build/Codec/Audio/LAME.p_o ) ghc: panic! (the 'impossible' happened) (GHC version 8.2.0.20170704 for x86_64-unknown-linux): Simplifier ticks exhausted When trying UnfoldingDone lvl_soT9 To increase the limit, use -fsimpl-tick-factor=N (default 100) If you need to do this, let GHC HQ know, and what factor you needed To see detailed counts use -ddump-simpl-stats Total ticks: 504681 Call stack: CallStack (from HasCallStack): prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable pprPanic, called at compiler/simplCore/SimplMonad.hs:199:31 in ghc:SimplMonad Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} This is a regression; the package compiles fine with GHC 8.0.2 -- Comment: Hmm, indeed this is quite bad: even a tick factor of 10000 doesn't finish (despite taking at least 10GB of memory before I killed it). It appears that it is looping on a set of inlinings. `-ddump-inlinings` says, {{{ ... Inlining done: Data.Text.$fEqText_$c== Inlining done: Codec.Audio.LAME.Internal.id3TagSetAlbumArt1 Inlining done: Codec.Audio.LAME.Internal.setBitrate1 Inlining done: Codec.Audio.LAME.Internal.setCompressionRatio1 Inlining done: Codec.Audio.LAME.Internal.id3TagSetAlbumArt1 Inlining done: Codec.Audio.LAME.Internal.setBitrate1 Inlining done: Codec.Audio.LAME.Internal.setCompressionRatio1 Inlining done: Codec.Audio.LAME.Internal.id3TagSetAlbumArt1 Inlining done: Codec.Audio.LAME.Internal.setBitrate1 Inlining done: Codec.Audio.LAME.Internal.setCompressionRatio1 ... }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13956#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13956: ghc panic compiling lame-0.1.1
-------------------------------------+-------------------------------------
Reporter: uznx | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.2.2
Component: Compiler | Version: 8.2.1-rc3
Resolution: | Keywords:
Operating System: Linux | Architecture: x86_64
Type of failure: Compile-time | (amd64)
crash or panic | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by bgamari):
This appears to be due to,
{{{
b8f58d79ee3e34840beeea2fab846a9f47bff21a is the first bad commit
commit b8f58d79ee3e34840beeea2fab846a9f47bff21a
Author: Simon Peyton Jones

#13956: ghc panic compiling lame-0.1.1 -------------------------------------+------------------------------------- Reporter: uznx | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.2.2 Component: Compiler | Version: 8.2.1-rc3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Compile-time | (amd64) crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): For future reference, the issue can be reproduced with `lame-0.1.1` with, {{{ ghc -dumpdir bad -fforce-recomp -dverbose-core2core -ddump-ds Codec/Audio/LAME -ddump-to-file -prof -fprof-auto-exported }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13956#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13956: ghc panic compiling lame-0.1.1 -------------------------------------+------------------------------------- Reporter: uznx | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.2.2 Component: Compiler | Version: 8.2.1-rc3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Compile-time | (amd64) crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): {{{ $ cabal unpack lame==0.1.1 $ cd lame-0.1.1 $ cabal install --only-dependencies --enable-library-profilng $ ghc Codec/Audio/LAME -prof -fprof-auto-exported }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13956#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13956: ghc panic compiling lame-0.1.1 -------------------------------------+------------------------------------- Reporter: uznx | Owner: (none) Type: bug | Status: infoneeded Priority: normal | Milestone: 8.2.2 Component: Compiler | Version: 8.2.1-rc3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Compile-time | (amd64) crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => infoneeded Comment: Unfortunately I can no longer reproduce this with the final GHC 8.2.1 release. `Codec.Audio.LAME` seems to compile with profiling in around 3 seconds with rather reasonable memory usage on my laptop. This is admittedly a bit surprising as there weren't many relevant changes between -rc3 and final. uznx, can you confirm that this is fixed? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13956#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC