Skip to main content

jdk7 b94 cause outofmemory: PermGen

1 reply [Last post]
vipyami
Offline
Joined: 2004-05-05
Points: 0

I installed jdk7 b94 on my vista machine, then use Eclipse 3.5.2 to do my develop work, I clean my workspace, then build all my projects, then do some common operation, such as browse java file, but not more than 10 operations, eclipse report outofmemory: PermGen, I look the eclipse log, find the final fault is in classloader. I change to Eclipse 3.6RC1, but it also outofmemory: PermGen. I enlarge the maxpermgen size to 512M, cann't solve this problem. then I rollback jdk7 to b93, use maxpermgen with 256M as before, all the problem resolved, Eclipse 3.5.2 and Eclipse 3.6RC1 both have no problem. I haven't backup the error log, but I think this is cuased by b94, maybe some change about classloader, but I cann't ensure. it can be reproduced with eclipse and b94. note: my workspace have many projects, more than 50, but I think this is not the cause, I enlarged the maxpermgen size to 512M, not reslove the problem, but when rollback to b93, only 256M maxpermgen works well.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vipyami
Offline
Joined: 2004-05-05
Points: 0

Now I test all of b94, b95, b96 and b97, the problem also can be reproduce, the log of eclipse like below:

!ENTRY org.eclipse.core.jobs 4 2 2010-06-14 21:06:37.758
!MESSAGE An internal error occurred during: "Building workspace".
!STACK 0
java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:786)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:580)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:550)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:481)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassName(ClasspathManager.java:460)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:447)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:355)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:786)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:580)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:550)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:481)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassName(ClasspathManager.java:460)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:447)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:355)
at org.eclipse.pde.api.tools.internal.ApiBaselineManager.createWorkspaceBaseline(ApiBaselineManager.java:651)
at org.eclipse.pde.api.tools.internal.ApiBaselineManager.getWorkspaceBaseline(ApiBaselineManager.java:618)

Anybody has same problem?
How to reproduce:
1. uninstall your jdk and jre
2. install jdk7 b94 or b95 or b96 or b97
3. start eclipse
4. you will get the OutOfMemory error by eclipse, check log in .metadata of your worksapce, then you will find the error info.