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

GHC ghc-devs at haskell.org
Wed Jul 12 16:31:24 UTC 2017


#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


More information about the ghc-tickets mailing list