[GHC] #14792: compiling cabal-1.24.2.0 requires almost 3 GB of memory

GHC ghc-devs at haskell.org
Sun Feb 11 14:15:36 UTC 2018


#14792: compiling cabal-1.24.2.0 requires almost 3 GB of memory
-------------------------------------+-------------------------------------
           Reporter:  bfrk           |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.2.2
           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:
-------------------------------------+-------------------------------------
 Not sure if this is really a bug, but I noticed that ghc-8.2.2 requires a
 whole lot more memory than ghc-7-10.3. This is how I found out about it:

 {{{
 ben at yuiitsu[1]:.../src/Cabal-1.24.2.0>ulimit -v 2600000
 ben at yuiitsu[1]:.../src/Cabal-1.24.2.0>cabal new-build
 Resolving dependencies...
 Build profile: -w ghc-8.2.2 -O1
 In order, the following will be built (use -v for more details):
  - Cabal-1.24.2.0 (lib) (first run)
 Configuring library for Cabal-1.24.2.0..
 Preprocessing library for Cabal-1.24.2.0..
 Building library for Cabal-1.24.2.0..
 [ 1 of 86] Compiling Distribution.Compat.Binary (
 Distribution/Compat/Binary.hs, /home/ben/src/Cabal-1.24.2.0/dist-
 newstyle/build/x86_64-linux/ghc-8.2.2/Cabal-1.24.2.0/build/Distribution/Compat/Binary.o
 )
 [...]
 [30 of 86] Compiling Distribution.PackageDescription (
 Distribution/PackageDescription.hs,
 dist/build/Distribution/PackageDescription.o )
 ghc: out of memory
 cabal: Failed to build Cabal-1.24.2.0 (which is required by
 darcs-2.13.0). The
 build process terminated with exit code 251
 }}}

 It works when I ulimit -v 3000000.

 I previously had the limit at 2200000 and it worked just fine with
 ghc-7.10.3. The reason i limit the memory available to ghc is to avoid my
 machine freezing up due to thrashing (I only have 4GB physical RAM).

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14792>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list