[GHC] #11746: I encountered an: internal error: evacuate: strange closure type 803645000

#11746: I encountered an: internal error: evacuate: strange closure type 803645000 --------------------------------------+------------------------------- Reporter: hkBst | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Keywords: | Operating System: Linux Architecture: x86_64 (amd64) | Type of failure: GHCi crash Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: --------------------------------------+------------------------------- I encountered an: internal error: evacuate: strange closure type 803645000 after loading and running the attached code under GHCi. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11746 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11746: I encountered an: internal error: evacuate: strange closure type 803645000 -------------------------------+-------------------------------------- Reporter: hkBst | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------+-------------------------------------- Changes (by hkBst): * Attachment "tinychess.hs" added. code that I was running -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11746 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11746: I encountered an: internal error: evacuate: strange closure type 803645000 -------------------------------+-------------------------------------- Reporter: hkBst | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------+-------------------------------------- Comment (by hkBst): The last command and output for when this happened. Unfortunately I cannot reproduce. {{{ *Main> :main 6 White to play: /---V---V---\ | |<K>| | D---+---+---C | | | | D---+---+---C | | K | | \---A---A---/ [0,3,-5,3,-3,3] Black to play: /---V---V---\ | |<K>| | D---+---+---C | | | | D---+---+---C | K | | | \---A---A---/ [2,5,-3,3,-3,5] White to play: /---V---V---\ |<K>| | | D---+---+---C | | | | D---+---+---C | K | | | \---A---A---/ [0,5,-3,3,-5,3] Black to play: /---V---V---\ |<K>| | | D---+---+---C | | | | D---+---+---C | | K | | \---A---A---/ [-2,3,-3,5,-3,3] <interactive>: internal error: evacuate: strange closure type 803645000 (GHC version 7.10.3 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/11746#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11746: I encountered an: internal error: evacuate: strange closure type 803645000 -------------------------------+-------------------------------------- Reporter: hkBst | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------+-------------------------------------- Changes (by bgamari): * priority: normal => high * cc: simonmar (added) * milestone: => 8.0.1 Comment: I can also reproduce this with your example. Simply load the file into ghci and run, {{{ $ ghci tinychess.hs GHCi, version 7.10.2.20151118: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( tinychess.hs, interpreted ) Ok, modules loaded: Main. λ> import Control.Monad (forever) λ> forever $ playGame 6 . . . D---+---+---C | | K | | \---A---A---/ [-2,3,-3,5,-3,3] <interactive>: internal error: evacuate: strange closure type 1195407224 (GHC version 7.10.2.20151118 for x86_64_unknown_linux) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug Aborted $ }}} The problem is evidently still lurking as I see segmentation faults if I run the same test with a recent `ghc-8.0` snapshot. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11746#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11746: I encountered an: internal error: evacuate: strange closure type 803645000 -------------------------------+-------------------------------------- Reporter: hkBst | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------+-------------------------------------- Comment (by bgamari): Reproducing in gdb reveals this, {{{ (gdb) bt #0 0x00007fffecd46507 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55 #1 0x00007fffecd478da in __GI_abort () at abort.c:89 #2 0x00007fffed2f4302 in rtsFatalInternalErrorFn (s=<optimized out>, ap=0x7fffeb38dba8) at rts/RtsMessages.c:182 #3 0x00007fffed2f4460 in barf (s=s@entry=0x7fffed31ab80 "evacuate: strange closure type %d") at rts/RtsMessages.c:46 #4 0x00007fffed2df88e in evacuate (p=p@entry=0x204ed00a8) at rts/dist/build/sm/Evac_thr.c:740 #5 0x00007fffed2fe711 in tidyWeakList (gen=<optimized out>) at rts/sm/MarkWeak.c:270 #6 0x00007fffed2fea08 in traverseWeakPtrList () at rts/sm/MarkWeak.c:130 #7 0x00007fffed300332 in GarbageCollect (collect_gen=collect_gen@entry=1, do_heap_census=do_heap_census@entry=rtsFalse, gc_type=gc_type@entry=2, cap=cap@entry=0x7fffed52ad00 <MainCapability>) at rts/sm/GC.c:409 #8 0x00007fffed2f1d51 in scheduleDoGC (pcap=pcap@entry=0x7fffeb38deb0, task=task@entry=0x7af4f0, force_major=force_major@entry=rtsFalse) at rts/Schedule.c:1652 #9 0x00007fffed2f294e in schedule (initialCapability=<optimized out>, task=task@entry=0x7af4f0) at rts/Schedule.c:551 #10 0x00007fffed2f3a5c in scheduleWorker (cap=<optimized out>, task=0x7af4f0) at rts/Schedule.c:2378 #11 0x00007ffff738c284 in start_thread (arg=0x7fffeb38e700) at pthread_create.c:333 #12 0x00007fffecdfba4d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 }}} It appears this is weak-pointer related. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11746#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11746: I encountered an: internal error: evacuate: strange closure type 803645000 -------------------------------+-------------------------------------- Reporter: hkBst | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------+-------------------------------------- Comment (by hkBst): I don't know if this is related or not, but after compiling with profiling enabled: $ ghc -O2 -fforce-recomp -prof -fprof-auto tinychess.hs even $ $ time ./tinychess 0 +RTS -p would exhaust memory on my machine and I had to kill it. The argument 0 determines the depth of moves that are considered for evaluating the possible next positions. Without profiling this completes instantly as one would expect. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11746#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11746: I encountered an: internal error: evacuate: strange closure type 803645000 -------------------------------+-------------------------------------- Reporter: hkBst | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: GHCi 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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11746#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11746: I encountered an: internal error: evacuate: strange closure type 803645000 -------------------------------+-------------------------------------- Reporter: hkBst | Owner: Type: bug | Status: closed Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.10.3 Resolution: duplicate | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: #11108 | Differential Rev(s): Wiki Page: | -------------------------------+-------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => duplicate Comment: Lovely. Thanks jme! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11746#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11746: I encountered an: internal error: evacuate: strange closure type 803645000
-------------------------------+--------------------------------------
Reporter: hkBst | Owner:
Type: bug | Status: closed
Priority: high | Milestone: 8.0.1
Component: Compiler | Version: 7.10.3
Resolution: duplicate | Keywords:
Operating System: Linux | Architecture: x86_64 (amd64)
Type of failure: GHCi crash | Test Case:
Blocked By: | Blocking:
Related Tickets: #11108 | Differential Rev(s):
Wiki Page: |
-------------------------------+--------------------------------------
Comment (by Ben Gamari
participants (1)
-
GHC