Opened 12 months ago

Last modified 9 months ago

#7836 infoneeded bug

Runtime failure profiling with +RTS -hc -hbdrag,void

Reported by: hyperthunk Owned by:
Priority: normal Milestone:
Component: Profiling Version: 7.4.2
Keywords: profiling osx Cc:
Operating System: MacOS X Architecture: x86_64 (amd64)
Type of failure: Runtime crash Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description (last modified by igloo)

Running the attached program, compiled with "-threaded -Wall -auto-all -caf-all -fforce-recomp -fprof-auto-top -fprof-auto-calls" - with the following flags: +RTS -hc -hbdrag,void -RTS

The output is as follows:

leaks: internal error: Invalid object in processHeapClosureForDead(): 60
    (GHC version 7.4.2 for i386_apple_darwin)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
Abort trap: 6

Attachments (1)

LeakByteStrings.hs (2.2 KB) - added by hyperthunk 12 months ago.
Program that triggers the bug

Download all attachments as: .zip

Change History (10)

Changed 12 months ago by hyperthunk

Program that triggers the bug

comment:1 follow-up: Changed 12 months ago by ezyang

  • Status changed from new to infoneeded

Thanks! It looks like there's a pretty nontrivial dependency in the sample program; can you check if this behavior occurs in 7.6/HEAD?

comment:2 in reply to: ↑ 1 ; follow-up: Changed 12 months ago by hyperthunk

Replying to ezyang:

Thanks! It looks like there's a pretty nontrivial dependency in the sample program; can you check if this behavior occurs in 7.6/HEAD?

Will do that and report back.

comment:3 in reply to: ↑ 2 Changed 12 months ago by hyperthunk

  • Architecture changed from x86 to x86_64 (amd64)
  • Type of failure changed from None/Unknown to Runtime crash

Replying to hyperthunk:

Replying to ezyang:

Thanks! It looks like there's a pretty nontrivial dependency in the sample program; can you check if this behavior occurs in 7.6/HEAD?

Will do that and report back.

Interim results with 7.6.2 look good:

t4@iske:distributed-process-platform $ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.2
t4@iske:distributed-process-platform $ ghc-env active
7.6.2-x86_64

And the results:

t4@iske:distributed-process-platform $ ./dist/build/leaks/leaks +RTS -hc -hbdrag,void -RTS
Mon Apr 15 14:00:50 UTC 2013 pid://127.0.0.1:10519:0:3: mnesia started
Mon Apr 15 14:00:57 UTC 2013 pid://127.0.0.1:10519:0:3: mnesia blurble
t4@iske:distributed-process-platform $ ./dist/build/leaks/leaks +RTS -N -hc -hbdrag,void -RTS
Mon Apr 15 14:01:36 UTC 2013 pid://127.0.0.1:10519:0:3: mnesia started
Mon Apr 15 14:01:42 UTC 2013 pid://127.0.0.1:10519:0:3: mnesia blurble

However if I supply a specific value for -N<num> though, it crashes with a bus error - perhaps that's an entirely different but to what I originally reported though...

t4@iske:distributed-process-platform $ ./dist/build/leaks/leaks +RTS -N2 -hc -hbdrag,void -RTS
Mon Apr 15 14:01:51 UTC 2013 pid://127.0.0.1:10519:0:3Bus error: 10
t4@iske:distributed-process-platform $ ./dist/build/leaks/leaks +RTS -N3 -hc -hbdrag,void -RTS
Mon Apr 15 14:01:58 UTC 2013 pid://127.0.0.1:10519:0:3: mnesia staBus error: 10
t4@iske:distributed-process-platform $ ./dist/build/leaks/leaks +RTS -N4 -hc -hbdrag,void -RTS
Mon Apr 15 14:02:03 UTC 2013 pid://127.0.0.1Bus error: 10

Platform details:

t4@iske:distributed-process-platform $ uname -a
Darwin iske.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64

comment:4 Changed 12 months ago by hyperthunk

Urgh sorry, that didn't get formatted at all well:

t4@iske:distributed-process-platform $ ./dist/build/leaks/leaks +RTS -hc -hbdrag,void -RTS
Mon Apr 15 14:00:50 UTC 2013 pid://127.0.0.1:10519:0:3: mnesia started
Mon Apr 15 14:00:57 UTC 2013 pid://127.0.0.1:10519:0:3: mnesia blurble
t4@iske:distributed-process-platform $ ./dist/build/leaks/leaks +RTS -N -hc -RTS
Mon Apr 15 14:01:06 UTC 2013 pid://127.0.0.1:10519:0:3: mnesia started
Mon Apr 15 14:01:11 UTC 2013 pid://127.0.0.1:10519:0:3: mnesia blurble
t4@iske:distributed-process-platform $ ./dist/build/leaks/leaks +RTS -N -hbdrag,void -RTS
Mon Apr 15 14:01:20 UTC 2013 pid://127.0.0.1:10519:0:3: mnesia started
Mon Apr 15 14:01:26 UTC 2013 pid://127.0.0.1:10519:0:3: mnesia blurble
t4@iske:distributed-process-platform $ ./dist/build/leaks/leaks +RTS -N -hc -hbdrag,void -RTS
Mon Apr 15 14:01:36 UTC 2013 pid://127.0.0.1:10519:0:3: mnesia started
Mon Apr 15 14:01:42 UTC 2013 pid://127.0.0.1:10519:0:3: mnesia blurble
t4@iske:distributed-process-platform $ ./dist/build/leaks/leaks +RTS -N2 -hc -hbdrag,void -RTS
Mon Apr 15 14:01:51 UTC 2013 pid://127.0.0.1:10519:0:3Bus error: 10
t4@iske:distributed-process-platform $ ./dist/build/leaks/leaks +RTS -N2 -hc -hbdrag,void -RTS
Mon Apr 15 14:01:54 UTC 2013 pid://127.0.0.1:Bus error: 10
t4@iske:distributed-process-platform $ ./dist/build/leaks/leaks +RTS -N3 -hc -hbdrag,void -RTS
Mon Apr 15 14:01:58 UTC 2013 pid://127.0.0.1:10519:0:3: mnesia staBus error: 10
t4@iske:distributed-process-platform $ ./dist/build/leaks/leaks +RTS -N4 -hc -hbdrag,void -RTS
Mon Apr 15 14:02:03 UTC 2013 pid://127.0.0.1Bus error: 10
t4@iske:distributed-process-platform $ ./dist/build/leaks/leaks +RTS -N -hc -hbdrag,void -RTS
Mon Apr 15 14:02:05 UTC 2013 pid://127.0.0.1:10519:0:3: mnesia started
Mon Apr 15 14:02:12 UTC 2013 pid://127.0.0.1:10519:0:3: mnesia blurble

comment:5 follow-up: Changed 12 months ago by ezyang

Bus error usually indicates that you've hit an rlimit. If you run the program inside gdb what happens?

comment:6 in reply to: ↑ 5 Changed 12 months ago by hyperthunk

Replying to ezyang:

Bus error usually indicates that you've hit an rlimit. If you run the program inside gdb what happens?

Bear with me - I'll get back to you once I've found time to do that.

comment:7 Changed 11 months ago by hyperthunk

Sorry, I've not found time to deal with this yet, but I haven't forgotten. It's just behind a bunch of other stuff on a very long back-burner.

comment:8 Changed 10 months ago by igloo

  • Description modified (diff)
  • Difficulty set to Unknown

comment:9 Changed 9 months ago by crockeea

I got the following error:

> ghc -rtsopts -prof -fprof-auto -threaded A
> ./A +RTS -sstderr -hb
A: internal error: Invalid object in processHeapClosureForDead(): 0
    (GHC version 7.6.3 for x86_64_unknown_linux)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
Aborted

All other heap profiling options (-hc -hm -hd -hy -hr) work without error.

Note that this occurred with GHC 7.6.3 (linux, x86_64 (amd64)). My program is too large to post, but I figured I would add this to the bug report to let you know the problem persists.

Last edited 9 months ago by crockeea (previous) (diff)
Note: See TracTickets for help on using tickets.