Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Out of memory after Clean-Autobuild multiple times with custom builder by org.eclipse.core.internal.
Out of memory after Clean-Autobuild multiple times with custom builder by org.eclipse.core.internal. [message #994454] Thu, 27 December 2012 10:52 Go to next message
maarten meijer is currently offline maarten meijerFriend
Messages: 146
Registered: July 2009
Senior Member
I created a builder to validate photometric data files (IES/EULUMDAT).
On full or incremental build the file is parsed, checked and markers are
added to the file.

On clean I remove all markers with
getProject().deleteMarkers(markerType, true, IResource.DEPTH_INFINITE);

After creating a test fragment to stress test the builder by doing a
clean and having autobuild rebuild the project a fixed number of times,
the memory fills up and then I get an java.lang.OutOfMemoryError: Java
heap space

My expectation was that after a Clean command and an auto rebuild I end
up with the same amount of memory consumed. I.e clean/rebuild should
have same or less memory used than before.

I run against a target platform consisting of platform 3.8.1, GEF 3.8.1,
and my plugin set.

I monitored the project with jvisualvm and analyzed heap dumps with the
Eclipse Memeory Analyzer tool. I closed a few undetected resource leaks,
even simplified the builder to just set one marker, but this keeps
happening.

I already found ways to eliminate the duplicate Strings I had.
Whatecver I try the heap just fills up.
org.eclipse.core.internal.resources.SaveManager consumes 84% of memory!!
then it creshes.

What can I do to get rid of this?

Maarten Meijer


Top 5 shallow heap
Class Name | Objects | Shallow Heap
| Retained Heap
-----------------------------------------------------------------------------------------
char[] | 424,786 | 38,555,688
| 38,555,688
org.eclipse.core.internal.resources.ResourceInfo| 391,601 | 25,062,464
| 58,151,752
java.lang.String | 451,449 | 14,446,368
| 52,650,496
java.lang.Object[] | 203,315 | 9,751,960
| 11,410,808
org.eclipse.core.internal.dtree.DataDeltaNode | 379,513 | 9,108,312
| 111,850,096
-----------------------------------------------------------------------------------------

Top 5 retained heap
Class Name | Objects |
Shallow Heap | Retained Heap
-----------------------------------------------------------------------------------------------
org.eclipse.core.internal.dtree.AbstractDataTreeNode[]| 281 |
1.633.528 | 115.006.776
org.eclipse.core.internal.dtree.DataDeltaNode | 379.513 |
9.108.312 | 111.850.096
org.eclipse.core.internal.resources.ResourceInfo | 391.601 |
25.062.464 | 58.151.752
java.lang.String | 451.449 |
14.446.368 | 52.650.496
char[] | 424.786 |
38.555.688 | 38.555.688
-----------------------------------------------------------------------------------------------

Top 5 dominator tree
Class Name |
Shallow Heap | Retained Heap | Percentage
------------------------------------------------------------------------------------------------------------------
org.eclipse.core.internal.resources.SaveManager @ 0x7f5bbf8a0 |
64 | 111.120.768 | 84,23%
org.eclipse.core.internal.resources.Workspace @ 0x7f56e45f0 |
152 | 3.349.672 | 2,54%
org.eclipse.core.internal.dtree.DeltaDataTree @ 0x7f5032950 |
24 | 1.695.864 | 1,29%
org.eclipse.core.internal.registry.RegistryObjectManager @ 0x7f5875a80|
64 | 1.581.096 | 1,20%
sun.net.www.protocol.jar.URLJarFile @ 0x7f552fc58 |
72 | 476.120 | 0,36%
------------------------------------------------------------------------------------------------------------------
Re: Out of memory after Clean-Autobuild multiple times with custom builder by org.eclipse.core.inter [message #997602 is a reply to message #994454] Tue, 08 January 2013 13:16 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 27.12.2012 11:52, Maarten Meijer wrote:
> I created a builder to validate photometric data files (IES/EULUMDAT).
> On full or incremental build the file is parsed, checked and markers
> are added to the file.
>
> On clean I remove all markers with
> getProject().deleteMarkers(markerType, true, IResource.DEPTH_INFINITE);
>
> After creating a test fragment to stress test the builder by doing a
> clean and having autobuild rebuild the project a fixed number of
> times, the memory fills up and then I get an
> java.lang.OutOfMemoryError: Java heap space
This looks like a leak somewhere. Best would be to create a small sample
with your build and then file a bug against Platform Resources.

Dani
>
> My expectation was that after a Clean command and an auto rebuild I
> end up with the same amount of memory consumed. I.e clean/rebuild
> should have same or less memory used than before.
>
> I run against a target platform consisting of platform 3.8.1, GEF
> 3.8.1, and my plugin set.
>
> I monitored the project with jvisualvm and analyzed heap dumps with
> the Eclipse Memeory Analyzer tool. I closed a few undetected resource
> leaks, even simplified the builder to just set one marker, but this
> keeps happening.
>
> I already found ways to eliminate the duplicate Strings I had.
> Whatecver I try the heap just fills up.
> org.eclipse.core.internal.resources.SaveManager consumes 84% of
> memory!! then it creshes.
>
> What can I do to get rid of this?
>
> Maarten Meijer
>
>
> Top 5 shallow heap
> Class Name | Objects | Shallow
> Heap | Retained Heap
> -----------------------------------------------------------------------------------------
>
> char[] | 424,786 | 38,555,688
> | 38,555,688
> org.eclipse.core.internal.resources.ResourceInfo| 391,601 | 25,062,464
> | 58,151,752
> java.lang.String | 451,449 | 14,446,368
> | 52,650,496
> java.lang.Object[] | 203,315 | 9,751,960
> | 11,410,808
> org.eclipse.core.internal.dtree.DataDeltaNode | 379,513 | 9,108,312
> | 111,850,096
> -----------------------------------------------------------------------------------------
>
>
> Top 5 retained heap
> Class Name | Objects |
> Shallow Heap | Retained Heap
> -----------------------------------------------------------------------------------------------
>
> org.eclipse.core.internal.dtree.AbstractDataTreeNode[]| 281 |
> 1.633.528 | 115.006.776
> org.eclipse.core.internal.dtree.DataDeltaNode | 379.513 |
> 9.108.312 | 111.850.096
> org.eclipse.core.internal.resources.ResourceInfo | 391.601 |
> 25.062.464 | 58.151.752
> java.lang.String | 451.449 |
> 14.446.368 | 52.650.496
> char[] | 424.786 |
> 38.555.688 | 38.555.688
> -----------------------------------------------------------------------------------------------
>
>
> Top 5 dominator tree
> Class Name
> | Shallow Heap | Retained Heap | Percentage
> ------------------------------------------------------------------------------------------------------------------
>
> org.eclipse.core.internal.resources.SaveManager @ 0x7f5bbf8a0
> | 64 | 111.120.768 | 84,23%
> org.eclipse.core.internal.resources.Workspace @ 0x7f56e45f0
> | 152 | 3.349.672 | 2,54%
> org.eclipse.core.internal.dtree.DeltaDataTree @ 0x7f5032950
> | 24 | 1.695.864 | 1,29%
> org.eclipse.core.internal.registry.RegistryObjectManager @
> 0x7f5875a80| 64 | 1.581.096 | 1,20%
> sun.net.www.protocol.jar.URLJarFile @ 0x7f552fc58
> | 72 | 476.120 | 0,36%
> ------------------------------------------------------------------------------------------------------------------
>
>
>
Re: Out of memory after Clean-Autobuild multiple times with custom builder by org.eclipse.core.inter [message #1000402 is a reply to message #997602] Mon, 14 January 2013 17:06 Go to previous message
maarten meijer is currently offline maarten meijerFriend
Messages: 146
Registered: July 2009
Senior Member
Created bug 398104: Out of memory error on repeated Clean for builder
https://bugs.eclipse.org/bugs/show_bug.cgi?id=398104

Maarten


Op 08-01-13 14:16, Daniel Megert schreef:
> On 27.12.2012 11:52, Maarten Meijer wrote:
>> I created a builder to validate photometric data files (IES/EULUMDAT).
>> On full or incremental build the file is parsed, checked and markers
>> are added to the file.
>>
>> On clean I remove all markers with
>> getProject().deleteMarkers(markerType, true, IResource.DEPTH_INFINITE);
>>
>> After creating a test fragment to stress test the builder by doing a
>> clean and having autobuild rebuild the project a fixed number of
>> times, the memory fills up and then I get an
>> java.lang.OutOfMemoryError: Java heap space
> This looks like a leak somewhere. Best would be to create a small sample
> with your build and then file a bug against Platform Resources.
>
> Dani
Previous Topic:Forced closed when ctrl+clic
Next Topic:Target Definition
Goto Forum:
  


Current Time: Fri Mar 29 13:51:12 GMT 2024

Powered by FUDForum. Page generated in 0.03585 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top