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 203598 - Obsolete heap dump left in userdir
Summary: Obsolete heap dump left in userdir
Status: NEW
Alias: None
Product: ide
Classification: Unclassified
Component: Exceptions Reporter (show other bugs)
Version: 7.2.1
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Hurka
URL:
Keywords:
: 206320 (view as bug list)
Depends on: 167163
Blocks:
  Show dependency tree
 
Reported: 2011-10-12 12:47 UTC by Tomas Hurka
Modified: 2015-07-10 15:46 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
old heap dump left in nbproject (116.67 KB, image/png)
2012-12-20 05:29 UTC, rov63rus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Hurka 2011-10-12 12:47:09 UTC
NetBeans is running with  -XX:+HeapDumpOnOutOfMemoryError. When OOME occurs, JVM dumps heap dump into a predefined file in the userdir. This file is never deleted. Which means that OOME can be reported only once, for all other subsequent OOME heap dump is not written since the file is already there. What is even worse that those subsequent OOME are reported to statistics server, with the old heap dump. The one, which caused the first OOME. 

There are several possibilities what to do. The most important thing to fix is to avoid reporting OOME with invalid (old) heap dump. This can be fixed by removing heap dump either in the launcher or by code which reports OOME, once the heap  dump is uploaded to the server.
The ideal solution would be to report OOME after IDE restart and not in the same run, where OOME occurred, since in that context IDE is short of memory and OOME reporting itself can fail with another OOME.
Comment 1 Tomas Danek 2011-10-18 13:22:53 UTC
Agree. i think proper fix is to rename existing heapdump during IDE start (e.g. with extension .old). This would fix the problem as well as also create space for implementing ideal solution as suggested.
Comment 2 Antonin Nebuzelsky 2011-10-20 16:52:58 UTC
First part fixed - launchers rename the old heap dump (if found) to .old
http://hg.netbeans.org/core-main/rev/0039652e1937

Decreasing to P3 and reassigning to exceptionreporter to take care of reporting the old heap dump as appropriate.
Comment 3 Quality Engineering 2011-10-24 14:04:57 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/0039652e1937
User: Antonin Nebuzelsky <anebuzelsky@netbeans.org>
Log: #203598: Obsolete heap dump left in userdir (partial - renaming old heapdump to .old)
Comment 4 rov63rus 2012-12-20 05:29:54 UTC
Created attachment 129566 [details]
old heap dump left in nbproject
Comment 5 Marian Mirilovic 2013-07-11 15:56:57 UTC
The second part of issue will be covered by off-line mode of ER, see issue 167163
Comment 6 Marian Mirilovic 2013-07-11 15:58:10 UTC
*** Bug 206320 has been marked as a duplicate of this bug. ***