Skip to content

With -O1 and above causes ghc to use all available memory before being killed by OOM killer

I've just taken over an existing haskell package and in the process of getting it to work with ghc 8.0 discovered that when compiling one file ghc tires to use all my ram. It basically ends up using 40% of 16 Gig before being killed by the OOM (out-of-memory) killer.

The project is at: https://github.com/erikd/conduit-find.git

The problem can be reproduced by:

git clone https://github.com/erikd/conduit-find.git
cd conduit-find
git checkout test/ghc-8.0 
cabal sandbox init
cabal install --dependencies-only
cabal build

which on two of my machines fails building the Data.Cond module.

This is regression, because this code compiles fine with ghc-7.10.3 and ghc-7.8.4.

Trac metadata
Trac field Value
Version 8.0.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information