[Nix-dev] GHC "unable to decommit memory"

Eelco Dolstra eelco.dolstra at logicblox.com
Thu Sep 1 10:04:34 CEST 2016


Hi,

On 09/01/2016 12:58 AM, Thomas Tuegel wrote:

> If you're a Haskell user and run NixOS unstable or newer, by now you
> have probably seen the message:
> 
> "unable to decommit memory: Invalid argument"
> 
> coming from GHC-built programs. The short version is, you need the
> latest Linux kernel; try with
> 
>   boot.kernelPackages = pkgs.linuxPackages_latest;
> 
> in your configuration.nix.
> 
> The long version of the story [1] is that Linux 4.5 added a feature
> present in other Unixy systems for some time (MADV_FREE). The NixOS
> default glibc is currently newer than that, so it advertises MADV_FREE
> and GHC will use it.

I guess we need to stop GHC from using it? We can't really have GHC not working
on our default kernel :-)

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/


More information about the nix-dev mailing list