This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 62342 - Huge memory leak (Hundreds of megabytes) in javacore
Summary: Huge memory leak (Hundreds of megabytes) in javacore
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: issues@java
URL:
Keywords: PERFORMANCE
: 60361 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-16 08:46 UTC by Petr Nejedly
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Nejedly 2005-08-16 08:46:35 UTC
I've got a report and INSANE dump for a OOME on >400MB heap. The reporter
claims to have only ~2 JDK source bases opened.
The dump is over 2GB in size, but most of the heap usage is caused by hundreds
of thousands of javac objects.
They are all* held through the following chain:
org.netbeans.modules.javacore.parser.ElementInfo$CachedReference.CACHE->
org.netbeans.modules.javacore.parser.ElementInfo$Cache@b3e0f6d->
[Lorg.netbeans.modules.javacore.parser.MDRParser;@1f2e218d->
org.netbeans.modules.javacore.parser.MDRParser@1bdbdef5->
org.netbeans.jmi.javamodel.Resource$Impl@6b7c46d->
org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl$ErrorList@102adf05->
java.util.ArrayList@25942ed->
[Ljava.lang.Object;@13576cfd->
org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl$ErrorInfoImpl@e566ab5->
...

*) I let INSANE trace back references to >3000 (out of ~26000) instances of
Scope$Entry and all of them have at least above mentioned chain head identical.

I can provide you the heap dump, but you'll probably need a dedicated beefy
machine for playing with it...
Comment 1 Tomas Hurka 2005-08-16 09:45:06 UTC
This is caused by the fact that arguments of error message in ErrConsumer.pushError contains javac 
semantic symbols. This will be fixed by converting this semantic symbols to Strings.
Comment 2 Tomas Hurka 2005-08-16 14:02:24 UTC
Fixed in trunk.
Checking in external/gjast.jar.scrambled;
/cvs/java/external/gjast.jar.scrambled,v  <--  gjast.jar.scrambled
new revision: 1.110; previous revision: 1.109
done
Checking in parser/src/org/netbeans/lib/java/parser/ErrConsumer.java;
/cvs/java/parser/src/org/netbeans/lib/java/parser/ErrConsumer.java,v  <--  ErrConsumer.java
new revision: 1.4; previous revision: 1.3
done
Checking in javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java,v  <--  
ResourceImpl.java
new revision: 1.91; previous revision: 1.90
done
Comment 3 Pavel Flaska 2005-09-21 12:42:00 UTC
*** Issue 60361 has been marked as a duplicate of this issue. ***
Comment 4 Max Sauer 2007-02-14 15:04:03 UTC
Marking as verified. Obsolete since retouche intergration.
---
NetBeans IDE Dev (Build 070214)
1.6.0; Java HotSpot(TM) Server VM 1.6.0-b105
Linux version 2.6.12-1.1390_FC4smp running on i386
en_US (nb); UTF-8
Comment 5 Quality Engineering 2007-09-20 09:58:12 UTC
Reorganization of java component