[GHC] #12100: GHC 8.0.1 build segmentation fault in haddock

GHC ghc-devs at haskell.org
Sat Nov 26 09:57:18 UTC 2016


#12100: GHC 8.0.1 build segmentation fault in haddock
-------------------------------------+-------------------------------------
        Reporter:  ilovezfs          |                Owner:
            Type:  bug               |               Status:  infoneeded
        Priority:  highest           |            Milestone:  8.0.3
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  MacOS X           |         Architecture:
 Type of failure:  Building GHC      |  Unknown/Multiple
  failed                             |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #11744, #11951    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by pggiarrusso):

 It's a start, since it gives the crashing position (`initGcThreads + 674
 (GC.c:818)`) and suggests the runtime system is possibly (though not
 necessarily) involved.
 However, it seems the failing binary is not literally 8.0.1, so the line
 number might be out of sync. What's the source of the `ghc8.0.1.20161117`
 you're using?
 A stacktrace could be a bit better.

 Below, what I can analyze out of this dump, which isn't that much really.
 I suspect we'd need an actual coredump.

 https://github.com/ghc/ghc/blob/ghc-8.0.1-release/rts/sm/GC.c#L818 is an
 unlikely source of a crash. (But my best guess, based on a snapshot of
 ghc-8.0 with that date, suggests the affected code is
 https://github.com/ghc/ghc/blob/58d9f9b7a7f1b4d2c94183b9b9428983e7c83fe9/rts/sm/GC.c#L818,
 which is similarly surprising). If either is accurate, we have a segfault
 when writing *in the middle* of `gen_workspace *ws`. If the source tree
 matches commit commit 58d9f9b7a7f1b4d2c94183b9b9428983e7c83fe9, given the
 type definition in
 https://github.com/ghc/ghc/blob/58d9f9b7a7f1b4d2c94183b9b9428983e7c83fe9/rts/sm/GCThread.h#L79-L90,
 the crash is when writing to field `ws->todo_large_objects`, which starts
 64 bytes after the start of `ws`. `ws` is 64-bytes aligned, so this is
 plausible (if `ws->todo_large_objects` points to the beginning of a page).
 Strangely, no register in the dump has the right alignment to be such a
 `ws`.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12100#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list