Opened 20 months ago

Last modified 2 weeks ago

#8406 infoneeded bug

Invalid object in isRetainer() or Segfault

Reported by: crockeea Owned by:
Priority: normal Milestone: 7.12.1
Component: Runtime System Version: 7.8.3
Keywords: Cc: bgamari@…, simonmar
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Runtime crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description (last modified by JamesM)

When compiling with
-rtsopts -threaded -prof -fprof-auto -caf-all

and running with
-N4 -hr

I get a "Segmentation fault" every time.

If I run with -N4 -qg1 -hr, I either get a segfault or
internal error: Invalid object in isRetainer(): 40

When the segfault happens, it happens quickly. If the segfault doesn't happen, the program runs for about 5 seconds and I get "invalid object" error (always 40).

Without -hr, I have never gotten a segfault.

Edit (1/2015): This is still occurring under multiple threads in ghc 7.8.3.
GHC options: -Wall -prof -fprof-auto -threaded -rtsopts
Runtime Options: -N4 -hr -L1000

Change History (13)

comment:1 Changed 20 months ago by crockeea

I forgot to add that if I don't specify either of "-N4" or "-qg1" (but still compile with -threaded), the program runs as expected and does not crash. The problem also occurred with GHC-7.6.2.

Last edited 20 months ago by crockeea (previous) (diff)

comment:2 Changed 20 months ago by thoughtpolice

Does this happen for all programs, or only a specific one? Can you provide a small testcase, if possible? Thanks!

comment:3 Changed 20 months ago by crockeea

It just happened for one program I'm profiling at the moment. It's quite large, so I may not be able to get a small test case.

comment:4 Changed 20 months ago by bgamari

  • Cc bgamari@… added

comment:5 Changed 20 months ago by simonmar

  • Status changed from new to infoneeded

We had a similar problem a while back - #5909, but that was fixed in 7.6.2. Are you sure you're using 7.6.3?

If so, we'll need some repro instructions.

comment:6 Changed 20 months ago by crockeea

I had the problem in 7.6.2, then specifically upgraded to 7.6.3 in the hopes it would be fixed. No dice.

comment:7 Changed 11 months ago by thoughtpolice

  • Milestone set to 7.10.1

Moving to 7.10.1.

comment:8 Changed 6 months ago by thomie

  • Cc simonmar added
  • Component changed from Compiler to Runtime System

crockeea: could you try to compile your program with 7.8.3? Without a testcase it's hard to do anything. Should we keep this ticket open?

comment:9 Changed 6 months ago by crockeea

I won't be able to come up with an testcase anymore. My guess is that there was (is?) a problem with -hr and multithreading, but I no longer have the code and the problem does not occur in 7.8.3 with a simple single-threaded example.

comment:10 Changed 6 months ago by thomie

  • Resolution set to worksforme
  • Status changed from infoneeded to closed

Let's close it then, things have changed quite a bit since 7.6.3. If the problems shows up again, please do re-open.

comment:11 Changed 4 months ago by JamesM

  • Description modified (diff)
  • Resolution worksforme deleted
  • Status changed from closed to new
  • Version changed from 7.6.3 to 7.8.3

This is still occurring for me. However, it is only problematic when using multiple threads changing from -N4 to -N1 removes the issue:

par-simulator: internal error: Invalid object in isRetainer(): 39

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

Abort trap: 6

comment:12 Changed 4 months ago by thoughtpolice

  • Milestone changed from 7.10.1 to 7.10.2
  • Status changed from new to infoneeded

Can we still get a testcase if at all possible? As long as it has reproducible build instructions - without that, there's very little hope of us being able to do much here.

FWIW, it looks unlikely this will make 7.10, so I'm moving out to a later milestone for a future bugfix release.

comment:13 Changed 2 weeks ago by thoughtpolice

  • Milestone changed from 7.10.2 to 7.12.1

(Moving to 7.12.1, as lack of updates means this is unlikely to be slated for 7.10.2)

Note: See TracTickets for help on using tickets.