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 212702 - Memory Leak?
Summary: Memory Leak?
Status: RESOLVED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Performance (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P2 normal with 3 votes (vote)
Assignee: Tomas Hurka
URL:
Keywords: PERFORMANCE
Depends on: 212771 213617
Blocks:
  Show dependency tree
 
Reported: 2012-05-18 13:22 UTC by stefan79
Modified: 2012-06-11 06:52 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot: Windows that are still opened. (153.05 KB, image/png)
2012-05-21 11:10 UTC, stefan79
Details
Screenshot: NB7.1.2 vs. 7.2 (261.35 KB, image/png)
2012-06-04 11:10 UTC, stefan79
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stefan79 2012-05-18 13:22:26 UTC
Memory is growing while working.

The HeapDump´s are available at: http://www.MegaShare.com/4232313

My test was:
-) Started NetBeans, waited until Scanning Projects has finished and closed NeBeans
-) Startet NetBeans again, closed all open Documents, pressed Memory-Button(GC) and created a Heap-Dump
   -> Total bytes: 348.826.711 -> "heapdump1..."
-) Then I worked about 2 hours, closed all open Documents, made GC and created a Heap-Dump
   -> Total bytes: 422.328.176 -> "heapdump2..."
-) 2 hours later again
   -> Total bytes: 437.486.565 -> "heapdump3..."


Tested at:
Product Version: NetBeans IDE Dev (Build 201205170950)
Java: 1.7.0_03; Java HotSpot(TM) 64-Bit Server VM 22.1-b02
System: Windows 7 version 6.1 running on amd64; Cp1252; de_DE (nb)
Comment 1 stefan79 2012-05-18 15:56:57 UTC
After 8 hours of work I´ve:
Total bytes: 516.200.022

Upload is available at:
http://www.file-upload.net/download-4371838/heapdump-8hAfterStarting.rar.html


--

Bevor I closed NetBeans is made again a Heapdump:
Total bytes: 515.109.011

Upload is available at:
http://www.file-upload.net/download-4371845/heapdump-EndOfDay.rar.html
Comment 2 Petr Cyhelsky 2012-05-21 10:25:31 UTC
Thank you for heap dumps, they are very helpful. Just few questions:
You have written, that you closed all documents, does it mean that you closed only open sources or, does it mean that you closed all the documents and everything associated with them - like various versioning stuff, diffs, find usages, etc. and also deleted breakpoints, etc...maybe it would be cool to also include screenshots, so that it can be seen what exactly remains open.

It seems, there are numerous possible leaks in these heap dumps, so this issue will serve as umbrella for them and new issue will be filed for each potential/real leak..
Comment 3 stefan79 2012-05-21 11:10:11 UTC
(In reply to comment #2)
> Thank you for heap dumps, they are very helpful. Just few questions:
> You have written, that you closed all documents, does it mean that you closed
> only open sources or, does it mean that you closed all the documents and
> everything associated with them - like various versioning stuff, diffs, find
> usages, etc. and also deleted breakpoints, etc...maybe it would be cool to also
> include screenshots, so that it can be seen what exactly remains open.
I only closed the sources.
"Search Results", "Usages", "Output", "CVS", "Test Results" and "Breakpoints" are still opened.
Comment 4 stefan79 2012-05-21 11:10:57 UTC
Created attachment 119682 [details]
Screenshot: Windows that are still opened.
Comment 5 Petr Cyhelsky 2012-05-22 08:30:08 UTC
Can you please attach another couple of heapdumps from the end of your workday?

1st should be after you close all editor tabs and invoke GC a few times.
2nd should be after you close all the bottom windows - like find usages, search, versioning, test results, etc..
Comment 6 stefan79 2012-05-22 08:55:33 UTC
Yesterday I tried it again at current build, but closed all the windows at bottom (Find Usages, ..).

Heap-Dump after Start:
    Total bytes: 350.221.776
    Total classes: 14.263
    Total instances: 3.641.789
    Classloaders: 729
    GC roots: 4.354

Heap-Dump before Closing (after 6 hours work):
    Total bytes: 494.428.546
    Total classes: 25.672
    Total instances: 5.771.229
    Classloaders: 1.037
    GC roots: 5.650

Available at http://www.MegaShare.com/4250138 (+Screenshot, what´s closed).

I also tried to let NetBeans open (over night=13 hours) and made today morning also a Heap-Dump. But I think this isn´t really interesseting:
    Total bytes: 497.408.268
    Total classes: 25.702
    Total instances: 5.800.427
    Classloaders: 1.027
    GC roots: 5.668
Is available at: http://www.MegaShare.com/4250185


-
Product Version: NetBeans IDE Dev (Build 201205200400)
Java: 1.7.0_03; Java HotSpot(TM) 64-Bit Server VM 22.1-b02
System: Windows 7 version 6.1 running on amd64; Cp1252; de_DE (nb)
Comment 7 stefan79 2012-05-22 16:54:18 UTC
I haven´t closed NetBeans and today after Work, I created again a heap-dump.

    Total bytes: 618.324.460
    Total classes: 31.806
    Total instances: 7.832.981
    Classloaders: 1.009
    GC roots: 6.037

Upload is available at: http://www.MegaShare.com/4251867
Comment 8 stefan79 2012-05-23 16:59:15 UTC
-) 3.Day-Morning (NetBeans was running over nigth):
 Total bytes: 611.787.615
    Total classes: 31.726
    Total instances: 7.661.017
    Classloaders: 928
    GC roots: 6.055

  http://www.MegaShare.com/4255541

-) 3.Day-After Work (running 54hours running).

  Total bytes: 773.731.801
    Total classes: 33.926
    Total instances: 10.285.944
    Classloaders: 1.153
    GC roots: 6.237

  http://www.MegaShare.com/4258036

--
Now I´ve closed NetBeans, because the latest hours NB was very slow (I think there was much time at GC).
Comment 9 stefan79 2012-06-04 11:10:01 UTC
Created attachment 120304 [details]
Screenshot: NB7.1.2 vs. 7.2
Comment 10 stefan79 2012-06-04 11:13:12 UTC
Please forget the attachement "Screenshot: NB7.1.2 vs. 7.2".
(FF selected the next Issue).
Comment 11 Tomas Hurka 2012-06-11 06:52:07 UTC
Found memory leaks was fixed - see depending issues. Closing.