[GHC] #12967: GHC 8.0.1 Panic for current Aeson 1.0.2.1

#12967: GHC 8.0.1 Panic for current Aeson 1.0.2.1 -------------------------------------+------------------------------------- Reporter: bitemyapp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{ [1 of 1] Compiling Main ( Dates.hs, .stack- work/dist/x86_64-linux/Cabal-1.24.0.0/build/aeson-benchmark-dates/aeson- benchmark-dates-tmp/Main.o ) ghc: panic! (the 'impossible' happened) (GHC version 8.0.1 for x86_64-unknown-linux): Simplifier ticks exhausted When trying UnfoldingDone $s>$< 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: 153200 }}} I am not certain if this is a duplicate of: - https://ghc.haskell.org/trac/ghc/ticket/10083 - https://ghc.haskell.org/trac/ghc/ticket/12789 - https://ghc.haskell.org/trac/ghc/ticket/11263 - https://ghc.haskell.org/trac/ghc/ticket/5539 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12967 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12967: GHC 8.0.1 Panic for current Aeson 1.0.2.1 -------------------------------------+------------------------------------- Reporter: bitemyapp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Did you try increasing the tick limit as the message suggests? How high did you have to turn it up? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12967#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12967: GHC 8.0.1 Panic for current Aeson 1.0.2.1 -------------------------------------+------------------------------------- Reporter: bitemyapp | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => infoneeded -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12967#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12967: GHC 8.0.1 Panic for current Aeson 1.0.2.1 -------------------------------------+------------------------------------- Reporter: bitemyapp | Owner: (none) Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): FWIW, `aeson` has resolved this upstream by increasing the `simpl-tick- factor` to 200 for that particular benchmark (see [https://github.com/bos/aeson/issues/502 this issue], and [https://github.com/bos/aeson/commit/35ae44dbec513b45d4ec94d95588c56d35b7f88a #diff-2f38c1adee324e73bf376a514fd4a3ae this commit]). I slightly reduced the [https://github.com/bos/aeson/issues/502#issuecomment-269911373 test case] here, but I do ultimately think that overly aggressive `INLINE`-ing is the culprit here. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12967#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12967: GHC 8.0.1 Panic for current Aeson 1.0.2.1 -------------------------------------+------------------------------------- Reporter: bitemyapp | Owner: (none) Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): I think Ryan is right that the `INLINE` pragmas in `Data.Aeson.Encoding.Builder` are too aggressive. In this example, `utcTime` contains a call to `timeOfDay` which is a huge function marked with an `INLINE` pragma. This causes the unoptimised unfolding for `timeOfDay` to be inlined into the unfolding for `utcTime` which is then inlined 12 times in the example Ryan posted. So there is a lot of duplicated work because of how the inline pragmas cause unfoldings not to be optimised. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12967#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12967: GHC 8.0.1 Panic for current Aeson 1.0.2.1 -------------------------------------+------------------------------------- Reporter: bitemyapp | Owner: (none) Type: bug | Status: upstream Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: infoneeded => upstream Comment: It seems like this is likely an issue that will need to be fixed upstream. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12967#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12967: GHC 8.0.1 Panic for current Aeson 1.0.2.1 -------------------------------------+------------------------------------- Reporter: bitemyapp | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: upstream => closed * resolution: => fixed Comment: Way ahead of you :) The `timeOfDay` issue (or to be more precise, the `timeOfDay64` issue) was [https://github.com/bos/aeson/pull/536 fixed upstream] in `aeson` HEAD. As a result, I'll go ahead and close this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12967#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC