Unable to commit 17955815424 bytes (18 GB) of memory when compiling GHC
Summary
Attempted to commit 18GB of memory when building GHC (using Hadrian).
Steps to reproduce
What I did when it happened:
git clone git@gitlab.haskell.org:ghc/ghc.git
cd ghc
git submodule update --init --recursive
./boot
./configure
cabal new-install happy
./configure
cabal new-install alex
./configure
hadrian/build.sh
^C # Max 10 seconds into build
hadrian/build.sh -j
Attempting to run hadrian/build.sh -j
again froze GNOME.
Attempting to run hadrian/build.sh -j
again (this time in a virtual terminal and with tee) resulted in a strange closure type
error (copied by hand because ... virtual terminal):
ghc: internal error: evacuate: strange closure type 4325413
Log (excluding error because I forgot 2>&1
):
Yet another attempt (this time no longer in a virtual terminal): log.txt
By now it seems like the working directory might be corrupt. Reverting to the .tar.gz file from after the first attempt and running hadrian/build.sh -j
again, resulted in a yet another error: txt.txt
git clone
ing the repository again and running boot, configure, and hadrian/build.sh -j
resulted in log.txt.
Expected behavior
Not crashing
Relevant information
- GHC installed using ghcup
- Happy and Alex installed using
cabal new-install
- 4 cores, 7~8 GB of memory
- Build took 44 minutes before crashing
- Log (as far back as my terminal goes): log.txt or gist
- I have a
.tar.gz
of the working directory after the original attempt, but it is too large to attach (787 MiB).
Environment
- GHC version used: 8.8.1
- Operating System: Ubuntu 19.10
- System Architecture: 64 bit