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 104415 - Need tools in the Heap Walker for tracking down PermGen problems
Summary: Need tools in the Heap Walker for tracking down PermGen problems
Status: NEW
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-21 14:51 UTC by _ gsporar
Modified: 2007-05-21 14:51 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gsporar 2007-05-21 14:51:31 UTC
The new Heap Walker in NB 6 is not very useful for tracking down problems in 
PermGen - specifically when PermGen fills up with class objects because of a 
class loader that cannot be removed from the heap.  This typically happens in 
container environments (either web containers like Tomcat or full-blown 
application servers like GlassFish).

For a full description of a typical PermGen problem, see this blog entry: 
http://weblogs.java.net/blog/gsporar/archive/2007/05/tracking_down_m_1.html, 
which has a link to an article on the topic.

Using the simple sample application from that article and running on Tomcat it 
is possible (after deploying and then undeploying the application) to produce a 
binary heap dump that contains a class object for the Leak class.  It shows up 
in the list of classes, and has an instance count of 0.

Without some additional tools the user has no way to figure out why that Leak 
class object is in PermGen.  The exact feature set required in those additional 
tools is somewhat TBD :-)

But at a minimum, the Heap Walker should provide some of the features that are 
now in the jhat utility.  For an example, check out this enhancement that was 
put into jhat for JDK 6 Update 1: http://bugs.sun.com/bugdatabase/view_bug.do?
bug_id=6484556.  It is based on the work of Frank Kieviet.

Edward Chou has done additional work on modifying jhat in order to provide 
tools that help make it easier to track down PermGen problems.  Hopefully those 
will be put into future versions of jhat, but they might also be useful ideas 
for the Heap Walker - for more information see 
http://blogs.sun.com/edwardchou/entry/javaone_bof_on_memory_leaks and 
http://blogs.sun.com/edwardchou/entry/find_orphaned_classloaders.