Facing "mmap 4096 bytes at (nil): Cannot allocate memory"? You're not alone!

Unfortunately the ghci 9.2 crash is happening sometimes in current Fedora releases now (~10% of the time in kernel-6.2.15-300; 6.2.9-300 is okay) and more often with kernel-6.3.3-200 and 6.4.0 rc’s (rawhide).
So I am starting to wonder if this behavior will really change (back) in the Linux kernel or not?
(Though I am hoping to ship ghc-9.4 in Fedora 39…)

The crash happens for me only sometimes and before ghci even shows the initial prompt
(the core files are about 4MB apparently).

Also worth mentioning Sylvain’s draft backport MR too (not a small patch though by any definition). If you are using Fedora 38 you can update to this temporary scratch build which includes the patches, eg using koji-tool install 101285362.

2 Likes