9.4.5 `internal error: ASSERTION FAILED: file rts/Schedule.h, line 175`
Summary
Running our web application with -debug
runtime linked, waiting a little bit and then exiting with sigint results in
my-program: internal error: ASSERTION FAILED: file rts/Schedule.h, line 175
(GHC version 9.4.5 for x86_64_unknown_linux)
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
this is the assertion i think
https://gitlab.haskell.org/ghc/ghc/-/blob/ghc-9.4.5-release/rts/Schedule.h#L175
this is backtrace from gdb
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff7a95859 in __GI_abort () at abort.c:79
#2 0x000000000be4e9c9 in rtsFatalInternalErrorFn (s=0xc3d96a8 "ASSERTION FAILED: file %s, line %u\n", ap=0x7fffffffc818) at rts/RtsMessages.c:192
#3 0x000000000be4e5d1 in barf (s=0xc3d96a8 "ASSERTION FAILED: file %s, line %u\n") at rts/RtsMessages.c:48
#4 0x000000000be4e634 in _assertFail (filename=0xc3d6ac0 "rts/Schedule.h", linenum=175) at rts/RtsMessages.c:63
#5 0x000000000be494df in appendToRunQueue (cap=0xd7b0600 <MainCapability>, tso=0x420627f078) at rts/Schedule.h:175
#6 0x000000000be9d6b4 in raiseAsync (cap=0xd7b0600 <MainCapability>, tso=0x420627f078, exception=0xd6bfa70, stop_at_atomically=false, stop_here=0x0) at rts/RaiseAsync.c:1094
#7 0x000000000be7d766 in awaitEvent (wait=true) at rts/posix/Select.c:425
#8 0x000000000be53e34 in scheduleCheckBlockedThreads (cap=0xd7b0600 <MainCapability>) at rts/Schedule.c:919
#9 0x000000000be53d9f in scheduleFindWork (pcap=0x7fffffffcbf0) at rts/Schedule.c:636
#10 0x000000000be53346 in schedule (initialCapability=0xd7b0600 <MainCapability>, task=0xd7cf0b0) at rts/Schedule.c:296
#11 0x000000000be55099 in scheduleWaitThread (tso=0x4200405388, ret=0x0, pcap=0x7fffffffcce0) at rts/Schedule.c:2647
#12 0x000000000be4abdb in rts_evalLazyIO (cap=0x7fffffffcce0, p=0xc435078, ret=0x0) at rts/RtsAPI.c:566
#13 0x000000000be4e493 in hs_main (argc=2, argv=0x7fffffffcee8, main_closure=0xc435078, rts_config=...) at rts/RtsMain.c:72
#14 0x000000000040a95e in main ()
Steps to reproduce
The above. I can trigger it reliably so am happy to try things but I don't have a tiny reproduction and it's work code.
Expected behavior
Exit without abort
Environment
- GHC version used: 9.4.5
Optional:
- Operating System: Ubuntu 20.04 via wsl 2
- System Architecture: amd64