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 252183 - Create heap dump for "OutOfMemoryError: unable to create new native thread"
Summary: Create heap dump for "OutOfMemoryError: unable to create new native thread"
Status: RESOLVED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Logger (show other bugs)
Version: 8.1
Hardware: All All
: P1 normal (vote)
Assignee: Tomas Hurka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-30 14:35 UTC by Tomas Hurka
Modified: 2015-05-07 03:27 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Proposed patch (3.24 KB, patch)
2015-04-30 14:43 UTC, Tomas Hurka
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Hurka 2015-04-30 14:35:05 UTC
JVM flag -XX:+HeapDumpOnOutOfMemoryError does not create heap dump in case of "OutOfMemoryError: unable to create new native thread". It makes sense since this error is not really out of memory error, but exhaustion of native thread resource. However there is several hundreds of this reports in exception reporter and messages.log with last exception does not provide sufficient information to find out who creates several thousands of native threads. 
To get more information, uihandler module can heap dump itself if it finds out that there was OOME and there is no heap dump file. This way OOME will be reported with the heap dump. As a proof of concept see this exception report: http://statistics.netbeans.org/exceptions/exception.do?id=776809
Comment 1 Tomas Hurka 2015-04-30 14:43:14 UTC
Created attachment 153478 [details]
Proposed patch
Comment 2 Tomas Hurka 2015-05-06 14:24:30 UTC
Done in profiler-main

changeset:   286932:8563c3c60a24
user:        Tomas Hurka <thurka@netbeans.org>
date:        Wed May 06 16:23:29 2015 +0200
summary:     issue #252183, try to create heap dump if none was created by OOME
Comment 3 Quality Engineering 2015-05-07 03:27:04 UTC
Integrated into 'main-silver', will be available in build *201505070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/8563c3c60a24
User: Tomas Hurka <thurka@netbeans.org>
Log: issue #252183, try to create heap dump if none was created by OOME