Skip to main content

GHC 8.10.7 mmap Issue (Part 2)

As described in the GHC 8.10.7 mmap Issue blog entry, I have been dealing with Linux kernel bugs while migrating a Reflex FRP + Reflex Platform + Rhyolite + Obelisk project to use GHC 8.10.7. In the Haskell Discourse discussion, there was mention of using the -xp RTS flag as a workaround. This blog entry is a quick update about using that flag.

My goal is to mitigate the bug when using the ob run and ob repl commands. I tried using export GHCRTS='-xp', which sets the options for all Haskell processes run from the current shell. This causes Obelisk to fail, however, reporting that it does not support that RTS option. The option needs to be passed to the ghci process but not Obelisk itself. I implemented this by simply adding it to the baseGhciOptions as follows.

diff --git a/lib/command/src/Obelisk/Command/Run.hs b/lib/command/src/Obelisk/Command/Run.hs
index 0e2b6b3d..6fce8551 100644
--- a/lib/command/src/Obelisk/Command/Run.hs
+++ b/lib/command/src/Obelisk/Command/Run.hs
@@ -552,6 +552,7 @@ baseGhciOptions =
   , "-no-user-package-db"
   , "-hide-all-packages"
   , "-package-env", "-"
+  , "+RTS", "-xp", "-RTS"
   ]

 -- | Run ghci repl

This works for me! I am now able to do application development on my host again.

Author

Travis Cardwell

Published

Tags
Related Blog Entries