evacuate: strange closure type 20043649 (something to do with compact regions?)
I am getting the following error sometimes when using my branch of GHC to build Cabal which compacts modifaces. Seems to be something to do with compactAddWithSharing
.
Branch is here, https://gitlab.haskell.org/ghc/ghc/-/commits/wip/compact-modiface-new
The problem seems to happen quite late in the compilation so perhaps there is something overflowing. I would start looking in evacuate_hash_entry
I think. It also doesn't always happen..
ghc: internal error: evacuate: strange closure type 20043649
Stack trace:
0x7f84eb1801b2 set_initial_registers (rts/Libdw.c:294.5)
0x7f84eacc1198 dwfl_thread_getframes (/nix/store/sv6f05ngaarba50ybr6fdfc7cciv6nbv-elfutils-0.176/lib/libdw-0.176.so)
0x7f84eacc0c5b get_one_thread_cb (/nix/store/sv6f05ngaarba50ybr6fdfc7cciv6nbv-elfutils-0.176/lib/libdw-0.176.so)
0x7f84eacc0f97 dwfl_getthreads (/nix/store/sv6f05ngaarba50ybr6fdfc7cciv6nbv-elfutils-0.176/lib/libdw-0.176.so)
0x7f84eacc1567 dwfl_getthread_frames (/nix/store/sv6f05ngaarba50ybr6fdfc7cciv6nbv-elfutils-0.176/lib/libdw-0.176.so)
0x7f84eb180879 libdwGetBacktrace (rts/Libdw.c:265.8)
0x7f84eb1888fd rtsFatalInternalErrorFn (rts/RtsMessages.c:170.6)
0x7f84eb188add barf (rts/RtsMessages.c:49.3)
0x7f84eb172681 evacuate1 (rts/sm/Evac.c:1061.5)
0x7f84eb1ad730 evacuate_hash_entry (rts/sm/Scav.c:176.5)
0x7f84eb17c2dc mapHashTable (rts/Hash.c:466.76)
0x7f84eb1ad900 scavenge_compact1 (rts/sm/Scav.c:196.9)
0x7f84eb1ae1c5 scavenge_one (rts/sm/Scav.c:1573.9)
0x7f84eb1aefcb scavenge_loop1 (rts/sm/Scav.c:2039.12)
0x7f84eb1a54ad scavenge_until_all_done (rts/sm/GC.c:1274.13)
0x7f84eb1a6c3b GarbageCollect (rts/sm/GC.c:1498.22)
0x7f84eb18bb09 scheduleDoGC (rts/Schedule.c:1892.9)
0x7f84eb18c7ca schedule (rts/Schedule.c:579.7)
0x7f84eb18df31 scheduleWaitThread (rts/Schedule.c:2657.11)
0x7f84eb18875d hs_main (rts/RtsMain.c:73.18)
0x436902 (null) (/home/matt/ghc-compact-iface/_build/stage1/bin/ghc)
0x7f84eae5bd8b __libc_start_main (/nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/libc-2.30.so)
0x43694a _start (../sysdeps/x86_64/start.S:122.0)
(GHC version 9.1.20210226 for x86_64_unknown_linux)
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug