Skip to content

GitLab

  • Menu
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 4,976
    • Issues 4,976
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 479
    • Merge requests 479
  • 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 Compiler
  • GHCGHC
  • Issues
  • #8982
Closed
Open
Created Apr 10, 2014 by Edward Z. Yang@ezyangDeveloper

Cost center heap profile restricted by biography of GHC segfaults

Steps to reproduce:

  1. Build GHC with profiling on 64-bit Linux
  2. Run T1969 with RTS options -hc -hbvoid
[ezyang@hs01 compiler]$ '/home/hs01/ezyang/ghc-compalloc/inplace/bin/ghc-stage2' -fforce-recomp -dno-debug-output -no-user-package-db -rtsopts -fno-ghci-history -c T1969.hs   +RTS -V0 -tT1969.comp.stats --machine-readable -RTS -dcore-lint -static +RTS -hc -hbvoid
Segmentation fault

Interestingly enough, I don't see the problem with other types of profiling, e.g. '-hd'. I tried a few simpler, nontrivial Haskell programs but I couldn't reproduce the segfault, so this is some sort of bug that only shows up in complex setting (maybe multithreading is the issue?) It reproduces quite reliably for me.

When I build the runtime system with debugging, I get a useful assert failure:

ghc-stage2: internal error: ASSERTION FAILED: file rts/ProfHeap.c, line 201

    (GHC version 7.8.0.20140408 for x86_64_unknown_linux)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

This assert is complaining that the cost center (CCS_SYSTEM) never made it into the hash table for era 149.

I'll try looking for a simpler test-case later, but maybe someone can figure out what this bug is by sight.

Trac metadata
Trac field Value
Version 7.8.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Profiling
Test case
Differential revisions
BlockedBy
Related
Blocking
CC simonmar
Operating system
Architecture
Edited Mar 09, 2019 by Edward Z. Yang
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking