[GHC] #14192: Change to 1TB VIRT allocation makes it impossible to core-dump Haskell programs

GHC ghc-devs at haskell.org
Thu Sep 7 09:29:49 UTC 2017


#14192: Change to 1TB VIRT allocation makes it impossible to core-dump Haskell
programs
-------------------------------------+-------------------------------------
           Reporter:  nh2            |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Runtime        |           Version:  8.0.2
  System                             |
           Keywords:  gdb,           |  Operating System:  Unknown/Multiple
  debugging                          |
       Architecture:                 |   Type of failure:  Runtime
  Unknown/Multiple                   |  performance bug
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:  #9706
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 GHC 8.0.2 on Linux changed the memory allocator to always allocate 1TB
 virtual memory on startup (#9706).

 I now have a production Haskell program running in a loop and would like
 to debug where it is stuck, on another machine, thus attaching with `gdb
 -p` and running `generate-core-file`.

 But core dumping takes forever, I Ctrl-C'd it when it reached 140 GB in
 size (my machine only has 64 GB RAM btw.); after the Ctrl-C the size of
 the core file on the file system was reported as `1.1T` (probably it's a
 sparse file now).

 Is there a workaround for this?

 For example, if I could dump only the resident or actually allocated
 pages, that would probably help.

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


More information about the ghc-tickets mailing list