ghc: internal error: Unable to commit 1048576 bytes of memory
Summary
I was following Yesod's develmain instruction to use ghci to develop.
stack ghci formosa-charity:lib --no-load --work-dir .stack-work-devel
(It successfully entered ghci.)
:load app/DevelMain
(It shows the following error.)
ghc: internal error: Unable to commit 1048576 bytes of memory
(GHC version 8.4.4 for x86_64_unknown_linux)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
/tmp/nix-shell-29267-0/rc: line 1: 30247 Aborted '/nix/store/2nak6qgsn6ml3ipcivpqk01f1zdc3969-stack-1.7.1/bin/stack'
$STACK_IN_NIX_EXTRA_ARGS '--internal-re-exec-version=1.7.1' 'ghci' 'formosa-charity:lib' '--no-load' '--work-dir' '.stack-work-devel'
Steps to reproduce
stack ghci formosa-charity:lib --no-load --work-dir .stack-work-devel
(In ghci)
:load app/DevelMain
Expected behavior
A successful load is expected. And then DevelMain.update is available.
Environment
stack exec ghci -- --version
The Glorious Glasgow Haskell Compilation System, version 8.4.4
free -mh
total used free shared buff/cache available
Mem: 4.7Gi 664Mi 2.3Gi 28Mi 1.8Gi 3.9Gi
Swap: 0B 0B 0B
Optional:
-
Operating System: nixos-version 18.09.1922.97e0d53d669 (Jellyfish)
-
System Architecture: VirtualBox 6.0 memory 5020MB disk 80GB