[GHC] #14272: GHC goes out of memory while compiling simple program with optimizations

GHC ghc-devs at haskell.org
Mon Sep 25 13:39:27 UTC 2017


#14272: GHC goes out of memory while compiling simple program with optimizations
-------------------------------------+-------------------------------------
        Reporter:  39aldo39          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.4.1
       Component:  Compiler          |              Version:  7.10.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by bgamari):

 * cc: hvr (added)


Comment:

 Hmm, so this is quite a hint,
 {{{
 Thread 1 "ghc" hit Breakpoint 1, OutOfHeapHook (request_size=0,
 heap_size=0) at rts/hooks/OutOfHeap.c:17
 17      rts/hooks/OutOfHeap.c: No such file or directory.
 (gdb) bt
 #0  OutOfHeapHook (request_size=0, heap_size=0) at
 rts/hooks/OutOfHeap.c:17
 #1  0x00007f59ecb71d37 in allocate (cap=0x7f59ecba2080 <MainCapability>,
 n=144115188075855874) at rts/sm/Storage.c:848
 #2  0x00007f59ecb7c65e in stg_newByteArrayzh () from
 /opt/exp/ghc/roots/8.2.1-dwarf/lib/ghc-8.2.1/bin/../rts/libHSrts_thr-
 ghc8.2.1.so
 #3  0x0000000000000000 in ?? ()
 (gdb) x/24a $rbp
 0x42001edf88:   0x7f59ed060148
 <integerzmgmp_GHCziIntegerziType_bitBigNat_info+80>      0x1ffffffffffffff
 0x42001edf98:   0x3f    0x7f59ed0602a0
 <integerzmgmp_GHCziIntegerziType_bitInteger_info+128>
 0x42001edfa8:   0x7f59ed05c240
 <integerzmgmp_GHCziIntegerziType_integerToInt_info+64>   0x7f59f165cf60
 0x42001edfb8:   0x7f59ecb78f48 <stg_upd_frame_info>     0x42008ebc60
 0x42001edfc8:   0x7f59ed068fa0
 <integerzmgmp_GHCziIntegerziType_compareInteger_info+128>
 0x7f59f2eaaeb1
 0x42001edfd8:   0x7f59f165e9f0  0x42008ec930
 0x42001edfe8:   0x42008ebc89    0x42008ec8ca
 0x42001edff8:   0x7f59f2eaaed9  0x42008ec788
 0x42001ee008:   0x7f59f165e290  0x7f59ed043c29
 0x42001ee018:   0x42008ec788    0x42008ec7c8
 0x42001ee028:   0x42008ec810    0x7f59f1a87b60
 <ghc_Rules_lookupRule_info+600>
 0x42001ee038:   0x42008ea4a8    0x4200e4ed5a
 }}}

 It looks like this may be an underflow in `integer-gmp`.

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


More information about the ghc-tickets mailing list