RTS error: scavenge_one: strange object 23 while using byte-code linking in compilation
On x86_64 linux system, we turn on byte-code linking (-fprefer-byte-code -fbyte-code-and-object-code
) and we increasingly get this error in GC during compiling a project (the following is an excerpt from CI message)
> ghc-9.6.1: internal error: scavenge_one: strange object 23
> Stack trace:
> 0x7fffef186bc0 set_initial_registers (/nix/store/59ng7169ncp4g0xcyxdmd5bf5gd9yilm-ghc-9.6.1/lib/ghc-9.6.1/lib/x86_64-linux-ghc-9.6.1/libHSrts-1.0.2_thr-ghc9.6.1.so)
> 0x7fffeeddd5c8 dwfl_thread_getframes (/nix/store/sd6nsyj6v8qmdr07g5hl5rp8mpkbzasp-elfutils-0.189/lib/libdw-0.189.so)
> 0x7fffeeddd11b get_one_thread_cb (/nix/store/sd6nsyj6v8qmdr07g5hl5rp8mpkbzasp-elfutils-0.189/lib/libdw-0.189.so)
> 0x7fffeeddd42a dwfl_getthreads (/nix/store/sd6nsyj6v8qmdr07g5hl5rp8mpkbzasp-elfutils-0.189/lib/libdw-0.189.so)
> 0x7fffeeddd957 dwfl_getthread_frames (/nix/store/sd6nsyj6v8qmdr07g5hl5rp8mpkbzasp-elfutils-0.189/lib/libdw-0.189.so)
> 0x7fffef187297 libdwGetBacktrace (/nix/store/59ng7169ncp4g0xcyxdmd5bf5gd9yilm-ghc-9.6.1/lib/ghc-9.6.1/lib/x86_64-linux-ghc-9.6.1/libHSrts-1.0.2_thr-ghc9.6.1.so)
> 0x7fffef18fb27 rtsFatalInternalErrorFn (/nix/store/59ng7169ncp4g0xcyxdmd5bf5gd9yilm-ghc-9.6.1/lib/ghc-9.6.1/lib/x86_64-linux-ghc-9.6.1/libHSrts-1.0.2_thr-ghc9.6.1.so)
> 0x7fffef18fd1d barf (/nix/store/59ng7169ncp4g0xcyxdmd5bf5gd9yilm-ghc-9.6.1/lib/ghc-9.6.1/lib/x86_64-linux-ghc-9.6.1/libHSrts-1.0.2_thr-ghc9.6.1.so)
> 0x7fffef1bccb4 scavenge_one (/nix/store/59ng7169ncp4g0xcyxdmd5bf5gd9yilm-ghc-9.6.1/lib/ghc-9.6.1/lib/x86_64-linux-ghc-9.6.1/libHSrts-1.0.2_thr-ghc9.6.1.so)
> 0x7fffef1bd1ef scavenge_mutable_list (/nix/store/59ng7169ncp4g0xcyxdmd5bf5gd9yilm-ghc-9.6.1/lib/ghc-9.6.1/lib/x86_64-linux-ghc-9.6.1/libHSrts-1.0.2_thr-ghc9.6.1.so)
> 0x7fffef1bd420 scavenge_capability_mut_lists (/nix/store/59ng7169ncp4g0xcyxdmd5bf5gd9yilm-ghc-9.6.1/lib/ghc-9.6.1/lib/x86_64-linux-ghc-9.6.1/libHSrts-1.0.2_thr-ghc9.6.1.so)
> 0x7fffef1b322a GarbageCollect (/nix/store/59ng7169ncp4g0xcyxdmd5bf5gd9yilm-ghc-9.6.1/lib/ghc-9.6.1/lib/x86_64-linux-ghc-9.6.1/libHSrts-1.0.2_thr-ghc9.6.1.so)
> 0x7fffef193fdd scheduleDoGC (/nix/store/59ng7169ncp4g0xcyxdmd5bf5gd9yilm-ghc-9.6.1/lib/ghc-9.6.1/lib/x86_64-linux-ghc-9.6.1/libHSrts-1.0.2_thr-ghc9.6.1.so)
> 0x7fffef194c02 schedule (/nix/store/59ng7169ncp4g0xcyxdmd5bf5gd9yilm-ghc-9.6.1/lib/ghc-9.6.1/lib/x86_64-linux-ghc-9.6.1/libHSrts-1.0.2_thr-ghc9.6.1.so)
> 0x7fffef19585c scheduleWorker (/nix/store/59ng7169ncp4g0xcyxdmd5bf5gd9yilm-ghc-9.6.1/lib/ghc-9.6.1/lib/x86_64-linux-ghc-9.6.1/libHSrts-1.0.2_thr-ghc9.6.1.so)
> 0x7fffef199edd workerStart (/nix/store/59ng7169ncp4g0xcyxdmd5bf5gd9yilm-ghc-9.6.1/lib/ghc-9.6.1/lib/x86_64-linux-ghc-9.6.1/libHSrts-1.0.2_thr-ghc9.6.1.so)
> 0x7fffeeed2e24 start_thread (/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/libc.so.6)
> 0x7fffeef549b0 __clone3 (/nix/store/1n2l5law9g3b77hcfyp50vrhhssbrj5g-glibc-2.37-8/lib/libc.so.6)
>
> (GHC version 9.6.1 for x86_64_unknown_linux)
> Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
> /nix/store/5s1yg5l36wzgy1dj0vv1ibarc4g7vrdr-stdenv-linux/setup: line 1595: 103601 Aborted (core dumped) ./Setup build