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,254
    • Issues 5,254
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 562
    • Merge requests 562
  • 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
  • #8515
Closed
Open
Issue created Nov 09, 2013 by blitzcode@trac-blitzcode

Biographical profiling (-hb) crashes, other profiling modes have truncated output

I have a (non-trivial) threaded program which always crashes with a Bus Error when running with +RTS -hb. gdb didn't provide much useful information. Valgrind seems to have some issues with Haskell programs, but here is what it spits out:

jacky: ioManagerDie: write: Bad file descriptor ==56255== Invalid read of size 4 ==56255== at 0x1AAC4BD: LdvCensusForDead (in ./jacky) ==56255== by 0x1ABBAAC: scheduleDoGC (in ./jacky) ==56255== by 0x1ABBEBE: exitScheduler (in ./jacky) ==56255== Address 0x9c88090 is 0 bytes inside a block of size 8 free'd ==56255== at 0x3E7511F: realloc (vg_replace_malloc.c:525) ==56255== by 0x1AB9E77: stgReallocBytes (in ./jacky) ==56255== ==56255== Invalid read of size 4 ==56255== at 0x1AAC4BD: LdvCensusForDead (in ./jacky) ==56255== Address 0x9c88090 is 0 bytes inside a block of size 8 free'd ==56255== at 0x3E7511F: realloc (vg_replace_malloc.c:525) ==56255== by 0x1AB9E77: stgReallocBytes (in ./jacky)

56251== Invalid read of size 4

56251== at 0x1AAC4BD: LdvCensusForDead (in ./jacky)

56251== by 0x1ABBAAC: scheduleDoGC (in ./jacky)

56251== by 0x1ABBEBE: exitScheduler (in ./jacky)

56251== Address 0x9c88090 is 0 bytes inside a block of size 8 free'd

56251== at 0x3E7511F: realloc (vg_replace_malloc.c:525)

56251== by 0x1AB9E77: stgReallocBytes (in ./jacky)

56251==

56251== Invalid read of size 4

56251== at 0x1AAC4BD: LdvCensusForDead (in ./jacky)

56251== Address 0x9c88090 is 0 bytes inside a block of size 8 free'd

56251== at 0x3E7511F: realloc (vg_replace_malloc.c:525)

56251== by 0x1AB9E77: stgReallocBytes (in ./jacky)

running with +'RTS -hb -s' gets us this from valgrind:

jacky(56272,0xa0707540) malloc: *** error for object 0x4c05684: incorrect checksum for freed object - object was probably modified after being freed.

  • ** set a breakpoint in malloc_error_break to debug

jacky(56272,0xa0707540) malloc: *** error for object 0x4c03894: incorrect checksum for freed object - object was probably modified after being freed.

  1. ..

The program seems to work just fine when running without profiling. Profiling modes other than -hb haven't crashed so far, but it seems the output is truncated. Cost-center profiling seems to work the most reliable, but all the other memory profiling options only output data for the first few seconds, even when the program runs for minutes.

I haven't managed to narrow this one down further in the program, please let me know if this is already helpful or if I need to provide more information.

I also attached the OS X crash report file.

Trac metadata
Trac field Value
Version 7.6.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Runtime System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC simonmar
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking