[GHC] #3972: ghc 6.12.1 and 6.13.20090922 consume a lot more memory than 6.10.4 when compiling language-python package

GHC cvs-ghc at haskell.org
Sat Apr 10 05:11:54 EDT 2010


#3972: ghc 6.12.1 and 6.13.20090922 consume a lot more memory than 6.10.4 when
compiling language-python package
-------------------------------+--------------------------------------------
    Reporter:  bjpop           |       Owner:                                                                        
        Type:  bug             |      Status:  new                                                                   
    Priority:  normal          |   Component:  Compiler                                                              
     Version:  6.12.1          |    Keywords:  memory usage                                                          
          Os:  Linux           |    Testcase:  http://projects.haskell.org/language-python/language-python-0.2.tar.gz
Architecture:  x86_64 (amd64)  |     Failure:  Compile-time performance bug                                          
-------------------------------+--------------------------------------------
 When compiling the language-python package ghc 6.12.1 and 6.13.20090922
 consume a lot more memory than 6.10.4 does.

 OS: x86_64 GNU/Linux, Ubuntu 9.10 karmic koala
 gcc: 4.4.1

 All versions of GHC taken from the generic binary downloads provided by
 the GHC web page.

 language-python: 0.2 (http://projects.haskell.org/language-python
 /language-python-0.2.tar.gz)

 cabal-install version 0.8.0
 using version 1.8.0.2 of the Cabal library

 Steps taken to witness bug:
   1. wget http://projects.haskell.org/language-python/language-
 python-0.2.tar.gz
   2. tar xvf language-python-0.2.tar.gz
   3. cd language-python-0.2/
   4. cabal configure
   5. cabal build

 The build processes 10 files successfully before hitting
 Language.Python.Common.ParserUtils. At that point memory consumption grows
 to at least 1.5 GB resident, and I have to kill the process to prevent my
 machine from thrashing.

 Curiously ParserUtils is only a relatively small source file, 11975 bytes,
 301 lines.

 Turing off optimisation on the compilation of ParserUtils allows it to be
 compiled very quickly without memory use explosion.  But then the build
 process gets to Language/Python/Version3/Parser/Parser.hs, and ghc
 consumes lots of memory again (well past 1.5 GB).

 This memory consumption behaviour has been independently verified by one
 other user of language-python on ghc 6.12.1 on a different machine to
 mine.

 However, ghc 6.10.4 can successfully build the entire language-python
 package in just under 1 GB of ram.

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


More information about the Glasgow-haskell-bugs mailing list