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

Tomasz Czyż tomasz.czyz at gmail.com
Thu Sep 1 01:54:39 CEST 2016


Thomas,

thank you for explaining this! I saw this message but had no time to debug
it yet. Cheers!

2016-08-31 23:58 GMT+01:00 Thomas Tuegel <ttuegel at gmail.com>:

> Hello nix-dev!
>
> 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. But, the default kernel in NixOS is Linux 4.4 at
> the moment, where the MADV_FREE isn't supported.
>
> Hope this helps,
> Thomas
>
> [1]. https://ghc.haskell.org/trac/ghc/ticket/12495
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>



-- 
Tomasz Czyż
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160901/9d5dd77d/attachment.html>


More information about the nix-dev mailing list