Date: 04 Apr 2008 16:35:47 +0100 From: Michael Rogers <m.rogers@cs.ucl.ac.uk> To: freebsd-java@freebsd.org Subject: mmap problem with diablo-1.5.0 on 6.1-RELEASE i386 Message-ID: <Prayer.1.0.16.0804041635470.41929@bells3.cs.ucl.ac.uk>
next in thread | raw e-mail | index | archive | help
Hi, I'm having problems running Java on FreeBSD 6.1-RELEASE i386. The JVM seems to be unable to allocate memory for the code cache using mmap. Here's what I see on the command line: ~ $ java -version Error occurred during initialization of VM Could not reserve enough space for code cache ~ $ uname -mrs FreeBSD 6.1-RELEASE i386 ~ $ ulimit -a core file size (blocks, -c) unlimited data seg size (kbytes, -d) 2929687 file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 11095 pipe size (512 bytes, -p) 1 stack size (kbytes, -s) 65536 cpu time (seconds, -t) unlimited max user processes (-u) 5547 virtual memory (kbytes, -v) unlimited ~ $ Here's the tail of the kdump output: 48178 java CALL mmap(0,0x2000000,0,0x1042,0xffffffff,0,0,0) 48178 java RET mmap -1 errno 12 Cannot allocate memory 48178 java CALL write(0x1,0xbfbfd2d0,0x2b) 48178 java GIO fd 1 wrote 43 bytes "Error occurred during initialization of VM " 48178 java RET write 43/0x2b 48178 java CALL write(0x1,0xbfbfd2d0,0x2d) 48178 java GIO fd 1 wrote 45 bytes "Could not reserve enough space for code cache" 48178 java RET write 45/0x2d 48178 java CALL write(0x1,0xbb2ce361,0x1) 48178 java GIO fd 1 wrote 1 byte " " 48178 java RET write 1 48178 java CALL unlink(0x8064500) 48178 java NAMI "/tmp/hsperfdata_mrogers/48178" 48178 java RET unlink 0 48178 java CALL exit(0x1) So it seems the mmap call is the problem, but I'm not sure why. I get the same results with the installed version of Java and a fresh download of diablo-1.5.0 from freebsdfoundation.org. I also have access to a FreeBSD 6.2-RELEASE amd64 box where diablo-1.5.0 works fine; here's the corresponding command line and kdump output for comparison: ~ $ java -version java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b01) Java HotSpot(TM) 64-Bit Server VM (build diablo-1.5.0_07-b01, mixed mode) ~ $ uname -mrs FreeBSD 6.2-RELEASE amd64 ~ $ ulimit -a core file size (blocks, -c) unlimited data seg size (kbytes, -d) 33554432 file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 11095 pipe size (512 bytes, -p) 1 stack size (kbytes, -s) 524288 cpu time (seconds, -t) unlimited max user processes (-u) 5547 virtual memory (kbytes, -v) unlimited ~ $ 31867 java CALL mmap(0,0x3000000,0,0x1042,0xffffffff,0,0) 31867 java RET mmap 78553088/0x804aea000 31867 java CALL mmap(0x804aea000,0x270000,0x7,0x1012,0xffffffff,0,0) 31867 java RET mmap 78553088/0x804aea000 ... etc Any thoughts on what could be causing this problem? Could it be something to do with ulimit? Unfortunately I don't have root on either of the boxes so I can't easily experiment with changing the limits. Thanks in advance, Michael
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Prayer.1.0.16.0804041635470.41929>