Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: =?iso-8859-1?q?G=E1bor_Melis?= <mega <at> retes.hu>
Subject: Re: GENCGC-PAGE-SIZE maxed out?
Newsgroups: gmane.lisp.steel-bank.general
Date: Thursday 20th November 2008 08:12:34 UTC (over 8 years ago)
On Jueves 20 Noviembre 2008, Benjamin Lambert wrote:
> Dear SBCL people,
>
> I use SBCL frequently at Carnegie Mellon.  We use it mostly for our
> knowledge representation system, Scone, developed by Scott Fahlman,
> an old CMUCL Lisper.
>
> I recently came across a new problem, and I'm not seeing anything in
> the mailing list history.
>
> We're running on an x86-64 Linux machine with 8GB of RAM.  One person
> in our group was getting error #1 below when he used more than around
> 1GB of memory.  So, I tried recompiling SBCL (1.0.22) a few times
> with greater values for GENCGC-PAGE-SIZE.  Each time I increased it,
> he'd get error #1 eventually, each time after more memory had been
> used. After bumping this up to 32768, he was getting error #1 at
> around 6GB of RAM used.
>
> I tried increasing it once more, first to 64k, then back down to
> 49152.  When I compile with GENCGC-PAGE-SIZE set to either,
> compilation terminates with error #2.  (The main part of this error
> message seems to be this: GC invariant lost, file "gencgc.c", line
> 4503).
>
> Is it possible to increase GENCGC-PAGE-SIZE even more?  If so, is
> that desirable?  What exactly is  GENCGC-PAGE-SIZE?
>
> Ben Lambert
>
>
> Error #1:
>
> fatal error encountered in SBCL pid 18893:
> An mprotect call failed with ENOMEM. This probably means that the
> maximum amount
> of separate memory mappings was exceeded. To fix the problem, either
> increase
> the maximum with e.g. 'echo 262144 > /proc/sys/vm/max_map_count' or
> recompile
> SBCL with a larger value for GENCGC-PAGE-SIZE in 'src/target/
> parms.lisp'.
> Welcome to LDB, a low-level debugger for the Lisp runtime
> environment.
>
> Error #2:
>
> beginning GENESIS, creating core "output/cold-sbcl.core"
> obj/from-xc/src/code/show.lisp-obj
> ....
> obj/from-xc/src/code/late-defbangmethod.lisp-obj
> obj/from-xc/src/pcl/walk.lisp-obj
> [building initial core file in "output/cold-sbcl.core":
> writing 8192 bytes [2 pages] from #
> writing 4096 bytes [1 page] from #
> writing 51998720 bytes [12695 pages] from #
> /(DESCRIPTOR-BITS INITIAL-FUN)=#X1002993D19
> done]
> * //testing for consistency of first and second GENESIS passes
> //header files match between first and second GENESIS -- good
>
> real	13m0.960s
> user	4m32.852s
> sys	0m9.967s
> //entering make-target-2.sh
> //doing warm init - compilation phase
> fatal error encountered in SBCL pid 16153:
> GC invariant lost, file "gencgc.c", line 4503

A quick look into gencgc.c reveals that the heap size should be 
divisible by PAGE_BYTES (that, with gencgc, is equal to 
GENCGC_PAGE_BYTES).

    /* Compute the number of pages needed for the dynamic space.
     * Dynamic space size should be aligned on page size. */
    page_table_pages = dynamic_space_size/PAGE_BYTES;
    gc_assert(dynamic_space_size == npage_bytes(page_table_pages));

> --
> Benjamin Lambert
> Graduate Student of Computer Science
> Carnegie Mellon University
> www.cs.cmu.edu/~belamber

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
 
CD: 4ms