SIGSEGV in program compiled with GHC 8.6.5
Summary
Hi,
I've a small haskell program, compiled with ghc 8.6.5, that receive a SIGSEGV.
I've compiled it with debug support, but the backtrace is scary since it seems to involve GC:
Program received signal SIGSEGV, Segmentation fault.
evacuate (p=p@entry=0x42001dceb8) at rts/sm/Evac.c:521
521 rts/sm/Evac.c: No such file or directory.
(gdb) bt
#0 evacuate (p=p@entry=0x42001dceb8) at rts/sm/Evac.c:521
#1 0x0000000000544741 in scavenge_small_bitmap (bitmap=<optimized out>, size=<optimized out>, p=0x42001dceb8) at rts/sm/Scav.c:240
#2 scavenge_stack (p=<optimized out>, stack_end=0x42001dd000) at rts/sm/Scav.c:1877
#3 0x0000000000544d30 in scavenge_one (p=p@entry=0x42001d5000) at rts/sm/Scav.c:1435
#4 0x0000000000545ce8 in scavenge_large (ws=0x59ac80 <the_gc_thread+320>, ws=0x59ac80 <the_gc_thread+320>) at rts/sm/Scav.c:1970
#5 scavenge_find_work () at rts/sm/Scav.c:2030
#6 scavenge_loop () at rts/sm/Scav.c:2099
#7 0x000000000053e1b8 in scavenge_until_all_done () at rts/sm/GC.c:1088
#8 GarbageCollect (collect_gen=collect_gen@entry=1, do_heap_census=do_heap_census@entry=false, gc_type=gc_type@entry=0, cap=cap@entry=0x599e40 <MainCapability>,
idle_cap=idle_cap@entry=0x0) at rts/sm/GC.c:416
#9 0x00000000005355a8 in scheduleDoGC (pcap=pcap@entry=0x7fffffffbe78, force_major=force_major@entry=false, task=0x5ad2a0) at rts/Schedule.c:1799
#10 0x0000000000535fca in schedule (task=0x5ad2a0, initialCapability=<optimized out>) at rts/Schedule.c:545
#11 scheduleWaitThread (tso=<optimized out>, ret=ret@entry=0x0, pcap=pcap@entry=0x7fffffffbed8) at rts/Schedule.c:2533
#12 0x00000000005353e8 in rts_evalLazyIO (cap=cap@entry=0x7fffffffbed8, p=p@entry=0x584dd0, ret=ret@entry=0x0) at rts/RtsAPI.c:530
#13 0x00000000005339cc in hs_main (argc=<optimized out>, argv=<optimized out>, main_closure=0x584dd0, rts_config=...) at rts/RtsMain.c:72
#14 0x0000000000403760 in main ()
Environment
- GHC version used: 8.6.5
Optional:
- Operating System: Nixos 19.09
- System Architecture: x86_64