[GHC] #10877: x86_64: dll-split: out of memory (requested 1099512676352 bytes)

GHC ghc-devs at haskell.org
Sun Nov 1 09:46:46 UTC 2015


#10877: x86_64: dll-split: out of memory (requested 1099512676352 bytes)
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:
            Type:  bug               |               Status:  patch
        Priority:  highest           |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.11
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:  x86_64
 Type of failure:  Building GHC      |  (amd64)
  failed                             |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #10682            |  Differential Rev(s):  Phab:D1405
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"4ad2a8f9a503a5ee060eb8e0d5ae71b98d605cfa/ghc" 4ad2a8f/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="4ad2a8f9a503a5ee060eb8e0d5ae71b98d605cfa"
 rts/posix: Reduce heap allocation amount on mmap failure

 Since the two-step allocator the RTS asks the kernel for a large upfront
 mmap'd region of memory (on the order of terabytes). While we have no
 expectation that this entire region will be backed by physical memory,
 this scheme nevertheless fails on some systems with resource limits.
 Here we use a back-off scheme to reduce our allocation request until we
 find a size agreeable to the kernel. Fixes #10877.

 This also fixes a latent bug wherein the heap reservation retry logic
 would fail to free the previously reserved address space, which would
 likely result in a heap allocation failure.

 Test Plan:
 set address space limit with `ulimit -v 67108864` and try running
 a compiled program

 Reviewers: simonmar, austin

 Reviewed By: simonmar

 Subscribers: thomie, RyanGlScott

 Differential Revision: https://phabricator.haskell.org/D1405

 GHC Trac Issues: #10877
 }}}

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


More information about the ghc-tickets mailing list