Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java Out Of Memory -- Out of Swap Space?

843829Jul 28 2008
I've only gotten this error twice, but when it happens the Java instance is gone and I have to restart it.

Hardware: H/P rp5470 10GB. Memory
Swap Total:6480016; Used:2906056; Free:3573960
OS: HP-UX 11.i
Java -version: java version "1.6.0.01"
Java(TM) SE Runtime Environment (build 1.6.0.01-jinteg_06_jun_2008_13_24-b00)
Java HotSpot(TM) Server VM (build 1.6.0.01 jinteg:06.06.08-12:28 PA2.0 (aCC_AP), mixed mode)

Here's the top of the error:
# An unexpected error has been detected by Java Runtime Environment:
#
# java.lang.OutOfMemoryError: requested 2048000 bytes for GrET in /CLO/Components/JAVA_HOTSPOT/Src/src/share/vm/utilities/growableArray.cpp. Out of swap space?
Possible causes:
- not enough swap space left, or
- kernel parameter MAXDSIZ is very small.
#
# Internal Error (/CLO/Components/JAVA_HOTSPOT/Src/src/share/vm/memory/allocation.inline.hpp, 22), pid=3488, tid=8
#
# Java VM: Java HotSpot(TM) Server VM (1.6.0.00 jinteg:11.12.07-21:02 PA2.0 (aCC_AP) mixed mode)
#
# Error: GrET in /CLO/Components/JAVA_HOTSPOT/Src/src/share/vm/utilities/growableArray.cpp
# Please report this error to HP customer support.
#
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I think that Swap Space isn't the issue -- never more than 50% used
The MAXDSIZ kernel parameter is also quite large (2GB).

Two things:
1. I am using the Parallel Collector and start Java with -Xmx256m -Xms64m options. Does using these options keep the collector from changing heap size based on goals? I was thinking of starting Java without either -Xms or -Xmx. Would that help?

2. My GC log shows the likes of the following for major collections:

3070.596: [Full GC [PSYoungGen: 1152K->0K(47616K)] [PSOldGen: 116250K->63171K(209728K)] 117402K->63171K(257344K)
[PSPermGen: 65535K->61422K(65536K)], 3.8905881 secs]

I believe that all GCs happen when the PermGen gets full, not the OldGen as documentation suggests. Should I add -XX:MaxPermSize=128m (since the default is system-dependent and appears to be 65m) so that collections would (hopefully) occur when the OldGen gets full?

Would either of these ideas help prevent the OOM from happening?

If there is any further information I can supply, just ask!
Thanks in advance for your help.
Regards,
Brad
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 25 2008
Added on Jul 28 2008
0 comments
323 views