Subject: Re: Problems building -current on sparc20
To: None <>
From: Johan A.van Zanten <>
List: port-sparc
Date: 02/16/2005 17:31:09
Gordon Zaft <> wrote:
> I'm having problems building -current on a Sparc20 with 384 MB of RAM
> and 2 CPUs.
>  The error is:
> #   compile  libc/clnt_bcast.po
> /usr/src/obj/tooldir.NetBSD-2.0-sparc/bin/sparc--netbsdelf-gcc -O2
> -DALL_STATE -DUSG_COMPAT -Wall -Wstrict-prototypes
> -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare
> -Wno-traditional -Wno-uninitialized -Wreturn-type -Wswitch -Wshadow 
> -I/usr/src/lib/libc/include -I/usr/src/lib/libc -DHESIOD -DINET6 -DNLS
> -I/usr/src/libexec/ld.elf_so -I/usr/src/lib/libc/dlfcn -DCITRUS_ICONV
> -DPORTMAP -DFLOATING_POINT   -nostdinc -isystem
> /usr/src/obj/destdir.sparc/usr/include -c    -pg
> /usr/src/lib/libc/rpc/clnt_bcast.c -o clnt_bcast.po.tmp
> --- bindresvport.po ---
> /usr/src/obj/tooldir.NetBSD-2.0-sparc/bin/sparc--netbsdelf-ld -X -r
> bindresvport.po.tmp -o bindresvport.po
> rm -f bindresvport.po.tmp
> sbrk: grow 8192 failed, error = 12
> sbrk: grow 8192 failed, error = 12
> nbmake: Cannot allocate memory.

I saw some errors like this when building some things in pkgsrc. (My
machine is a dual CPU SPARC-20 running 2.0) A few days later i had a
kernel panic:

/netbsd: panic: malloc: out of space in kmem_map

 I searched a bit and then added this to my kernel config:

options NKMEMPAGES_MAX=5120

 5120 may be more than is needed.  So far, though, i've run 6 days without
 any problems, so perhaps compiling a custom kernel with an increased
 NKMEMPAGES_MAX will help you.


ps. The funny thing is that i have another SPARC-20 (vishnu) running 2.0
and the previous kernel with two CPUs and about the same amount of
RAM. And it has no problems.  However, vishnu does not do compiles nor
does it run X.  (Though it's a very busy mail relay and DNS server.)  I
suspect the X and compilation workload reveals a deficiency in the default