From: TardusDude
Subject: STORAGE-CONDITION error in Allegro lisp
Date: 
Message-ID: <1147482525.623525.191290@y43g2000cwc.googlegroups.com>
Hi,

I'm running Allegro 6.2 on RHEL4.0 and I'm getting the following
error message:

---------------------------------------------------------------------
Error: An explicit gc call caused a need for 42729472 more bytes of
heap.  The operating system will not make the space available because
of a lack of swap space or some other operating system imposed limit
or memory mapping collision.
  [condition type: STORAGE-CONDITION]

Restart actions (select using :continue):
 0: Abort entirely from this process.
-------------------------------------------------------------------

While it's shocking to me that it needs 42.7MB more RAM (i've gotten
the same error when trying to allocate 56k) , I have plenty or free
memory (hundreds of MBs) and my roughly 1GB of swap hasn't even been
touched yet.


here's what free says  (numbers are in megabytes):

-------------------------------------------------------------------
free -m
                  total    used    free   shared  buffers cached
Mem      :         2024    1465     559      0       39      321
-/+ buffers/cache: 1104     920
Swap:               964       0     964
--------------------------------------------------------------------


and it doesn't seem that my ulimits preventing alisp to
allocate the memory it needs:

---------------------------------------------------------------------
ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
pending signals                 (-i) 1024
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
stack size              (kbytes, -s) unlimited
cpu time               (seconds, -t) unlimited
max user processes              (-u) 32744
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
---------------------------------------------------------------------

Here's my gc params (default):

---------------------------------------------------------------------
(sys:gsgc-parameters)
:generation-spread 4     :current-generation 5    :tenure-limit 1

:free-bytes-new-other 131072       :free-percent-new 25
:free-bytes-new-pages 131072       :expansion-free-percent-new 35
                                   :expansion-free-percent-old 35
:quantum 32                        :open-old-area-fence 0

(switch :auto-step) T
(switch :hook-after-gc) T           (switch :clip-new) NIL
(switch :gc-old-before-expand) NIL  (switch :next-gc-is-global) NIL
(switch :print) NIL                 (switch :stats) T
(switch :verbose) NIL               (switch :dump-on-error) NIL

---------------------------------------------------------------------


here's what (room) has to say:

---------------------------------------------------------------------
CL-USER(13): (room t)
area area  address(bytes)         cons         other bytes
  #  type                      bytes each
                              (free:used)     free:used)
     Top #x9ee22000
     New #x980dc000(114581504) 703:12544  32371120:81996736
     New #x91396000(114581504)  -----          -----
     Gap #x91392000(16384)      -----          -----
  53 Old #x891c6000(136101888)   0:0      51193608:84841648
  52 Old #x883c6000(14680064)    0:0             0:14672720
  51 Old #x87806000(12320768)    0:0             0:12314576
  50 Old #x86806000(16777216)    0:0             0:16768848
  49 Old #x85ec6000(9699328)     0:0             0:9694416
  48 Old #x84c46000(19398656)    0:0             0:19389008
  47 Old #x84386000(9175040)     0:0             0:9170384
  46 Old #x80e06000(56098816)    0:0      25977520:30093728
  45 Old #x80986000(4718592)     0:0             0:4716112
  44 Old #x80946000(262144)      0:0             0:261840
  43 Old #x80506000(4456448)     0:0             0:4454096
  42 Old #x7f586000(16252928)    0:0             0:16244816
  41 Old #x7f346000(2359296)     0:0             0:2357968
  40 Old #x7ec86000(7077888)     0:0             0:7074256
  39 Old #x7e1c6000(11272192)    0:0             0:11266512
  38 Old #x7e0c6000(1048576)     0:0             0:1047888
  37 Old #x7da46000(6815744)     0:0             0:6812240
  36 Old #x7ca46000(16777216)    0:0             0:16768848
  35 Old #x7c8c6000(1572864)     0:0             0:1571920
  34 Old #x7c186000(7602176)     0:0             0:7598288
  33 Old #x7b546000(12845056)    0:0             0:12838608
  32 Old #x79946000(29360128)    0:0             0:29345616
  31 Old #x79646000(3145728)     0:0             0:3144016
  30 Old #x79406000(2359296)     0:0             0:2357968
  29 Old #x78d06000(7340032)     0:0             0:7336272
  28 Old #x782c6000(10747904)    0:0             0:10742480
  27 Old #x78146000(1572864)     0:0             0:1571920
  26 Old #x77ac6000(6815744)     0:0             0:6812240
  25 Old #x76b06000(16515072)    0:0             0:16506832
  24 Old #x769c6000(1310720)     0:0             0:1309904
  23 Old #x75f86000(10747904)    0:0             0:10742480
  22 Old #x75e46000(1310720)     0:0             0:1309904
     Gap #x75e44000(8192)       -----           -----
  21 Old #x71df8000(67420160)  428:110643        0:66494136
  20 Old #x71db8000(262144)      0:11209         0:171728
  19 Old #x71d78000(262144)      0:0             0:261840
  18 Old #x71c78000(1048576)     0:43817         0:695632
  17 Old #x71c38000(262144)      0:28532         0:32464
  16 Old #x71bf8000(262144)      0:31589         0:7888
  15 Old #x71bb8000(262144)      0:20380         0:98000
  14 Old #x71b78000(262144)      0:9171          0:188112
  13 Old #x71b38000(262144)      0:5095          0:220880
  12 Old #x71af8000(262144)      0:4076          0:229072
  11 Old #x719b8000(1310720)     0:16304         0:1178832
  10 Old #x71978000(262144)      0:11209         0:171728
   9 Old #x718f8000(524288)      0:19361         0:368208
   8 Old #x71878000(524288)      0:15285         0:400976
   7 Old #x71838000(262144)      0:13247         0:155344
   6 Old #x717f8000(262144)      0:2038          0:245456
   5 Old #x71778000(524288)      0:9171          0:450128
   4 Old #x71738000(262144)      0:12228         0:163536
   3 Old #x716f8000(262144)      0:9171          0:188112
   2 Old #x716b8000(262144)      0:13247         0:155344
   1 Old #x71638000(524288)      0:32608         0:261712
   0 Old #x71000d78(6517384)     0:167116        0:5170544
     Tot (Old Areas)           428:585497 77171128:458448024
Root pages: 51
 Lisp heap: #x71000000  pos: #x9ee22000  resrve: 769794048
 C heap:    #xa0000000  pos: #xa002d000  resrve: 1024000

code   type                           items     bytes
101: (SIMPLE-ARRAY CHARACTER)         5832981   257867656 47.6%
  7: SYMBOL                           5791794   139003056 25.7%
 96: (SIMPLE-ARRAY T)                 5815570   136144384 25.1%
  1: CONS                              598934     4791472  0.9%
108: (SIMPLE-ARRAY CODE)                 5471     1844232  0.3%
  8: FUNCTION                           14195      891424  0.2%
 15: STRUCTURE                          24997      620440  0.1%
 98: (SIMPLE-ARRAY (UNSIGNED-BYTE 8))      25      113456  0.0%
 97: (SIMPLE-ARRAY BIT)                    35      103624  0.0%
 18: BIGNUM                             12657      102472  0.0%
 12: STANDARD-INSTANCE                   5552       88832  0.0%
  9: CLOSURE                             3549       60640  0.0%
100: (SIMPLE-ARRAY (UNSIGNED-BYTE 32))      8        9384  0.0%
 10: HASH-TABLE                           142        4544  0.0%
 17: DOUBLE-FLOAT                         135        2160  0.0%
 16: SINGLE-FLOAT                         222        1776  0.0%
111: (SIMPLE-ARRAY FOREIGN)                55        1312  0.0%
 64: (ARRAY T)                             31         744  0.0%
107: (SIMPLE-ARRAY (SIGNED-BYTE 32))        4         448  0.0%
 13: SYSVECTOR                             13         208  0.0%
 20: COMPLEX                               11         176  0.0%
 11: READTABLE                              5          80  0.0%
 69: (ARRAY CHARACTER)                      1          24  0.0%
 19: RATIO                                  1          16  0.0%

 total bytes = 541652560
 aclmalloc arena:
   max size  free bytes  used bytes     total
       48       3024         48          3072
      496       3968          0          3968
     1008       4032          0          4032
     2032       4064          0          4064
     4080       4080      28560         32640
     5104      15312       5104         20416
     9200      46000      27600         73600
    20464          0      40928         40928
---------------------------------------------------------------------

Anyway, I admit the my program is obviously a total memory hog, and
needs to be fixed, but can anyone tell me why lisp can't allocate
the amt of memory it wants when there is plenty to be had and the
relevant ulimits are set to 'unlimited'?


-Scott

From: Novus
Subject: Re: STORAGE-CONDITION error in Allegro lisp
Date: 
Message-ID: <2006051221150575249-novus@ngoqdeorg>
On 2006-05-12 21:08:45 -0400, "TardusDude" <··········@hotmail.com> said:

> I'm running Allegro 6.2 on RHEL4.0 and I'm getting the following
> error message:

Does Franz, Inc. not have a mailing list or phone number for tech support?
I thought that's why they charged so much.

Novus
From: Markus Grueneis
Subject: Re: STORAGE-CONDITION error in Allegro lisp
Date: 
Message-ID: <4cloasF16fkg4U1@individual.net>
TardusDude wrote:

> Hi,
> 
> I'm running Allegro 6.2 on RHEL4.0 and I'm getting the following
> error message:
> 
> ---------------------------------------------------------------------
> Error: An explicit gc call caused a need for 42729472 more bytes of
> heap.  The operating system will not make the space available because
> of a lack of swap space or some other operating system imposed limit
> or memory mapping collision.
>   [condition type: STORAGE-CONDITION]
> 
> Restart actions (select using :continue):
>  0: Abort entirely from this process.
> -------------------------------------------------------------------
> 

Maybe I'm completly off, but as far as I know Allegro needs continous
memory, and that could be a problem.  Just a guess...

> While it's shocking to me that it needs 42.7MB more RAM (i've gotten
> the same error when trying to allocate 56k) , I have plenty or free
> memory (hundreds of MBs) and my roughly 1GB of swap hasn't even been
> touched yet.
> 
> 
> here's what free says  (numbers are in megabytes):
> 
> [...]

-- 
Markus Grueneis
From: TardusDude
Subject: Re: STORAGE-CONDITION error in Allegro lisp
Date: 
Message-ID: <1149045277.779002.18890@u72g2000cwu.googlegroups.com>
Yes it turned out that the lisp heap didn't have enough space to grow
because it would bump into the c heap.  There are some cmd line options
to tune things like this, and new images with different options can be
made, but in the end, it turned out that I just needed to  (setf
*gensym-counter* 0) after each simulation.  Before I could only run
~250 simulations before I got the error, but nnow I can run a 1000
sucessfully, and since the memory usage doesn't seem to be growing, I
think I can now run many, many more.


Markus Grueneis wrote:
> TardusDude wrote:
>
> > Hi,
> >
> > I'm running Allegro 6.2 on RHEL4.0 and I'm getting the following
> > error message:
> >
> > ---------------------------------------------------------------------
> > Error: An explicit gc call caused a need for 42729472 more bytes of
> > heap.  The operating system will not make the space available because
> > of a lack of swap space or some other operating system imposed limit
> > or memory mapping collision.
> >   [condition type: STORAGE-CONDITION]
> >
> > Restart actions (select using :continue):
> >  0: Abort entirely from this process.
> > -------------------------------------------------------------------
> >
>
> Maybe I'm completly off, but as far as I know Allegro needs continous
> memory, and that could be a problem.  Just a guess...
>
> > While it's shocking to me that it needs 42.7MB more RAM (i've gotten
> > the same error when trying to allocate 56k) , I have plenty or free
> > memory (hundreds of MBs) and my roughly 1GB of swap hasn't even been
> > touched yet.
> >
> >
> > here's what free says  (numbers are in megabytes):
> > 
> > [...]
> 
> -- 
> Markus Grueneis