[GHC] #8515: Biographical profiling (-hb) crashes, other profiling modes have truncated output
GHC
ghc-devs at haskell.org
Sat Nov 9 20:04:31 UTC 2013
#8515: Biographical profiling (-hb) crashes, other profiling modes have truncated
output
----------------------------------+----------------------------------
Reporter: blitzcode | Owner: simonmar
Type: bug | Status: new
Priority: normal | Milestone:
Component: Runtime System | Version: 7.6.3
Keywords: | Operating System: MacOS X
Architecture: x86 | Type of failure: Runtime crash
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
----------------------------------+----------------------------------
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.
...
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.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8515>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list