GHC builder: out of memory from ghc during make

Páli Gábor János pali.gabor at gmail.com
Tue Apr 29 06:17:43 UTC 2014


2014-04-29 7:59 GMT+02:00 Alain O'Dea <alain.odea at gmail.com>:
> This doesn't happen when I run make directly from a shell myself.  It looks
> like a defect in the GHC builder-client itself.

I would rather call it (yet) an undocumented feature :-)

> If POSIX resources are available on the host (which they are on SmartOS)
> builder-client sets a 1GB ResourceTotalMemory limit using
> System.Posix.Resource.setResourceLimit:
> https://github.com/haskell/ghc-builder/blob/master/client/client.hs#L54

Yes, I think your diagnosis is right.  The builder-client sets that
memory limit for each launched process so it could avoid uncontrolled
consumption.   But the original 1-GB limit may be too strict these
days, as the build phase could easily exceed this (legally),
especially on 64-bit architectures.  Probably this should be factored
out to a configuration file or increased to 2 or 4 GB.


More information about the ghc-devs mailing list