1

I tried to look for this but I didn't find anything specifically explaining why this fixes errors when launching Plutus Playground locally, although I definitely found instructions on how to go over the errors themselves. At some point I read somewhere it is related to the garbage collector. Could someone expand a little bit on this?

Thanks!

1
  • This really is hard to find, after searching myself. The best I could find is from this smart fellow. "The GC_DONT_GC is a garbage collector for the heap, to make the evaluator use less ram, GC_DONT_GC=1 just turns it off entirely, so it never GC’s ram during the eval." from blog.punkbit.com/hacking/… hat tip to @punkbits
    – TheStophe
    Jan 20, 2022 at 2:45

1 Answer 1

3

GC_DONT_GC=1 disables the boehm garbage collector in nix. There are edge cases that our nix expressions can hit, which cause nix to segfault. Disabling the garbage collector in nix "fixes" this. It's not the best solution, but a workaround. The proper fix would be to fix nix's use of the boehm garbage collector. That however is said much easier than actually done.

So GC_DONT_GC=1 is a workaround for now, until a better nix release is widely available that doesn't need that environment variable anymore.

This also has nothing to do directly with Plutus or Haskell. It's only needed for the evaluation of the build instructions via nix.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.