gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: GCL on Zaurus SL-6000 under Debian


From: Camm Maguire
Subject: [Gcl-devel] Re: GCL on Zaurus SL-6000 under Debian
Date: 11 Oct 2004 12:34:24 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings, and thank you so much for your feedback here!

"Bill Page" <address@hidden> writes:

> Camm,
> 
> See the GOOD NEWS below.
> 
> On Tuesday, October 05, 2004 5:12 PM you wrote:
> > 
> > Greetings!  Great to see your looking into this!
> > 
> > This has got to be a libc version dependency issue.  The
> > author of http://pocketworkstation.org/ appears to be
> > putting together his own Debian snapshots.  But if you
> > apt-get upgrade to the standard Debian distribution, all
> > that should be taken care of.
> 
> I did the 'apt-get upgrade', unfortunately I still get
> immediate seg faults from both Axiom and GCL.
> 

I think you've pinned it here.  The virtual memory size of the gcl
default build is 81Mb, and you only have 62.  

If you want to double check you can

gdb /usr/lib/gcl-2.6.5/unixport/saved_gcl
r
bt

and see where the fault is.

The default hole size is 1/10 MAXPAGES, which with the default maxpage
setting is 52Mb.  It is not actually in use until allocated, but the
space must be available nonetheless.  Not sure how tiny axiom itself
can be made, but you can shrink the hole size, giving you finer
grained increments to the growing heap at the expense of gc time, if
things really get tight.

Wondering if you can just setup a swapfile over nfs to see if the
default binary will work for you.

> > Perhaps you could send your /etc/apt/sources.list, and
> > 'dpkg -l |grep libc'.
> 
> # cat /etc/apt/sources.list
> deb http://debian.mirror.cygnal.ca/debian testing main
> #deb http://http.us.debian.org/debian testing main
> deb http://nonUS.debian.org/debian-non-US testing/non-US main
> deb-src http://debian.mirror.cygnal.ca/debian testing main
> #deb-src http://http.us.debian.org/debian testing main contrib non-free
> 
> # dpkg -l |grep libc
> ii  libc6          2.3.2.ds1-16   GNU C Library: Shared libraries ...
> ii  libc6-dev      2.3.2.ds1-16   GNU C Library: Development Libraries
> ii  libcap1        1.10-14        support for getting/setting POSIX
> ii  libcomerr2     1.35-6         The Common Error Description library
> ii  libcompfaceg1  1989.11.11-24  Compress/decompress images
> ii  libcurl2       7.11.2-8       Multi-protocol file transfer library
> ii  libdb1-compat  2.1.3-7        The Berkeley database routines
> ii  liblocale-gett 1.01-17        Using libc functions for inter...
> 
> ----------
> 
> As per Bob McElrath's message,
> 
> > alpha architecture:
> >  ii  libc6.1   2.3.2.ds1-11    GNU C Library: Shared libraries
> > axiom segfaults
> >  ii  libc6.1   2.3.2.ds1-16    GNU C Library: Shared libraries
> > axiom runs fine
> > 
> > i386 architecture:
> >  ii  libc6     2.3.2.ds1-12    GNU C Library: Shared libraries
> > axiom runs fine
> > 
> > Thus, it would appear that the debian package needs to add a
> > dependency on libc6 2.3.2.ds1-12 or greater.  I do not know
> > why on alpha it is "libc6.1" and on intel it is "libc6".  
> 
> If what I am seeing is the same seg fault, then it seems
> very sensitive to the libc6 version and libc6 2.3.2.ds1-16
> may also not work for arm on Zaurus with the debian arm
> build of GCL.

As you have not cleared the fault with an upgrade, and as you are now
running the same libc as I did on the verification run I posted, this
is unrelated to Bob's earlier, presumably alpha specific transient
libc instability, I think.

> 
> ------------
> 
> But the GOOD NEWS is that I did manange to build GCL from the
> 2.6.5 tarball from the Axiom CVS! First I did
> 
> # apt-get build-dep gcl
> # tar xzvf axiom/zips/gcl-2.6.5.tgz
> # cd gcl-2.6.5
> # ./configure --enable-vssize=65536*1 --disable-statsysbfd \
>   --enable-locbfd --enable-maxpage=32*1024
> 
> Note use of locbfd and smaller memory parameters then currently
> specified in the Axiom build:
> 
> # ./configure --enable-vssize=65536*4 --enable-statsysbfd \
>   --enable-maxpage=128*1024
> 
> which gave "Can't allocate" message when first trying to run
> raw_pre_gcl. I got the same result with the default ./configure.
> But using --enable-locbfd did the trick and it is now working
> fine. I am not sure how much bigger I can practically make the
> memory options, but I think parameters might be too large.
> Can you tell how large they can be set based on the output
> of 'free' below?
> 
> So, anyway I am now running an Axiom build with 
> 
> # ./configure --enable-vssize=65536*2 --disable-statsysbfd \
>   --enable-locbfd --enable-maxpage=64*1024
> 
> I will let you know how (if) it finishes some time tomorrow.
> 

You probably won't succeed, but might just luck out.  The AXIOMsys
virtual memory size is actually a little less than the default gcl
vmsize, as it shaves off 4k pages from the relocatable area to more
than compensate for the expanded number of pages for cells:

=============================================================================
(sid)address@hidden:/fix/g/camm/maxima$ /usr/bin/gcl
GCL (GNU Common Lisp)  2.6.5 CLtL1    Sep  3 2004 17:47:27
Source License: LGPL(gcl,gmp), GPL(unexec,bfd)
Binary License:  GPL due to GPL'ed components: (READLINE BFD UNEXEC)
Modifications of this banner must retain notice of a compatible license
Dedicated to the memory of W. Schelter

Use (help) to get some basic information on how to use GCL.

>(room)

   211/211    40.1%         CONS RATIO LONG-FLOAT COMPLEX STRUCTURE
     2/28     25.8%         FIXNUM SHORT-FLOAT CHARACTER RANDOM-STATE READTABLE 
NIL
    47/49     72.4%         SYMBOL STREAM
     1/2      12.8%         PACKAGE
     1/38     50.0%         ARRAY HASH-TABLE VECTOR BIT-VECTOR PATHNAME 
CCLOSURE FAT-STRING
    16/32     85.2%         STRING
     3/27     97.5%         CFUN BIGNUM
     6/115    87.8%         SFUN GFUN CFDATA SPICE NIL

   316/512                  contiguous (76 blocks)
       13107                hole
       5242    0.0%         relocatable

       287 pages for cells
     18952 total pages
    101834 pages available
     10286 pages in heap but not gc'd + pages needed for gc marking
    131072 maximum pages

>(by)
(sid)address@hidden:/fix/g/camm/maxima$ axiom
GCL (GNU Common Lisp)  2.6.5 CLtL1    Aug 17 2004 19:17:02
Source License: LGPL(gcl,gmp), GPL(unexec,bfd)
Binary License:  GPL due to GPL'ed components: (READLINE BFD UNEXEC)
Modifications of this banner must retain notice of a compatible license
Dedicated to the memory of W. Schelter

Use (help) to get some basic information on how to use GCL.
                        AXIOM Computer Algebra System 
               Version of Tuesday August 31, 2004 at 22:58:41 
-----------------------------------------------------------------------------
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave AXIOM and return to shell.
-----------------------------------------------------------------------------
 
   Re-reading compress.daase   Re-reading interp.daase
   Re-reading operation.daase
   Re-reading category.daase
   Re-reading browse.daase
(1) -> )lisp (room)

   736/736    95.8%       1 CONS RATIO LONG-FLOAT COMPLEX STRUCTURE
    72/200    94.1%         FIXNUM SHORT-FLOAT CHARACTER RANDOM-STATE READTABLE 
NIL
   214/500    99.5%         SYMBOL STREAM
     1/8      23.1%         PACKAGE
    18/400    77.1%         ARRAY HASH-TABLE VECTOR BIT-VECTOR PATHNAME 
CCLOSURE FAT-STRING
   116/500    71.3%         STRING
    12/100    63.1%         CFUN BIGNUM
    34/115    97.9%         SFUN GFUN CFDATA SPICE NIL

  1177/1177                 contiguous (312 blocks)
       13348                hole
       1000   10.8%         relocatable

      1203 pages for cells
     16728 total pages
    108009 pages available
      6335 pages in heap but not gc'd + pages needed for gc marking
    131072 maximum pages
Value = NIL
(1) -> 
=============================================================================

I get 74Mb.  Can you get some swap somewhere?  My test arm machine has
the same amount of ram, but generous swap at 256M, which is certainly
overkill for the present purpose.

Take care,

> Regards,
> Bill Page.
> 
> ----------
> Build log with Axiom gcl configure options:
> 
> ...
> touch bfdfiles
> rm -rf libpre_gcl.a
> ar rs libpre_gcl.a ../o/alloc.o ../o/array.o ../o/assignment.o ../o/backq.o
> ../o
> /bds.o ../o/big.o ../o/bind.o ../o/bitop.o ../o/block.o ../o/catch.o
> ../o/cfun.o
>  ../o/character.o ../o/clxsocket.o ../o/cmpaux.o ../o/conditional.o
> ../o/earith.
> o ../o/error.o ../o/eval.o ../o/fat_string.o ../o/file.o ../o/format.o
> ../o/fram
> e.o ../o/funlink.o ../o/gbc.o ../o/gcl_readline.o ../o/gmp_wrappers.o
> ../o/hash.
> o ../o/init_pari.o ../o/iteration.o ../o/let.o ../o/lex.o ../o/list.o
> ../o/macro
> s.o ../o/main.o ../o/makefun.o ../o/mapfun.o ../o/multival.o ../o/new_init.o
> ../
> o/nfunlink.o ../o/nsocket.o ../o/num_arith.o ../o/num_co.o ../o/num_comp.o
> ../o/
> num_log.o ../o/num_pred.o ../o/num_rand.o ../o/num_sfun.o ../o/number.o
> ../o/pac
> kage.o ../o/pathname.o ../o/plt.o ../o/predicate.o ../o/print.o ../o/prog.o
> ../o
> /read.o ../o/reference.o ../o/regexpr.o ../o/run_process.o ../o/sequence.o
> ../o/
> sfasl.o ../o/sockets.o ../o/string.o ../o/structure.o ../o/symbol.o
> ../o/topleve
> l.o ../o/typespec.o ../o/unixfasl.o ../o/unixfsys.o ../o/unixsave.o
> ../o/unixsys
> .o ../o/unixtime.o ../o/usig.o ../o/usig2.o ../o/utils.o sys_pre_gcl.o
> ar: creating libpre_gcl.a
> cp ../o/gcllib.a libgclp.a
> ranlib libgclp.a
> cp init_pre_gcl.lsp.in init_pre_gcl.lsp.tmp
> touch raw_pre_gcl_map
> gcc -o raw_pre_gcl /root/axiom/obj/linux/lib/cfuns-c.o
> /root/axiom/obj/linux/lib
> /sockio-c.o \
>         -L.  -Wl,-Map raw_pre_gcl_map   -lpre_gcl -lm  -lgmp
> /usr/lib/libbfd.a /
> usr/lib/libiberty.a -lreadline -lncurses -lc -lgclp
> /root/axiom/obj/linux/lib/li
> bspad.a
> cat init_pre_gcl.lsp.tmp | sed \
>         -e "address@hidden@#(`cat ../majvers`.`cat ../minvers`) `date`#1" \
>         -e "address@hidden@#`cat ../minvers | cut -f2 -d.`#1" \
>         -e "address@hidden@#`cat ../minvers | cut -f1 -d.`#1" \
>         -e "address@hidden@#`cat ../majvers`#1" \
>         -e "address@hidden@#\"gcc -c -Wall -DVOL=volatile -fsigned-char -pipe
> -mlong-c
> alls \"#1" \
>         -e "address@hidden@#\"gcc -o \"#1" \
>         -e "address@hidden@#\"   -lpre_gcl -lm  -lgmp /usr/lib/libbfd.a
> /usr/lib/
> libiberty.a -lreadline -lncurses -lc -lgclp
> /root/axiom/obj/linux/lib/libspad.a
> \"#1" \
>         -e "address@hidden@#\"-O3 -fomit-frame-pointer\"#1" \
>         -e "address@hidden@#\"-O\"#1" \
>         -e "address@hidden@#\"init_pre_gcl.lsp\"#1" >init_pre_gcl.lsp
> cp init_pre_gcl.lsp foo
> echo " (in-package \"USER\")(system:save-system \"saved_pre_gcl\")" >>foo
> /root/axiom/lsp/gcl-2.6.5/unixport/raw_pre_gcl
> /root/axiom/lsp/gcl-2.6.5/unixpor
> t/ -libdir /root/axiom/lsp/gcl-2.6.5/ < foo
> 
> Unrecoverable error: Can't allocate.  Good-bye!.
> make[4]: *** [saved_pre_gcl] Error 134
> rm raw_pre_gcl init_pre_gcl.lsp
> make[4]: Leaving directory `/root/axiom/lsp/gcl-2.6.5/unixport'
> make[3]: *** [unixport/saved_pre_gcl] Error 2
> make[3]: Leaving directory `/root/axiom/lsp/gcl-2.6.5'
> /bin/sh: line 1: unixport/saved_gcl: No such file or directory
> make[2]: *** [gcldir] Error 127
> make[1]: *** [lspdir] Error 2
> make: *** [all] Error 2
> make[2]: Leaving directory `/root/axiom/lsp'
> make[1]: Leaving directory `/root/axiom'
> 
> 
> /root/axiom# free
>              total       used       free     shared    buffers     cached
> Mem:         62048      46756      15292          0       1116      30632
> -/+ buffers/cache:      15008      47040
> Swap:            0          0          0
> 
> 
> /root/axiom# vmstat
> procs -----------memory---------- ---swap-- -----io---- --system--
> ----cpu----
>  r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id
> wa
>  1  0      0  15264   1120  30652    0    0     6    71   51    19 12 41 47
> 0
> 
> 
> /root/axiom# ps -A
>   PID TTY          TIME CMD
>     1 ?        00:00:16 init
>     2 ?        00:00:00 keventd
>     3 ?        00:06:32 kapm-idled
>     4 ?        00:00:00 off_thread
>     5 ?        00:00:00 battchrgon
>     6 ?        00:00:00 battchrgoff
>     7 ?        00:03:06 sharpsl_bat
>     8 ?        00:00:00 fatalchk
>     9 ?        00:00:00 jacketchk
>    10 ?        00:00:00 ksoftirqd_CPU0
>    11 ?        00:00:08 kswapd
>    12 ?        00:00:00 bdflush
>    13 ?        00:00:00 kupdated
>    14 ?        00:00:00 buzzer
>    15 ?        00:00:00 swapper
>    16 ?        00:00:00 swapper
>    17 ?        00:00:00 mtdblockd
>    45 ?        00:00:00 jffs2_gcd_mtd3
>    91 ?        00:00:00 khubd
>   123 ?        00:00:00 sdmgr
>   160 ?        00:00:00 cardmgr
>   171 ?        00:00:00 inetd
>   181 ?        00:00:00 atd
>   215 ?        00:00:02 sh
>   216 ?        00:01:14 shsync
>   224 ?        00:00:00 zdebian
>   227 ?        00:00:00 zdebian
>   270 ?        00:00:00 dhcpd
>   273 ?        00:00:02 sshd
>   274 ?        00:00:00 sh
>   279 ?        00:00:00 sh
>  4093 ?        00:00:00 ps
> /root/axiom#
> 
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]