[GHC] #11972: Weak pointers can cause segfault

#11972: Weak pointers can cause segfault -------------------------------------+------------------------------------- Reporter: ryantrinkle | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc3 Keywords: | Operating System: Unknown/Multiple Architecture: x86_64 | Type of failure: Runtime crash (amd64) | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- The attached program segfaults. It appears to be nondeterministic, but on my machine, it occurs at least 95% of the time. Some small changes, such as removing the bang pattern, cause the segfault to become much less likely. {{{ weakPointerSegfault: internal error: ASSERTION FAILED: file rts/sm/GCAux.c, line 44 (GHC version 8.0.0.20160411 for x86_64_unknown_linux) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug Aborted (core dumped) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11972 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11972: Weak pointers can cause segfault -------------------------------------+------------------------------------- Reporter: ryantrinkle | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by ryantrinkle): * Attachment "weakPointerSegfault.hs" added. weakPointerSegfault.hs -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11972 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11972: Weak pointers can cause segfault -------------------------------------+------------------------------------- Reporter: ryantrinkle | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by niteria): It also reproduces on HEAD. I've run it in gdb with a breakpoint on the address it's complaining about: https://phabricator.haskell.org/P107 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11972#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11972: Weak pointers can cause segfault -------------------------------------+------------------------------------- Reporter: ryantrinkle | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: #11108 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by jme): * related: => #11108 Comment: This appears to be the same issue as #11108. If you need a workaround, try running with `+RTS -G1 -RTS`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11972#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11972: Weak pointers can cause segfault -------------------------------------+------------------------------------- Reporter: ryantrinkle | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc3 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: #11108 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by niteria): * status: new => closed * resolution: => duplicate Comment: You're right, this is exactly the same as #11108, I poked around yesterday and reached the same conclusion as you here: https://ghc.haskell.org/trac/ghc/ticket/11108#comment:7 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11972#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC