[GHC] #9579: Runtime suggests using +RTS when that's not possible

GHC ghc-devs at haskell.org
Sat Mar 28 05:55:11 UTC 2015


#9579: Runtime suggests using +RTS when that's not possible
-------------------------------------+-------------------------------------
        Reporter:  gintas            |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  low               |               Milestone:  7.12.1
       Component:  Runtime System    |                 Version:  7.9
      Resolution:                    |                Keywords:  newcomer
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by javran):

 I'm newcomer and thinking about working on this ticket.
 I investigated a little bit, there are currently 3 places where a RTS
 suggestion appears:

 * in `StackOverflowHook` of `rts/hooks/StackOverflow.c`:

 {{{
 fprintf(stderr, "Stack space overflow: current size %" FMT_Word "
 bytes.\nUse `+RTS -Ksize -RTS' to increase it.\n", stack_size);
 }}}

 * in `OutOfHeapHook` of `rts/hooks/OutOfHeap.c`

 {{{
 if (heap_size > 0) {
     errorBelch("Heap exhausted;\nCurrent maximum heap size is %" FMT_Word
 " bytes (%" FMT_Word " MB);\nuse `+RTS -M<size>' to increase it.",
         heap_size, heap_size / (1024*1024));
 } else {
     errorBelch("out of memory");
 }
 }}}

 * in `nextEra` of `rts/ProfHeap.c`:

 {{{
 if (era == max_era) {
     errorBelch("maximum number of censuses reached; use +RTS -i to
 reduce");
     stg_exit(EXIT_FAILURE);
 }
 }}}

 And the error message saying `"Most RTS options are disabled."` comes from
 `rts/RtsFlags.c`.
 It seems that we need to know the value of `RtsOptsEnabledEnum enabled` to
 tell whether RTS options are available, but this value is only passed
 around `setupRtsFlags` and `procRtsOpts` during command line parsing.
 Is there some way to check the availability of RTS options for 3 places I
 mentioned above?

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


More information about the ghc-tickets mailing list