RTS: GC assertion failed - rts/sm/GC.c, line 1567
Summary
On ghc HEAD built with:
hadrian/build --flavour=default+no_profiled_libs+omit_pragmas -j7
And compiling the program below I trigger an assertion failure.
repovec.cabal:
cabal-version: 3.0
name: repovec
version: 0.1.0.0
license: BSD-3-Clause
license-file: LICENSE
author: Andreas Klebinger
build-type: Simple
extra-doc-files: CHANGELOG.md
common warnings
ghc-options: -Wall -O2 -rtsopts -debug -with-rtsopts "-H200M -M206M -N2 -ki10M" -g3 -threaded
executable repovec
import: warnings
main-is: Main.hs
build-depends: base, vector, array
hs-source-dirs: app
default-language: GHC2021
app/Main.hs
module Main where
import Data.Vector as V
import System.Mem (performMajorGC)
import Prelude as P
main :: IO ()
main = do
let !vec = V.replicate 1_100_000 (1111111111 :: Int)
performMajorGC
print "post gc"
print $ V.length vec
If I run this with cabal --storedir store2 run -w /home/andi/ghc_mem_limit/_build/stage1/bin/ghc
andi@horzube Thu 20:44:~/repos/agda/repo_vec$ cabal --storedir store run -w /home/andi/ghc_mem_limit/_build/stage1/bin/ghc
Up to date
repovec: internal error: ASSERTION FAILED: file rts/sm/GC.c, line 1567
(GHC version 9.9.20240221 for x86_64_unknown_linux)
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
Aborted (core dumped)
Environment
- GHC version used:
Optional:
- Operating System:
- System Architecture: