Bug 221769 - [index] Out of memory error from indexer
Summary: [index] Out of memory error from indexer
Status: RESOLVED DUPLICATE of bug 166223
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 3.3 M7   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-06 17:59 EST by Kevin McGuire CLA
Modified: 2008-03-10 14:36 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin McGuire CLA 2008-03-06 17:59:08 EST
3.4 M5 running with default settings for java heap space etc.

0. In a new, empty workspace
1. Run an inner eclipse in debug (this seems required but note no projects loaded)
2. File->Import -> PDE -> Plugins and Fragments
3. Pick Plugins with Source, select a bunch (I picked 8, from org.eclipse.ui.ide through to org.eclipse.ui.intro.universal.source).

You will get an Out of Memory error.  It appears I can consistently reproduce this bug.


!ENTRY org.eclipse.jdt.core 4 4 2008-03-06 17:29:23.671
!MESSAGE Background Indexer Crash Recovery
!STACK 0
java.lang.OutOfMemoryError: Java heap space
	at org.eclipse.jdt.internal.core.index.DiskIndex$IntList.add(DiskIndex.java:73)
	at org.eclipse.jdt.internal.core.index.DiskIndex.copyQueryResults(DiskIndex.java:354)
	at org.eclipse.jdt.internal.core.index.DiskIndex.mergeWith(DiskIndex.java:522)
	at org.eclipse.jdt.internal.core.index.Index.save(Index.java:181)
	at org.eclipse.jdt.internal.core.search.indexing.IndexManager.saveIndex(IndexManager.java:583)
	at org.eclipse.jdt.internal.core.search.indexing.AddJarFileToIndex.execute(AddJarFileToIndex.java:205)
	at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:395)
	at java.lang.Thread.run(Unknown Source)
Comment 1 Olivier Thomann CLA 2008-03-06 18:05:14 EST
Please provide VM settings.
Comment 2 Kevin McGuire CLA 2008-03-06 18:19:25 EST
Sorry meant to, its Sun JRE 1.6.0_03.
Other VM settings are defaults, I just run the eclipse.exe.

I seem to be having problems recreating it now though.  I've tried adding more projects to the import (up to 20 now).  Previously I saw it happen twice, once with the inner eclipse going down in flames.  And I saw it on someone else's machine. I will find out what VM they're using.
Comment 3 Frederic Fusier CLA 2008-03-07 03:48:26 EST
Kevin, can you let me know what is the -Xmx value set in the VM arguments of your launch config you used to run the inner eclipse?
Comment 4 Kevin McGuire CLA 2008-03-07 12:02:56 EST
Note the other person who had similar crash was using same vm (Sun 1.6.0_03).

The Eclipse about config details says:

eclipse.vm=C:\Program Files\Java\jre1.6.0_03\bin\client\jvm.dll
eclipse.vmargs=-Xms40m
-Xmx256m
-XX:MaxPermSize=256m

As before, this is just what I get by default.
Comment 5 Kevin McGuire CLA 2008-03-09 13:47:22 EDT
I've just hit the same error with sun jre1.5.0_06.
-Xmx256m (default)
Comment 6 Frederic Fusier CLA 2008-03-10 06:03:02 EDT
Kevin, I think my question asked in comment 3 wasn't clear enough...

In your description, you said that you "Run an inner eclipse in debug...".
So, to do that you need to use a launch configuration, and I wanted to know if you can have a look at the VM arguments of 'Arguments' tab of this launch configuration and give me the -Xmx value...

My assumption is that you do not have any -Xmx set for the VM arguments, and so you run your inner eclipse with the VM default (which should be 64M) and not the Eclipse default value.

Note that to use the Eclipse default value on *new* created launch config, you need to set a specific PDE option: Window -> Preferences -> Plug-in Development -> Target Platform -> 'Launching Arguments' tab -> select 'Append VM arguments specified in the target's launcher INI file' check box...

If my assumption is correct, the fix is trivial and you just have to explicitly set the -Xmx256M in the VM Arguments of your launch config and then this bug is simply a duplicate of bug 16623. If not, then please reopen the bug, thanks


*** This bug has been marked as a duplicate of bug 166223 ***
Comment 7 Kevin McGuire CLA 2008-03-10 14:36:45 EDT
Sorry I'm an idiot, of *course* you wanted them for the inner, d'oh!  I just assumed they were the same as the outer...

No I don't change the defaults for the launch config.  I did change it once to xmx512 so I could complete the testing I was doing and that fixed it, I didn't think to change it to just 256 since I assumed it got the same default.

You're right probably then a dupe.