File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes JVM crash due to perm gen space 99% in use Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "JVM crash due to perm gen space 99% in use" Watch "JVM crash due to perm gen space 99% in use" New topic

JVM crash due to perm gen space 99% in use

manoj r patil
Ranch Hand

Joined: Jun 06, 2002
Posts: 181
I am using flex builder 3 plugin on top of wtp eclipse 3.2.2. The application is quite heavy and needs 2 GB of physical RAM when running on JBoss.

I have eclipse.ini set with the following options:

Now whenever I am trying to build the project, eclipse crashes with the following error:
# An unexpected error has been detected by Java Runtime Environment:
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d88b795, pid=4572, tid=4660
# Java VM: Java HotSpot(TM) Client VM (11.0-b16 mixed mode windows-x86)
# Problematic frame:
# V [jvm.dll+0x8b795]
# If you would like to submit a bug report, please visit:

--------------- THREAD ---------------

Current thread (0x58412400): VMThread [stack: 0x584a0000,0x584f0000] [id=4660]

siginfo: ExceptionCode=0xc0000005, reading address 0x000001e0

EAX=0x00000000, EBX=0x00389d48, ECX=0x00000008, EDX=0x00000178
ESP=0x584ef99c, EBP=0x07a20000, ESI=0x00000008, EDI=0x440f5c88
EIP=0x6d88b795, EFLAGS=0x00010293

Top of Stack: (sp=0x584ef99c)
0x584ef99c: 6d939750 440f5c88 440f9f58 6da15074
0x584ef9ac: 6d894dbe 00000003 6da15074 6d93940a
0x584ef9bc: 440f9f58 6d9397ea 00000003 6d9af5b1
0x584ef9cc: 6da3056c 6da15074 00389d48 6d971c1b
0x584ef9dc: 6da15074 00000000 6da15074 6da15074
0x584ef9ec: 00389d48 6d8a9c11 00000001 00000002
0x584ef9fc: 6da15074 6da15074 00000001 00389d48
0x584efa0c: 07a20000 0ef14000 6d8ab84b 00000001

Instructions: (pc=0x6d88b795)
0x6d88b785: 00 83 e0 07 83 f8 05 74 1f 8b 54 24 04 8b 52 04
0x6d88b795: 8b 52 68 83 e2 07 80 fa 05 74 12 83 f8 01 75 0d

Stack: [0x584a0000,0x584f0000], sp=0x584ef99c, free space=318k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x8b795]

VM_Operation (0x5a62f8c4): GenCollectFull, mode: safepoint, requested by thread 0x59f45000

--------------- PROCESS ---------------

Java Threads: ( => current thread )
0x59fc6800 JavaThread "Worker-5" [_thread_blocked, id=5176, stack(0x5a680000,0x5a6d0000)]
0x59f58400 JavaThread "Worker-4" [_thread_blocked, id=4932, stack(0x5a630000,0x5a680000)]
0x59f45000 JavaThread "Worker-3" [_thread_blocked, id=5580, stack(0x5a5e0000,0x5a630000)]
0x59fcbc00 JavaThread "Worker-2" [_thread_blocked, id=5564, stack(0x5a590000,0x5a5e0000)]
0x59f3e800 JavaThread "Worker-1" [_thread_blocked, id=1104, stack(0x593e0000,0x59430000)]
0x58e7e800 JavaThread "org.eclipse.jdt.internal.ui.text.JavaReconciler" daemon [_thread_blocked, id=5132, stack(0x5a3c0000,0x5a410000)]
0x58dc4c00 JavaThread "Java indexing" daemon [_thread_blocked, id=4532, stack(0x59b40000,0x59b90000)]
0x58b3f400 JavaThread "Worker-0" [_thread_blocked, id=5400, stack(0x59390000,0x593e0000)]
0x587e9400 JavaThread "Start Level Event Dispatcher" daemon [_thread_blocked, id=5372, stack(0x58ab0000,0x58b00000)]
0x587e5c00 JavaThread "Framework Event Dispatcher" daemon [_thread_blocked, id=1596, stack(0x58a60000,0x58ab0000)]
0x587e2400 JavaThread "State Data Manager" daemon [_thread_blocked, id=5020, stack(0x58a10000,0x58a60000)]
0x58434800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=2532, stack(0x58680000,0x586d0000)]
0x58430000 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2584, stack(0x58630000,0x58680000)]
0x5842cc00 JavaThread "Attach Listener" daemon [_thread_blocked, id=1056, stack(0x585e0000,0x58630000)]
0x5842b800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=6080, stack(0x58590000,0x585e0000)]
0x5841c000 JavaThread "Finalizer" daemon [_thread_blocked, id=2236, stack(0x58540000,0x58590000)]
0x58417400 JavaThread "Reference Handler" daemon [_thread_blocked, id=5796, stack(0x584f0000,0x58540000)]
0x00386800 JavaThread "main" [_thread_blocked, id=2300, stack(0x003b0000,0x00400000)]

Other Threads:
=>0x58412400 VMThread [stack: 0x584a0000,0x584f0000] [id=4660]
0x5843ec00 WatcherThread [stack: 0x586d0000,0x58720000] [id=4492]

VM state:at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
[0x00385750] UNKNOWN - owner thread: 0x58412400
[0x00385bb0] UNKNOWN - owner thread: 0x59f45000

def new generation total 70976K, used 23241K [0x02a70000, 0x07770000, 0x07a20000)
eden space 63104K, 36% used [0x02a70000, 0x04122770, 0x06810000)
from space 7872K, 0% used [0x06810000, 0x06810000, 0x06fc0000)
to space 7872K, 0% used [0x06fc0000, 0x06fc0000, 0x07770000)
tenured generation total 945280K, used 32043K [0x07a20000, 0x41540000, 0x43670000)
the space 945280K, 3% used [0x07a20000, 0x0996ac98, 0x0996ae00, 0x41540000)
compacting perm gen total 38144K, used 37935K [0x43670000, 0x45bb0000, 0x56270000)
the space 38144K, 99% used [0x43670000, 0x45b7bf00, 0x45b7c000, 0x45bb0000)

No shared spaces configured.

Dynamic libraries:
0x00400000 - 0x00424000 C:\WINDOWS\system32\javaw.exe
0x77cc0000 - 0x77d75000 C:\WINDOWS\system32\ntdll.dll
0x77e60000 - 0x77f50000 C:\WINDOWS\system32\kernel32.dll
0x77f50000 - 0x77feb000 C:\WINDOWS\system32\ADVAPI32.dll
0x77340000 - 0x773d1000 C:\WINDOWS\system32\RPCRT4.dll
0x77d80000 - 0x77e11000 C:\WINDOWS\system32\USER32.dll
0x773e0000 - 0x77425000 C:\WINDOWS\system32\GDI32.dll
0x7c340000 - 0x7c396000 C:\Program Files\Java\jre6\bin\msvcr71.dll
0x6d800000 - 0x6da56000 C:\Program Files\Java\jre6\bin\client\jvm.dll
0x76b40000 - 0x76b6d000 C:\WINDOWS\system32\WINMM.dll
0x6d280000 - 0x6d288000 C:\Program Files\Java\jre6\bin\hpi.dll
0x76bf0000 - 0x76bfb000 C:\WINDOWS\system32\PSAPI.DLL
0x6d7b0000 - 0x6d7bc000 C:\Program Files\Java\jre6\bin\verify.dll
0x6d320000 - 0x6d33f000 C:\Program Files\Java\jre6\bin\java.dll
0x6d7f0000 - 0x6d7ff000 C:\Program Files\Java\jre6\bin\zip.dll
0x58930000 - 0x58957000 C:\WINDOWS\system32\rsaenh.dll
0x77c10000 - 0x77c68000 C:\WINDOWS\system32\msvcrt.dll
0x76620000 - 0x766d2000 C:\WINDOWS\system32\USERENV.dll
0x5fe20000 - 0x5fe73000 C:\WINDOWS\system32\netapi32.dll
0x6d610000 - 0x6d623000 C:\Program Files\Java\jre6\bin\net.dll
0x71ab0000 - 0x71ac7000 C:\WINDOWS\system32\WS2_32.dll
0x71aa0000 - 0x71aa8000 C:\WINDOWS\system32\WS2HELP.dll
0x71a50000 - 0x71a8e000 C:\WINDOWS\System32\mswsock.dll
0x76f20000 - 0x76f47000 C:\WINDOWS\system32\DNSAPI.dll
0x76fb0000 - 0x76fb7000 C:\WINDOWS\System32\winrnr.dll
0x76f60000 - 0x76f8d000 C:\WINDOWS\system32\WLDAP32.dll
0x76fc0000 - 0x76fc5000 C:\WINDOWS\system32\rasadhlp.dll
0x6d630000 - 0x6d639000 C:\Program Files\Java\jre6\bin\nio.dll
0x58f00000 - 0x58f53000 E:\eclipse_wtp\configuration\org.eclipse.osgi\bundles\327\1\.cp\swt-win32-3236.dll
0x774d0000 - 0x7760d000 C:\WINDOWS\system32\ole32.dll
0x58f70000 - 0x5905c000 C:\WINDOWS\WinSxS\X86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2096_x-ww_a7d210bd\COMCTL32.dll
0x772d0000 - 0x7731e000 C:\WINDOWS\system32\SHLWAPI.dll
0x763b0000 - 0x763f9000 C:\WINDOWS\system32\comdlg32.dll
0x7c800000 - 0x7d010000 C:\WINDOWS\system32\SHELL32.dll
0x77120000 - 0x771ac000 C:\WINDOWS\system32\OLEAUT32.dll
0x76390000 - 0x763ad000 C:\WINDOWS\system32\IMM32.dll
0x74770000 - 0x747db000 C:\WINDOWS\system32\USP10.dll
0x771b0000 - 0x77252000 C:\WINDOWS\system32\WININET.dll
0x77b00000 - 0x77b95000 C:\WINDOWS\system32\CRYPT32.dll
0x77ba0000 - 0x77bb1000 C:\WINDOWS\system32\MSASN1.dll
0x755b0000 - 0x755d1000 C:\WINDOWS\system32\MSVFW32.dll
0x5ad70000 - 0x5ada7000 C:\WINDOWS\system32\uxtheme.dll
0x59270000 - 0x59278000 E:\eclipse_wtp\configuration\org.eclipse.osgi\bundles\62\1\.cp\os\win32\x86\localfile_1_0_0.dll
0x74c80000 - 0x74cac000 C:\WINDOWS\system32\oleacc.dll
0x76080000 - 0x760e6000 C:\WINDOWS\system32\MSVCP60.dll
0x59470000 - 0x59483000 E:\eclipse_wtp\configuration\org.eclipse.osgi\bundles\327\1\.cp\swt-gdip-win32-3236.dll
0x594b0000 - 0x59653000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.2600.2096_x-ww_51b29046\gdiplus.dll
0x59810000 - 0x59a9f000 C:\WINDOWS\system32\xpsp2res.dll
0x77610000 - 0x776bf000 C:\WINDOWS\system32\CLBCATQ.DLL
0x77050000 - 0x77115000 C:\WINDOWS\system32\COMRes.dll
0x77c00000 - 0x77c08000 C:\WINDOWS\system32\VERSION.dll
0x75a70000 - 0x75b01000 C:\WINDOWS\system32\mlang.dll
0x76380000 - 0x76385000 C:\WINDOWS\system32\msimg32.dll

VM Arguments:
jvm_args: -Xms1000m -Xmx1036m -XX:MaxPermSize=300m
java_command: E:\eclipse_wtp\startup.jar -os win32 -ws win32 -arch x86 -launcher E:\eclipse_wtp\eclipse.exe -name Eclipse -showsplash 600 -exitdata 1560_4c -vm C:\WINDOWS\system32\javaw.exe -vmargs -Xms1000m -Xmx1036m -XX:MaxPermSize=300m -jar E:\eclipse_wtp\startup.jar
Launcher Type: SUN_STANDARD

Environment Variables:
JAVA_HOME=E:\Program Files\Java\jdk1.6.0_03
PATH=E:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;E:\Program Files\TortoiseCVS;C:\Program Files\GNU\GnuPG\pub;E:\Program Files\Java\jre1.6.0_03\bin\javaw.exe\;E:\apache-ant-1.7.0\bin;"C:\Program Files\MySQL\MySQL Server 5.0\bin";E:\apache-maven-2.0.9\bin;;VFSDK\BIN
PROCESSOR_IDENTIFIER=x86 Family 15 Model 6 Stepping 4, GenuineIntel

--------------- S Y S T E M ---------------

OS: Windows XP Build 2600 Service Pack 2, v.2096

CPU:total 2 (2 cores per cpu, 1 threads per core) family 15 model 6 stepping 4, cmov, cx8, fxsr, mmx, sse, sse2, sse3

Memory: 4k page, physical 2086952k(898672k free), swap 4017200k(1797292k free)

vm_info: Java HotSpot(TM) Client VM (11.0-b16) for windows-x86 JRE (1.6.0_11-b03), built on Nov 10 2008 02:15:12 by "java_re" with MS VC++ 7.1

time: Mon Jan 05 17:47:24 2009
elapsed time: 63 seconds


After looking at this log, I got the line starting with "compacting perm gen" which made me thinking that there might be some problem in Perm Gen memory. I got quite a few references on the net but none could lead me to concrete solution. I tried with different combination of settings for MaxPermSize but no luck.

has anyone faced this problem on eclipse and aware of any possible solution?

love your job and not your company;
...because you never know when your company will stop loving you!
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42952
What you experienced was a crash of the JVM - something that shouldn't happen, even in low memory situations. Make sure you file a bug report with Sun as the message suggests.
Peter Johnson

Joined: May 14, 2008
Posts: 5846

Also, it is not unusual to see the permgen space 99% occupied. The JVM usually uses only as much permgen space as is required. Note, for example, that you set max permgen size to 300MB but the JVM is using only 38MB.

I noticed that you are using JDK 1.6.0_03. That is a really old JVM. I very highly recommend upgrading to the latest JDK 6! I know, for example, that JVMs older than 1.6.0_04 have issues with JBoss AS 5.0.0.GA, and have serious issues when running on Vista.

JBoss In Action
manoj r patil
Ranch Hand

Joined: Jun 06, 2002
Posts: 181
Thanks for the replies.

Actually I am already using JVM 1.6.0_11-b03. And currently the problem is while running eclipse and could not reach to deployment stage at all so far. One thing I noticed is that I enabled some code styles in the eclipse preferences, and since then I am facing this problem. But now even after reverting those changes, the problem persists.

I have already reported this potential bug to sun and waiting for their response.
It is sorta covered in the JavaRanch Style Guide.
subject: JVM crash due to perm gen space 99% in use