Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 203598 - Obsolete heap dump left in userdir
Obsolete heap dump left in userdir
Status: NEW
Product: ide
Classification: Unclassified
Component: Exceptions Reporter
All All
: P3 (vote)
: 8.0
Assigned To: Tomas Hurka
: 206320 (view as bug list)
Depends on: 167163
  Show dependency treegraph
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

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

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

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'
User: Antonin Nebuzelsky <>
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. ***

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo