FS#54823 - [ghc] Haskell programs display warning "unable to decommit memory: Invalid argument"
Attached to Project:
Community Packages
Opened by Baptiste (zorun) - Saturday, 15 July 2017, 12:19 GMT
Last edited by Felix Yan (felixonmars) - Sunday, 16 July 2017, 09:22 GMT
Opened by Baptiste (zorun) - Saturday, 15 July 2017, 12:19 GMT
Last edited by Felix Yan (felixonmars) - Sunday, 16 July 2017, 09:22 GMT
|
Details
Description:
I installed hledger (which depends on ghc), and it turns out that several haskell programs display a warning when they run. For instance during post-install hooks: (1/3) Rebuilding Haskell doc index... haddock: unable to decommit memory: Invalid argument haddock: unable to decommit memory: Invalid argument ... (2/3) Registering Haskell modules... ghc-pkg: unable to decommit memory: Invalid argument ... Or when running hledger: hledger: unable to decommit memory: Invalid argument Apart from this message, the programs seem to work fine. Version: ghc 8.0.2-2 |
This task depends upon
Closed by Felix Yan (felixonmars)
Sunday, 16 July 2017, 09:22 GMT
Reason for closing: Fixed
Additional comments about closing: 8.0.2-3
Sunday, 16 July 2017, 09:22 GMT
Reason for closing: Fixed
Additional comments about closing: 8.0.2-3
After looking around a bit, kernel support for this "memory decommit" functionality changed in Linux 4.5. So, ghc gets confused when it is built with kernel >= 4.5 but runs with kernel < 4.5.
The issue has been fixed upstream [https://git.haskell.org/ghc.git/commitdiff/6576bf83cdf4eac05eb88a24aa934a736c91e3da] but only in the upcoming 8.3 branch.
Feel free to close this bug report, since I use an unsupported kernel. I will get the fix when upgrading to a newer kernel or ghc 8.3 is released, whichever comes first :)
Relevant references:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=847677
https://ghc.haskell.org/trac/ghc/ticket/12495
https://ghc.haskell.org/trac/ghc/ticket/12865
https://github.com/simonmichael/hledger/issues/541
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860829
I have backported the patch, please try ghc 8.0.2-3.