[GHC] #8515: Biographical profiling (-hb) crashes, other profiling modes have truncated output

#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

#8515: Biographical profiling (-hb) crashes, other profiling modes have truncated output -----------------------------------+---------------------------- Reporter: blitzcode | Owner: simonmar Type: bug | Status: new Priority: highest | Milestone: 7.8.1 Component: Runtime System | Version: 7.6.3 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86 Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -----------------------------------+---------------------------- Changes (by simonmar): * priority: normal => highest * milestone: => 7.8.1 Comment: I am seeing some problems with `+RTS -hb`, which seem to be because the code generator is leaving slop in the heap sometimes. I've been working on a patch to the code generator to fix this, but unfortunately it doesn't validate yet because it makes stage2 crash (and nothing else, as far as I can tell). Still working on it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8515#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8515: Biographical profiling (-hb) crashes, other profiling modes have truncated
output
-----------------------------------+----------------------------
Reporter: blitzcode | Owner: simonmar
Type: bug | Status: new
Priority: highest | Milestone: 7.8.1
Component: Runtime System | Version: 7.6.3
Resolution: | Keywords:
Operating System: MacOS X | Architecture: x86
Type of failure: Runtime crash | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-----------------------------------+----------------------------
Comment (by Simon Marlow

#8515: Biographical profiling (-hb) crashes, other profiling modes have truncated output -----------------------------------+---------------------------- Reporter: blitzcode | Owner: simonmar Type: bug | Status: closed Priority: highest | Milestone: 7.8.1 Component: Runtime System | Version: 7.6.3 Resolution: fixed | Keywords: Operating System: MacOS X | Architecture: x86 Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -----------------------------------+---------------------------- Changes (by simonmar): * status: new => closed * resolution: => fixed Comment: This fixes the crashes I saw with +RTS -hb here.. Please re-open if you still have problems. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8515#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC