heffalump: internal error: evacuate: strange closure type 28723585
(GHC version 9.0.2 for x86_64_unknown_linux)
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
I did some searching but found discouragingly little information. Maybe someone here know more and can offer some insights?
I’m just afraid that I won’t be able to offer much information. My project isn’t big, only ~460 lines of Haskell, but it depends on some rather large packages (including an unreleased version of Amazonka).
The only information I’ve managed to find suggests that it’s likely related to some rather low-level stuff, which would rule out the code I’m writing myself.
Yes, this kind of error is generally at the RTS/FFI level. The error message means that the GC has run into some heap corruption, but that’s a symptom rather than the actual cause. For example, some FFI code might be holding on to a reference into the Haskell heap after GHC thinks it is safe to free it.
Ideally, try to come up with a minimized reproducer that cuts down your code/dependencies as much as possible while still exhibiting the bug. But then reporting it on the GHC tracker is the way to go.
I would add that if you can upgrade to a newer ghc, you may find the bug has been fixed, and that would tend to be best course of action if at all possible.
It would indeed be appreciated if you can open a ticket. We would rather know about these issues than not and having a reproducer of any size can be very helpful.