[GHC] #14988: Memory strain while compiling HLint

#14988: Memory strain while compiling HLint -------------------------------------+------------------------------------- Reporter: mcandre | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Keywords: | Operating System: FreeBSD Architecture: x86_64 | Type of failure: Compile-time (amd64) | performance bug Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I want to setup a build bot for generating Haskell binaries in an automated fashion, however even with 4 GB of RAM, cabal is unable to build HLint in HardenedBSD. Specifically, GHC is choking on mmap errors while compiling HLint's huge dependency tree. Can we somehow shrink the massive memory usage of GHC, so that common packages HLint can be built on medium-low build bots? Imagine GHC running on a RaspberryPi: You're gonna have a bad time. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14988 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14988: Memory strain while compiling HLint -------------------------------------+------------------------------------- Reporter: mcandre | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Resolution: | Keywords: Operating System: FreeBSD | Architecture: x86_64 Type of failure: Compile-time | (amd64) performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mcandre): Update: The specific error I'm getting is {{{ $ cabal install HLint ... ghc: mmap 131072 bytes at 0x0: Operation not permitted }}} This happens in HardenedBSD, does not happen in FreeBSD. This happens when ghc tries to build HLint's haskell-src-exts, uniplate, and/or aeson dependency libraries. This does not happen in HardenedBSD for smaller package trees like shake or QuickCheck. I tried adding swap space to provide a larger memory pool, but top showed cabal/ghc never dipping into swap space, so I suppose this mmap error means something else besides out-of-memory. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14988#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14988: Memory strain while compiling HLint -------------------------------------+------------------------------------- Reporter: mcandre | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Resolution: | Keywords: Operating System: FreeBSD | Architecture: x86_64 Type of failure: Compile-time | (amd64) performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mcandre): I'm using ghc v8.0.2, cabal-install v1.24.0.2. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14988#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14988: Memory strain while compiling HLint -------------------------------------+------------------------------------- Reporter: mcandre | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Resolution: | Keywords: Operating System: FreeBSD | Architecture: x86_64 Type of failure: Compile-time | (amd64) performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Have you tried compiling with `-O0`? This may help memory consumption considerably. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14988#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC