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

GHC ghc-devs at haskell.org
Mon Sep 25 13:14:05 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 System    |              Version:  8.0.2
      Resolution:                    |             Keywords:  gdb,
                                     |  debugging
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #9706             |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by bgamari):

 So Phab:D3929 doesn't currently address the issue. I've found that
 `strace` produces some suspicious looking output when run on a program
 compiled with that patch,
 {{{
 $ cat >hi.hs <<EOF
 main = putStrLn "hello"
 EOF
 $ inplace/bin/ghc-stage2 hi.hs
 $ strace ./hi
 ...
 sysinfo({uptime=1041754, loads=[86240, 81760, 80384],
 totalram=33598783488, freeram=871940096, sharedram=3290808320,
 bufferram=1270706176, totalswap=0, freeswap=0, procs=703, totalhigh=0,
 freehigh=0, mem_unit=1}) = 0
 mmap(0x4200000000, 1099512676352, PROT_NONE,
 MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x4200000000
 madvise(0x4200000000, 1099512676352, 0x14 /* MADV_??? */) = -1 EINVAL
 (Invalid argument)
 mmap(0x4200000000, 1048576, PROT_READ|PROT_WRITE,
 MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4200000000
 madvise(0x4200000000, 1048576, 0x13 /* MADV_??? */) = -1 EINVAL (Invalid
 argument)
 mmap(0x4200100000, 1048576, PROT_READ|PROT_WRITE,
 MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4200100000
 madvise(0x4200100000, 1048576, 0x13 /* MADV_??? */) = -1 EINVAL (Invalid
 argument)
 timer_create(CLOCK_MONOTONIC, {sigev_signo=SIGVTALRM,
 sigev_notify=SIGEV_SIGNAL}, [0]) = 0
 ...
 }}}

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


More information about the ghc-tickets mailing list