[GHC] #13930: Cabal configure

#13930: Cabal configure -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.3 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: -------------------------------------+------------------------------------- `cabal configure` apparently has a space leak when compiled with GHC HEAD but not 8.0. It's not clear whether this is really a GHC regression yet, but here it is certainly GHC version-specific. See https://github.com/haskell/cabal/issues/4589 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.3 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 bgamari): Thankfully it seems like 8.2 isn't affected by this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.3 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 bgamari): Unfortunately I can't easily bisect this due to `Cabal` issue [https://github.com/haskell/cabal/issues/4509|#4509] -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: (none)
Type: bug | Status: new
Priority: high | Milestone: 8.4.1
Component: Compiler | Version: 8.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by bgamari):
* priority: normal => high
* failure: None/Unknown => Runtime performance bug
* milestone: => 8.4.1
Comment:
The first bad commit here is,
{{{
commit 751996e90a964026a3f86853338f10c82db6b610
Author: Simon Peyton Jones

#13930: Cabal configure regresses in runtime -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.4.1 Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure regresses in space/time -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.4.1 Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure regresses in space/time -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.4.1 Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #13982 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * related: => #13982 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure regresses in space/time -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.4.1 Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #13982 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): My apologies, Simon: I believe I was mistaken when I said this required profiling to reproduce. This can be reproduced with current GHC `master` with, {{{ $ git clone git://github.com/haskell/cabal $ cd cabal $ ghc-pkg unregister Cabal $ cabal install Cabal/ --allow-newer $ cabal install cabal-install/ --allow-newer --only-dependencies $ cd cabal-install $ cabal build }}} The `unregister Cabal` bit is necessary for some GHC versions due to Cabal bug [[https://github.com/haskell/cabal/issues/4509|#4509]]. For the record, a quick profile reveals that most of the allocations seem to be coming from `Distribution.ParseUtils` and `Distribution.Compat.ReadP` (both in `Cabal`). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure regresses in space/time -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.4.1 Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #13982 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by osa1): I can't reproduce this with ghc 8.5.20180115 and cabal HEAD. configure uses about the same (and very little) amount of memory. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure regresses in space/time -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.4.2 Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #13982 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: 8.4.1 => 8.4.2 Comment: What is the status of this, osa1? Were you able to reproduce this? Regardless, it's unlikely this will be fixed for 8.4.1.. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure regresses in space/time -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: closed Priority: high | Milestone: 8.4.2 Component: Compiler | Version: 8.3 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #13982 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => invalid Comment: It seems that Omer was really unable to reproduce this; odd. Closing. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure regresses in space/time -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.4.2 Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #13982 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by hvr): * status: closed => new * resolution: invalid => Comment: This unfortunately resurfaced in https://github.com/haskell/cabal/issues/5201 and is unfortunately quite easy to reproduce to the point of blocking `cabal` on GHC 8.4.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure regresses in space/time -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.4.2 Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #13982 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by hvr): Ben asked me to provide the STG dumps of the module containing the `accum` function; original code as well the variant w/ the `ReadPackageIndexStrict` branch commented out respectively; I hadn't had time to look at those myself yet, so here they're unabridged: - https://gist.github.com/9fe0cc59b4414351ce0e03c21a068172 (original) - https://gist.github.com/759e338c8d841de9b3fb47d892fac398 (commented out `ReadPackageIndexStrict`) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure regresses in space/time -------------------------------------+------------------------------------- Reporter: bgamari | Owner: tdammers Type: bug | Status: new Priority: highest | Milestone: 8.4.2 Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #13982 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * owner: (none) => tdammers * priority: high => highest -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure regresses in space/time -------------------------------------+------------------------------------- Reporter: bgamari | Owner: tdammers Type: bug | Status: new Priority: highest | Milestone: 8.4.2 Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #13982, #5129 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by hvr): * related: #13982 => #13982, #5129 Comment: Alex Biehl just pointed out this may be related to the rather old #5129 ticket -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure regresses in space/time -------------------------------------+------------------------------------- Reporter: bgamari | Owner: tdammers Type: bug | Status: new Priority: highest | Milestone: 8.4.2 Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #13982, #5129 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by osa1): This is indeed #5129. Adding `{-# NOINLINE evaluate #-}` fixes both this and #5129. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure regresses in space/time -------------------------------------+------------------------------------- Reporter: bgamari | Owner: tdammers Type: bug | Status: new Priority: highest | Milestone: 8.4.2 Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #13982, #5129 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by tdammers): Sounds plausible. I managed to reproduce on GHC HEAD, and running on a machine with a HDD clearly shows excessive disk I/O. So my hypothesis so far has been that overly enthusiastic inlining might be the culprit, and if `{-# NOINLINE evaluate #-}` fixes it, then that would be consistent with that. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure regresses in space/time -------------------------------------+------------------------------------- Reporter: bgamari | Owner: tdammers Type: bug | Status: new Priority: highest | Milestone: 8.4.2 Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #13982, #5129 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by tdammers): I suggest parking this for now, let's first see where we end up with #5129. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure regresses in space/time -------------------------------------+------------------------------------- Reporter: bgamari | Owner: tdammers Type: bug | Status: new Priority: highest | Milestone: 8.4.2 Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #13982, #5129 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by tdammers): Check if spj's patch on #5129 does indeed fix this one too. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure regresses in space/time -------------------------------------+------------------------------------- Reporter: bgamari | Owner: tdammers Type: bug | Status: infoneeded Priority: highest | Milestone: 8.4.2 Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #13982, #5129 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => infoneeded -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:19 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure regresses in space/time -------------------------------------+------------------------------------- Reporter: bgamari | Owner: tdammers Type: bug | Status: infoneeded Priority: highest | Milestone: 8.4.2 Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #13982, #5129 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by tdammers): Can't seem to be able to reproduce this on GHC HEAD, so let's close this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:20 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13930: Cabal configure regresses in space/time -------------------------------------+------------------------------------- Reporter: bgamari | Owner: tdammers Type: bug | Status: closed Priority: highest | Milestone: 8.4.2 Component: Compiler | Version: 8.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #13982, #5129 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by monoidal): * status: infoneeded => closed * resolution: => fixed Comment: Closing per [comment:20 comment:20]. Please reopen if this resurfaces. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13930#comment:21 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC