On Fri, 4 Apr 2014 16:19:48 +0000
Simon Peyton Jones <[email protected]> wrote:

Filed the reproducer as a new ticket:
    https://ghc.haskell.org/trac/ghc/ticket/8980

[ Looks like highlighting-kate asks to be added to
  compiler performance benchmarks (are there such ones?)
  It tends to stress ghc all the time:
    http://hackage.haskell.org/trac/ghc/ticket/3664
] 

Thanks!

> Sergei
> 
> SpecConstr is too aggressive: it sometimes blows up the program badly and we 
> have no good solution.  See Trac #7898, #7068, #7944, #5550, #8836.
> 
> I notice that the latter three are actually fixed in 7.8, so worth trying 
> that.  If it still fails, do add instructions to reproduce to one of the 
> above open tickets, or make a new one.
> 
> 
> Amos Robinson (cc'd) was working on this problem, but I have not heard 
> anything recently.
> 
> It surely ought to be possible to "throttle" it a bit so that it stops before 
> generating too vast a program.
> 
> Meanwhile you can use -fno-spec-constr to simply switch it off for offending 
> modules.  That should get you going.  

> Simon
> 
> | -----Original Message-----
> | From: ghc-devs [mailto:[email protected]] On Behalf Of
> | Sergei Trofimovich
> | Sent: 03 April 2014 21:20
> | To: [email protected]
> | Subject: Re: ghc-7.8-rc2 in -O2 mode eats all stack and RAM on pandoc-
> | citeproc / highlighting-kate
> | 
> | On Sat, 22 Mar 2014 22:21:42 +0300
> | Sergei Trofimovich <[email protected]> wrote:
> | 
> | > Hello!
> | >
> | > I have noticed the problem in ghc-7.6.3 first when tried to build all
> | > haskell userland with -O2 opt level.
> | >
> | > It led to amazing bugs!
> | >
> | > Here is one of those (highlighting-kate hackage package):
> | > > [281 of 452] Compiling Text.Highlighting.Kate.Syntax.Asp (
> | > > highlighting-kate-0.5.6.1/Text/Highlighting/Kate/Syntax/Asp.hs,
> | > > highlighting-kate-0.5.6.1/Text/Highlighting/Kate/Syntax/Asp.o )
> | > > stack overflow: use +RTS -K<size> to increase it
> | >
> | > How to reproduce it:
> | > 1. Download a bundled file (6.6MB):
> | >
> | > http://code.haskell.org/~slyfox/selfcontained-eater-ghc-7.8-
> | rc2.tar.gz
> | > 2. Unpack and run there:
> | >   ./mk.sh
> | >
> | > The script is designed to plug any built ghc version w/o external
> | depends.
> | >
> | > Command will fail as:
> | >     $ ./mk.sh
> | >     ...
> | >     [281 of 452] Compiling Text.Highlighting.Kate.Syntax.Asp (
> | highlighting-kate-0.5.6.1/Text/Highlighting/Kate/Syntax/Asp.hs,
> | highlighting-kate-0.5.6.1/Text/Highlighting/Kate/Syntax/Asp.o )
> | >     stack overflow: use +RTS -K<size> to increase it
> | >
> | > On ghc-7.6.3 it will progress a bit more: down to 452 file and will
> | > crash there similar way.
> | >
> | > I've 'cabal unpack'-ed all sources and configured/de-.hsc-ed them
> | > manually/added needed -DWhatever / added {-# LANGUAGE CPP #-} around.
> | > Nothing else.
> | >
> | > It's very hard to shrink such large thing manually down to 2-3 files.
> | > Would be cool if ghc (and cabal) would be able to spit something
> | > self-sufficient (like 'gcc -i' does) for devs to reproduce.
> | >
> | > Adding '-v' shows such log:
> | >     ...
> | >     *** Simplifier:
> | >     Result size of Simplifier iteration=1
> | >       = {terms: 21,973, types: 21,838, coercions: 1,842}
> | >     Result size of Simplifier iteration=2
> | >       = {terms: 21,952, types: 21,819, coercions: 1,842}
> | >     Result size of Simplifier
> | >       = {terms: 21,950, types: 21,817, coercions: 1,842}
> | >     *** SpecConstr:
> | >     Result size of SpecConstr***<CRASH>
> | 
> | Nobody interested? Is it too scary?
> | 
> | Such inliner blowups are hard to shrink down from real examples down to
> | toy ones. I could try to but I need a bit of guidance.
> | 
> | Maybe you need only an intermediate core step right before an OOM,
> | whatever?

-- 

  Sergei

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ghc-devs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-devs

Reply via email to