Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,348
    • Issues 5,348
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 571
    • Merge requests 571
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #23066
Closed
Open
Issue created Mar 02, 2023 by Matthew Pickering@mpickeringDeveloper

text benchmarks cause interpreter to segfault

There is a reproducer here: https://github.com/mpickering/text-segfault-repro

It is set up to use the byte code interpreter to execute a TH splice (using -fprefer-byte-code) but I found it issue using cabal --run with a modified version of GHC.

Backtrace looks quite consistent. I wonder if this is the issue with large bitmaps I was wondering about..

0x00007fffeee1482a in LOOKS_LIKE_CLOSURE_PTR (p=0x0) at rts/include/rts/storage/ClosureMacros.h:289
289	    const StgInfoTable *info = RELAXED_LOAD(&UNTAG_CONST_CLOSURE((const StgClosure *) (p))->header.info);
(gdb) bt
#0  0x00007fffeee1482a in LOOKS_LIKE_CLOSURE_PTR (p=0x0) at rts/include/rts/storage/ClosureMacros.h:289
#1  0x00007fffeee598b9 in evacuate1 (p=0x42039ffd40) at rts/sm/Evac.c:698
#2  0x00007fffeee75b0c in do_evacuate (p=0x42039ffd40, user=0x0) at rts/sm/Scav.c:99
#3  0x00007fffeee75acc in walk_large_bitmap (cb=0x7fffeee75af0 <do_evacuate>, p=0x42039ffd40, 
    large_bitmap=0x4202a6e738, size=8, user=0x0) at rts/sm/HeapUtils.h:32
#4  0x00007fffeee78aec in scavenge_large_bitmap (p=0x42039ffd30, large_bitmap=0x4202a6e738, size=8)
    at rts/sm/Scav.c:1862
#5  0x00007fffeee78c4a in scavenge_stack1 (p=0x42039ffd30, stack_end=0x4203a00000) at rts/sm/Scav.c:1993
#6  0x00007fffeee78291 in scavenge_one (p=0x42039f8000) at rts/sm/Scav.c:1520
#7  0x00007fffeee786af in scavenge_mutable_list1 (bd=0x4202201500, gen=0x5cc9f0) at rts/sm/Scav.c:1710
#8  0x00007fffeee7884c in scavenge_capability_mut_Lists1 (cap=0x7fffeeeca500 <MainCapability>)
    at rts/sm/Scav.c:1745
#9  0x00007fffeee61322 in GarbageCollect (collect_gen=0, do_heap_census=false, is_overflow_gc=true, 
    deadlock_detect=false, gc_type=2, cap=0x7fffeeeca500 <MainCapability>, idle_cap=0x7fffd0050270)
    at rts/sm/GC.c:510
#10 0x00007fffeee344a4 in scheduleDoGC (pcap=0x7fffdaffcd48, task=0x5dab40, force_major=false, 
    is_overflow_gc=true, deadlock_detect=false) at rts/Schedule.c:1881
#11 0x00007fffeee32374 in schedule (initialCapability=0x7fffeeeca500 <MainCapability>, task=0x5dab40)
    at rts/Schedule.c:575
#12 0x00007fffeee35c32 in scheduleWorker (cap=0x7fffeeeca500 <MainCapability>, task=0x5dab40)
    at rts/Schedule.c:2668
#13 0x00007fffeee3e2e9 in workerStart (task=0x5dab40) at rts/Task.c:444
#14 0x00007fffeee8182d in start_thread (param=0x5dac10) at rts/posix/OSThreads.c:218
#15 0x00007fffeeb47e86 in start_thread ()
   from /nix/store/ayfr5l52xkqqjn3n4h9jfacgnchz1z7s-glibc-2.35-224/lib/libc.so.6
#16 0x00007fffeebcece0 in clone3 ()
   from /nix/store/ayfr5l52xkqqjn3n4h9jfacgnchz1z7s-glibc-2.35-224/lib/libc.so.6

cc @monoidal @lexi.lambda

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking