From owner-freebsd-questions@FreeBSD.ORG Fri Feb 24 14:29:30 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 10DCB16A420 for ; Fri, 24 Feb 2006 14:29:30 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail5.sea5.speakeasy.net (mail5.sea5.speakeasy.net [69.17.117.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3C57D43D72 for ; Fri, 24 Feb 2006 14:29:25 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 3728 invoked from network); 24 Feb 2006 14:29:24 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail5.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 24 Feb 2006 14:29:24 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id BC6E328425; Fri, 24 Feb 2006 09:29:23 -0500 (EST) Sender: lowell@be-well.ilk.org To: "Ken Williams" References: From: Lowell Gilbert Date: 24 Feb 2006 09:29:23 -0500 In-Reply-To: Message-ID: <44y800de4c.fsf@be-well.ilk.org> Lines: 84 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: virtual memory exhausted: Cannot allocate memory X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2006 14:29:30 -0000 "Ken Williams" writes: > Hi FreeBSD folks, > > I'm having trouble compiling the java/jdk15 package. I've > downloaded the files from Sun and eyesbeyond, as per usual. When I go > to the jdk15 directory and do 'make' the compilation starts and runs > for an hour or two and then grinds to a halt with the following error > message; > ------------------------------------------------------------------------------ > gmake[3]: Leaving directory > `/usr/ports/java/jdk15/work/control/build/bsd-i586/hotspot-i586/tmp/bsd_i486_compiler2/jvmg' > gmake[3]: Entering directory > `/usr/ports/java/jdk15/work/control/build/bsd-i586/hotspot-i586/tmp/bsd_i486_compiler2/jvmg' > Compiling ../generated/adfiles/ad_i486.cpp > virtual memory exhausted: Cannot allocate memory > gmake[3]: *** [ad_i486.o] Error 1 > gmake[3]: Leaving directory > `/usr/ports/java/jdk15/work/control/build/bsd-i586/hotspot-i586/tmp/bsd_i486_compiler2/jvmg' > gmake[2]: *** [the_vm] Error 2 > gmake[2]: Leaving directory > `/usr/ports/java/jdk15/work/control/build/bsd-i586/hotspot-i586/tmp/bsd_i486_compiler2/jvmg' > gmake[1]: *** [jvmg] Error 2 > gmake[1]: Leaving directory > `/usr/ports/java/jdk15/work/control/build/bsd-i586/hotspot-i586/tmp' > gmake: *** [jvmg] Error 2 > *** Error code 2 > > Stop in /usr/ports/java/jdk15. > ------------------------------------------------------------------------------ > > The PC I'm using has a 2.3GHz Pentium, with 128MB memory and 70GB > free disk space > running FreeBSD-6.1PRERELEASE. Interestingly, when I run 'make' and do > 'top' the compilation process steadily grows to 128MB in size and then > stays at that size until it grinds to a halt. > > I was under the impression that FreeBSD imposed a default maximum > process size of 512MB, maybe that's changed or I was wrong (anyone > ??). After Googling, I found that the way to increase the maximum > process size was to add the following entries to /boot/loader.conf and > reboot; > > root$ more /boot/loader.conf > kern.maxdsiz="1073741824" # 1GB > kern.dfldsiz="1073741824" # 1GB > kern.maxssiz="134217728" # 128MB > > I did this and tried compiling jdk15 again but it made no difference. > > So I had the idea that another way to increase the amount of virtual > memory available is to increase the amount of swap memory available > (correct ??) which I did (to 1GB) as described in the Handbook here > (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/adding-swap-space.html). > This I did, and when I do 'top' it shows up as available swap memory > but when I tried compiling jdk15 again it also made no difference. > > I've also checked my resource limits (ulimit) but they look > reasonable to me; > > root$ ulimit -SHacdflmnpstuv > core file size (blocks, -c) unlimited > data seg size (kbytes, -d) 524288 > file size (blocks, -f) unlimited > max locked memory (kbytes, -l) unlimited > max memory size (kbytes, -m) unlimited > open files (-n) 1735 > pipe size (512 bytes, -p) 1 > stack size (kbytes, -s) 65536 > cpu time (seconds, -t) unlimited > max user processes (-u) 867 > virtual memory (kbytes, -v) unlimited > > > For info, I also have java/linux-sun-jdk14 installed with linprocfs > mounted (to bootstrap the jdk15 installation) but I don't think this > is related to my problem. > > I'm at a bit of a loss what to do next. Do I need to buy some more > memory for my PC (just to compile jdk15) or is there anything else I > can try or change in FreeBSD which may help me ? Do you have swap space? Does it fill up? Do you have the same problem with the 1.4 jdk?