Assertion Failed in rts/sm/NonMovingMark.c, line 1815
Summary
Program immediately hits an assertion at rts/sm/NonMovingMark.c:1815 when run with +RTS -N --nonmoving-gc
Backtrace:
#0 0x00007ff6d868e36c in ?? () from /usr/lib/libc.so.6
#1 0x00007ff6d863e838 in raise () from /usr/lib/libc.so.6
#2 0x00007ff6d8628535 in abort () from /usr/lib/libc.so.6
#3 0x000000000097e660 in rtsFatalInternalErrorFn (s=0x25cda0 "ASSERTION FAILED: file %s, line %u\n", ap=0x7ff6c57f9c28) at rts/RtsMessages.c:192
#4 0x000000000097e2ed in barf (s=0x25cda0 "ASSERTION FAILED: file %s, line %u\n") at rts/RtsMessages.c:48
#5 0x000000000097e31f in _assertFail (filename=0x269202 "rts/sm/NonMovingMark.c", linenum=1815) at rts/RtsMessages.c:63
#6 0x00000000009adc63 in nonmovingIsNowAlive (p=0x4201504270) at rts/sm/NonMovingMark.c:1815
#7 0x00000000009add44 in nonmovingTidyWeaks (queue=0x7ff6b8000e60) at rts/sm/NonMovingMark.c:1845
#8 0x00000000009b1f53 in nonmovingMarkThreadsWeaks (mark_queue=0x7ff6b8000e60) at rts/sm/NonMoving.c:1029
#9 0x00000000009b20ee in nonmovingMark_ (mark_queue=0x7ff6b8000e60, dead_weaks=0x7ff6c57f9e40, resurrected_threads=0x7ff6c57f9e38) at rts/sm/NonMoving.c:1085
#10 0x00000000009b1f9a in nonmovingConcurrentMark (data=0x7ff6b8000e60) at rts/sm/NonMoving.c:1040
#11 0x00007ff6d868c54d in ?? () from /usr/lib/libc.so.6
#12 0x00007ff6d8711874 in clone () from /usr/lib/libc.so.6
I think this may be the same as #18436 (closed)
Reproducer
This is the simplest reproducer I have been able to distill. It exhibits the same behavior across a few ghc versions and machines.
package.yaml
dependencies:
- base >= 4.7 && < 5
- connection == 0.3.1
executables:
repro-exe:
main: Main.hs
source-dirs: app
ghc-options:
- -g
- -debug
- -threaded
- -rtsopts
Main.hs:
import Control.Concurrent
import Network.Connection
main :: IO ()
main = do
context <- initConnectionContext
con <-
connectTo context $
ConnectionParams
"haskell.org"
443
(Just $ TLSSettingsSimple False False False)
Nothing
threadDelay 1000000
Environment
- GHC version used: 9.2.4
Optional:
- Operating System: linux 5.18.3-arch1-1
- System Architecture: x86-64