[GHC] #8406: Invalid object in isRetainer() or Segfault

#8406: Invalid object in isRetainer() or Segfault ----------------------------------+---------------------------------- Reporter: crockeea | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Keywords: | Operating System: Linux Architecture: x86_64 (amd64) | Type of failure: Runtime crash Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ----------------------------------+---------------------------------- 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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault ----------------------------------+---------------------------------- Reporter: crockeea | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+---------------------------------- Comment (by crockeea): I forgot to point out 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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault ----------------------------------+---------------------------------- Reporter: crockeea | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+---------------------------------- Comment (by thoughtpolice): Does this happen for all programs, or only a specific one? Can you provide a small testcase, if possible? Thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault ----------------------------------+---------------------------------- Reporter: crockeea | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+---------------------------------- Comment (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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault ----------------------------------+---------------------------------- Reporter: crockeea | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+---------------------------------- Changes (by bgamari): * cc: bgamari@… (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault ----------------------------------+---------------------------------- Reporter: crockeea | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+---------------------------------- Changes (by simonmar): * status: new => infoneeded Comment: 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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault ----------------------------------+---------------------------------- Reporter: crockeea | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+---------------------------------- Comment (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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: 7.10.1 Component: Runtime | Version: 7.6.3 System | Keywords: Resolution: | Architecture: x86_64 (amd64) Operating System: Linux | Difficulty: Unknown Type of failure: Runtime | Blocked By: crash | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by thomie): * cc: simonmar (added) * component: Compiler => Runtime System Comment: 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? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: 7.10.1 Component: Runtime | Version: 7.6.3 System | Keywords: Resolution: | Architecture: x86_64 (amd64) Operating System: Linux | Difficulty: Unknown Type of failure: Runtime | Blocked By: crash | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.10.1 Component: Runtime | Version: 7.6.3 System | Keywords: Resolution: worksforme | Architecture: x86_64 (amd64) Operating System: Linux | Difficulty: Unknown Type of failure: Runtime | Blocked By: crash | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by thomie): * status: infoneeded => closed * resolution: => worksforme Comment: 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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: Runtime System | Version: 7.8.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Runtime crash | (amd64) Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by JamesM): * status: closed => new * version: 7.6.3 => 7.8.3 * resolution: worksforme => Old description:
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.
New description: 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 -- Comment: 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 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: 7.10.2 Component: Runtime System | Version: 7.8.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Runtime crash | (amd64) Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: new => infoneeded * milestone: 7.10.1 => 7.10.2 Comment: 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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: 7.12.1 Component: Runtime System | Version: 7.8.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Runtime crash | (amd64) Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thoughtpolice): * milestone: 7.10.2 => 7.12.1 Comment: (Moving to 7.12.1, as lack of updates means this is unlikely to be slated for 7.10.2) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: 8.0.1 Component: Runtime System | Version: 7.8.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by pallly): I have the same problem, here is my code: http://hub.darcs.net/pallly/hdur When I run the executable with +RTS -hr, it crashes with the "Invalid object in isRetainer(): 8". (Maybe you'll need to press the 'o' key). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault -----------------------------------+-------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: 8.0.1 Component: Runtime System | Version: 7.8.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -----------------------------------+-------------------------------------- Comment (by thomie): pally: I can not reproduce your problem. Which platform are you on? And how long does it take before your program crashes? Here's what I tried: * I'm using Ubuntu 14.04 Linux, x86-64. * I installed the following packages, after some trial and error: `libfftw3-dev libopenal-dev qtchooser qtbase5-dev qtdeclarative5-dev qtdeclarative5-qtquick2-plugin darcs` * `cabal sandbox init` * `darcs get http://hub.darcs.net/pallly/hdur` * `darcs get http://hub.darcs.net/komadori/HsQML` * `cabal install HsQML/` * `cabal install hdur/` * `.cabal-sandbox/bin/hdur` # Fails with some module not found error (frustrating! please fix, cabal install should have caught that) * I then installed `qml-module-qtquick2` from 15.04 (vivid). This also upgrade most other qt related packages * `.cabal-sandbox/bin/hdur` * I see a grey window with the subtext "foobar". When I press 'o', a black squiggly line appears on a white background. * No crash. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault -----------------------------------+-------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Runtime System | Version: 7.8.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -----------------------------------+-------------------------------------- Comment (by pallly): In the time of writing my first comment I was using Gentoo Linux, I have just managed to reproduce the problem using Arch Linux (synchronized today). Here is how I did it: * `cabal sandbox init` * `darcs get http://hub.darcs.net/pallly/hdur` * `darcs get http://hub.darcs.net/komadori/HsQML` * `cabal sandbox add-source HsQML/` * `cabal install hdur/ --enable-executable-profiling --enable-library- profiling` * `.cabal-sandbox/bin/hdur +RTS -hr` After spawning the last command the application mostly crashes within a second. If it doesn't, I press 'o' and then it always crashes within a second. Here's the message: {{{ hdur: internal error: Invalid object in isRetainer(): 8 (GHC version 7.10.3 for x86_64_unknown_linux) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault -----------------------------------+-------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Runtime System | Version: 7.8.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -----------------------------------+-------------------------------------- Comment (by thomie): Thanks, I can reproduce it now. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:19 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault -----------------------------------+-------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Runtime System | Version: 7.8.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -----------------------------------+-------------------------------------- Changes (by maoe): * cc: maoe (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:20 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault -----------------------------------+-------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.8.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -----------------------------------+-------------------------------------- Changes (by crockeea): * status: infoneeded => new -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:21 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault -----------------------------------+-------------------------------------- Reporter: crockeea | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.8.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -----------------------------------+-------------------------------------- Comment (by dredozubov): I can reproduce this problem on a project i have right now. I don't think i'll be able to contribute any extra test cases, it's quite big. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:22 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault -----------------------------------+-------------------------------------- Reporter: crockeea | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.8.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -----------------------------------+-------------------------------------- Comment (by bgamari): Note that Phab:D3967 may be relevant to some of the issues reported above. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:23 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault -----------------------------------+-------------------------------------- Reporter: crockeea | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Runtime System | Version: 7.8.3 Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -----------------------------------+-------------------------------------- Changes (by dobenour): * status: new => closed * resolution: => fixed Comment: This is probably fixed by Phab:D3967. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:24 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault -----------------------------------+-------------------------------------- Reporter: crockeea | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Runtime System | Version: 7.8.3 Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -----------------------------------+-------------------------------------- Comment (by crockeea): I just got this error with GHC-8.2.2 when profiling with -hr. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:25 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault -----------------------------------+-------------------------------------- Reporter: crockeea | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Runtime System | Version: 7.8.3 Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -----------------------------------+-------------------------------------- Comment (by RyanGlScott): crockeea, GHC 8.4.1 was the first release to incorporate the changes from Phab:D3967. Can you still reproduce the issue with that? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:26 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault -----------------------------------+-------------------------------------- Reporter: crockeea | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Runtime System | Version: 7.8.3 Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -----------------------------------+-------------------------------------- Comment (by crockeea): @RyanGlScott: Unfortunately, the program I'm trying to profile depends on #15002. In reality, I ran into this bug with 8.2.2 first, then upgraded to 8.4.1 to see if this bug was fixed there, but ran into #15002 instead. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:27 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8406: Invalid object in isRetainer() or Segfault -----------------------------------+-------------------------------------- Reporter: crockeea | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Runtime System | Version: 7.8.3 Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -----------------------------------+-------------------------------------- Comment (by crockeea): I cannot reproduce in 8.4.2, so this looks fixed to me. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8406#comment:28 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC