[GHC] #14497: internal error: scavenge_one: strange object 19828

#14497: internal error: scavenge_one: strange object 19828 -------------------------------------+------------------------------------- Reporter: Yuras | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Runtime crash Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I'll attach the test program. Reproduces each time. {{{ $ ./test Nothing test: internal error: scavenge_one: strange object 19828 Stack trace: 0x4b27df set_initial_registers (rts/Libdw.c:288.0) 0x7fe51b3fcd48 dwfl_thread_getframes (/usr/lib/x86_64 -linux-gnu/libdw-0.170.so) 0x7fe51b3fd22c dwfl_getthread_frames (/usr/lib/x86_64 -linux-gnu/libdw-0.170.so) 0x4b2ddd libdwGetBacktrace (rts/Libdw.c:259.0) 0x49883b rtsFatalInternalErrorFn (rts/RtsMessages.c:169.0) 0x4989ed barf (rts/RtsMessages.c:47.0) 0x4b3f8c scavenge_one (rts/sm/Scav.c:1615.0) 0x4b4e91 scavenge_loop1 (rts/sm/Scav.c:2066.0) 0x49d517 scavenge_until_all_done (rts/sm/GC.c:1017.0) 0x49dde4 GarbageCollect (rts/sm/GC.c:412.0) 0x4969a3 scheduleDoGC (rts/Schedule.c:1827.0) 0x49776c schedule (rts/Schedule.c:558.0) 0x49811c scheduleWorker (rts/Schedule.c:2582.0) 0x7fe51b835494 start_thread (/build/glibc- tnXPha/glibc-2.24/nptl/pthread_create.c:333.0) 0x7fe51b113abf __clone (../sysdeps/unix/sysv/linux/x86_64/clone.S:99.0) (GHC version 8.2.1 for x86_64_unknown_linux) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug Aborted }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14497 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14497: internal error: scavenge_one: strange object 19828 -------------------------------------+------------------------------------- Reporter: Yuras | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by Yuras): * Attachment "test.hs" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14497 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14497: internal error: scavenge_one: strange object 19828 -------------------------------------+------------------------------------- Reporter: Yuras | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by Yuras): * Attachment "test2.hs" added. This simplified version produces different object type: strange object 781 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14497 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14497: internal error: scavenge_one: strange object 19828 -------------------------------------+------------------------------------- Reporter: Yuras | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): It's worth noting that one must compile the program with `-O1` or `-O2` to trigger this panic (i.e., `-O0` isn't sufficient). Also, the panic itself only seems to appear on GHC 8.2.1 and HEAD. With 8.0.2 and older, you can still run the program, but the two forked computations never appear to return. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14497#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14497: internal error: scavenge_one: strange object 19828 -------------------------------------+------------------------------------- Reporter: Yuras | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.2.2 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by Yuras): * cc: simonmar (added) * priority: normal => high * milestone: => 8.2.2 Comment: Then it is a regression, right? Please feel free to lower priority/change milestone if you disagree. I played with it a bit. Looks like it is not related neither to `ST`, no to concurrent evaluation of the same thunk. But resuming a thunk after blackholing is completely broken. Once I even got <<timeout>> exception thrown in each child thread. Disaster. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14497#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14497: internal error: scavenge_one: strange object 19828 -------------------------------------+------------------------------------- Reporter: Yuras | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.4.1 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * milestone: 8.2.2 => 8.4.1 Comment: Well one thing's for certain: this isn't going to make it into 8.2.2, as that ship's already sailed. Whether or not this is a regression is debatable, as this program has never done the correct thing (on old versions, it would simply never finish the forked computations, whereas now the problem is more readily apparent). I'll mark this for the 8.4.1 milestone to be on the safe side. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14497#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14497: internal error: scavenge_one: strange object 19828 -------------------------------------+------------------------------------- Reporter: Yuras | Owner: bgamari Type: bug | Status: new Priority: high | Milestone: 8.2.3 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * owner: (none) => bgamari * milestone: 8.4.1 => 8.2.3 Comment: Ahh good, another puzzle. Marking for 8.2.3 just in case such a release happens. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14497#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14497: internal error: scavenge_one: strange object 19828 -------------------------------------+------------------------------------- Reporter: Yuras | Owner: bgamari Type: bug | Status: new Priority: high | Milestone: 8.2.3 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by duog): * cc: duog (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14497#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14497: internal error: scavenge_one: strange object 19828 -------------------------------------+------------------------------------- Reporter: Yuras | Owner: bgamari Type: bug | Status: new Priority: high | Milestone: 8.2.3 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by dfeuer): * cc: dfeuer (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14497#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14497: internal error: scavenge_one: strange object 19828 -------------------------------------+------------------------------------- Reporter: Yuras | Owner: bgamari Type: bug | Status: new Priority: high | Milestone: 8.2.3 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by dfeuer): If I change `fuc` to {{{#!hs fuc n = product (force [1..n]) }}} then I can't reproduce the problem. This suggests that the (presumably rather large) stack allocation in Yuras's version may be relevant in some fashion, I imagine. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14497#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14497: internal error: scavenge_one: strange object 19828 -------------------------------------+------------------------------------- Reporter: Yuras | Owner: simonmar Type: bug | Status: new Priority: high | Milestone: 8.2.3 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonmar): * owner: bgamari => simonmar Comment: I think this is a simple fix, patch coming. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14497#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14497: internal error: scavenge_one: strange object 19828 -------------------------------------+------------------------------------- Reporter: Yuras | Owner: simonmar Type: bug | Status: new Priority: high | Milestone: 8.2.3 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4254 Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonmar): * differential: => Phab:D4254 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14497#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14497: internal error: scavenge_one: strange object 19828
-------------------------------------+-------------------------------------
Reporter: Yuras | Owner: simonmar
Type: bug | Status: new
Priority: high | Milestone: 8.2.3
Component: Compiler | Version: 8.2.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Runtime crash | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D4254
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by David Feuer

#14497: internal error: scavenge_one: strange object 19828 -------------------------------------+------------------------------------- Reporter: Yuras | Owner: simonmar Type: bug | Status: merge Priority: high | Milestone: 8.2.3 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4254 Wiki Page: | -------------------------------------+------------------------------------- Changes (by dfeuer): * status: new => merge -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14497#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14497: internal error: scavenge_one: strange object 19828 -------------------------------------+------------------------------------- Reporter: Yuras | Owner: simonmar Type: bug | Status: closed Priority: high | Milestone: 8.2.3 Component: Compiler | Version: 8.2.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4254 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: Merged with 3e3a096885c0fcd0703edbeffb4e47f5cbd8f4cc. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14497#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC