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 209936 - Memory leak?
Summary: Memory leak?
Status: RESOLVED INCOMPLETE
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
: 209995 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-22 14:32 UTC by stefan79
Modified: 2012-05-30 11:14 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Log-File. (651.03 KB, application/octet-stream)
2012-03-22 14:33 UTC, stefan79
Details
Thread-Dump (33.76 KB, application/octet-stream)
2012-03-22 14:33 UTC, stefan79
Details
Screenhot of the Heap-Dump. (122.26 KB, image/png)
2012-03-22 14:35 UTC, stefan79
Details
Binary patch for testing (12.08 KB, application/java-archive)
2012-03-27 15:47 UTC, Jan Lahoda
Details
Log-File. (1.12 MB, application/octet-stream)
2012-03-30 07:23 UTC, stefan79
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stefan79 2012-03-22 14:32:36 UTC
[ BUILD # : 201203210400 ]
[ JDK VERSION : 1.7.3 ]

I´ve started NB today at morning.

After some hours, NB doesn´t responses and needs very much memory (1,5GB).
Comment 1 stefan79 2012-03-22 14:33:28 UTC
Created attachment 117085 [details]
Log-File.
Comment 2 stefan79 2012-03-22 14:33:56 UTC
Created attachment 117086 [details]
Thread-Dump
Comment 3 stefan79 2012-03-22 14:35:41 UTC
Created attachment 117087 [details]
Screenhot of the Heap-Dump.
Comment 4 stefan79 2012-03-22 17:41:17 UTC
Heap-Dump (400MB compressed; 2GB uncompressed) is available at:
http://www.MegaShare.com/4043787
Comment 5 stefan79 2012-03-23 14:23:47 UTC
There´s something wrong:
I´ve startet NetBeans and after scanning has finished, I made a Heap-Dump:
http://www.MegaShare.com/4047387 (43MB)

40 Minutes later (after working on java-classes), the IDE becomes unresponseable and I produced the second SnapShot:
http://www.MegaShare.com/4047436 (340MB)

After that, I had to kill NB (no response).
Comment 6 Petr Cyhelsky 2012-03-27 12:09:59 UTC
ressigning to java/source
Comment 7 Jan Lahoda 2012-03-27 15:46:50 UTC
Hi Stefan,

I am going to attach a binary patch. It would be very helpful if you could run with it, check the log if it contains a stack trace beginning with "java.lang.Exception: #209936:", and send such a log back to us. This should move us closer to understanding what is going wrong.

Please place the jar into ${NETBEANS_INSTALL_DIR}/java/modules/patches/org-netbeans-libs-javacimpl (java/modules directory should exist, patches/org-netbeans-libs-javacimpl will likely need to be created) and then start the IDE.
The IDE should print something like this on start:
INFO [org.netbeans.core.startup.NbEvents]: Module patch or custom extension: .../java/modules/patches/org-netbeans-libs-javacimpl/209936.jar

To remove the patch, simply delete the jar.

Thanks.
Comment 8 Jan Lahoda 2012-03-27 15:47:19 UTC
Created attachment 117355 [details]
Binary patch for testing
Comment 9 stefan79 2012-03-30 07:23:21 UTC
Created attachment 117520 [details]
Log-File.

At Line 2370, I found this exception: "java.lang.Exception: #209936: file:/E:/Refactore/src/projekte/Allgemein/FirmaVw/JVarianten.java/200"
Comment 10 Jan Lahoda 2012-04-02 16:11:19 UTC
(In reply to comment #9)
> Created attachment 117520 [details]
> Log-File.
> 
> At Line 2370, I found this exception: "java.lang.Exception: #209936:
> file:/E:/Refactore/src/projekte/Allgemein/FirmaVw/JVarianten.java/200"

Thanks for the log. Unfortunately, it is not exactly what we have hoped for - all the stack traces show its invoked from refactoring/find usages. For this and other "bulk" operations, it is OK to parse many files inside one instance of javac, as the amount of free memory is checked automatically and if too much memory is consumed, the given instance of javac is thrown away and a new one is created. Your problems were caused by a long-living instance of javac keeping a lot of parsed sources, and we were hoping the logs will reveal how the parsed sources got there.

Does the problem with near-OOME situation still happen to you? A log produced by the IDE while it gets into the situation would be very welcome.

Thanks.
Comment 11 Jan Lahoda 2012-05-30 08:06:34 UTC
I am afraid that we need the log when this happens without relation to refactoring (or confirmation that the (nearly-)OOME situation happens only in relation to refactoring).

Thanks.
Comment 12 Petr Cyhelsky 2012-05-30 11:14:15 UTC
*** Bug 209995 has been marked as a duplicate of this bug. ***