[GHC] #14036: GHCi HEAD segfaults upon startup with a prof build

GHC ghc-devs at haskell.org
Thu Jul 27 03:01:23 UTC 2017


#14036: GHCi HEAD segfaults upon startup with a prof build
-------------------------------------+-------------------------------------
           Reporter:  RyanGlScott    |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  highest        |         Milestone:  8.4.1
          Component:  Compiler       |           Version:  8.3
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  GHCi crash
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 After building GHC HEAD using a `mk/build.mk` file with the following
 settings:

 {{{
 BuildFlavour = prof
 GhcStage2HcOpts    = -O0 $(GhcFAsm) -fprof-auto -DDEBUG
 }}}

 I find myself knee-deep in segfault town:

 {{{
 $ inplace/bin/ghc-stage2 --interactive
 GHCi, version 8.3.20170726: http://www.haskell.org/ghc/  :? for help
 Segmentation fault (core dumped)
 }}}

 Welp.

 Here's what happens when I run it through `gdb`:

 {{{
 $ gdb inplace/lib/bin/ghc-stage2
 GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
 Copyright (C) 2014 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later
 <http://gnu.org/licenses/gpl.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
 and "show warranty" for details.
 This GDB was configured as "x86_64-linux-gnu".
 Type "show configuration" for configuration details.
 For bug reporting instructions, please see:
 <http://www.gnu.org/software/gdb/bugs/>.
 Find the GDB manual and other documentation resources online at:
 <http://www.gnu.org/software/gdb/documentation/>.
 For help, type "help".
 Type "apropos word" to search for commands related to "word"...
 Reading symbols from inplace/lib/bin/ghc-stage2...done.
 (gdb) r -B"/u/rgscott/Software/ghc2/inplace/lib" --interactive
 Starting program: /home/rgscott/Software/ghc2/inplace/lib/bin/ghc-stage2
 -B"/u/rgscott/Software/ghc2/inplace/lib" --interactive
 [Thread debugging using libthread_db enabled]
 Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
 [New Thread 0x7ffff635e700 (LWP 13161)]
 [New Thread 0x7ffff5b5d700 (LWP 13162)]
 [New Thread 0x7ffff535c700 (LWP 13163)]
 [New Thread 0x7ffff4b5b700 (LWP 13164)]
 GHCi, version 8.3.20170726: http://www.haskell.org/ghc/  :? for help

 Program received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 0x7ffff4b5b700 (LWP 13164)]
 0x000000000514ecb3 in interpretBCO (cap=0x64b9fc0 <MainCapability>)
     at rts/Interpreter.c:743
 743                 if (get_itbl(UNTAG_CLOSURE(pap->fun))->type != BCO) {
 }}}

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


More information about the ghc-tickets mailing list