Fully featured low overhead profiler for Java EE and Java SE platforms.
Performance monitoring and profiling of Jenkins, TeamCity, Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

Unknown GC roots, any hints?

Moderators: Vladimir Kondratyev, Anton Katilin

Unknown GC roots, any hints?

Postby plethora » Thu Jun 02, 2005 8:43 pm

My apologies if this is a beginner question, and not related to the EAP. (Perhaps a 'general' or 'users' forum would be a nice addition?)

I'm using the following configuration:
-YourKit 4.5 EAP build 610
-Sun JDK 1.5.0_03 on Win 2000
-Tomcat 5.5.9

I'm trying to debug webapp classloader leaks that we're seeing on redeployment.

All the leaked classloaders (org.apache.catalina.loader.WebappClassloader) are marked as "Unknown" GC roots).

Is there any way get more information who's referencing there classes?
plethora
 
Posts: 314
Joined: Thu Jun 02, 2005 8:36 pm

Postby Anton Katilin » Fri Jun 03, 2005 1:38 pm

Hello,

If some objects are marked as roots ("Unknown" in this case), that means JVM has reported them as roots.

Is this reproducible with only your application, or with e.g. Tomcat examples as well?

We are investigating this issue.

Best regards,
Anton
Anton Katilin
 
Posts: 5966
Joined: Wed Aug 11, 2004 8:37 am

Postby plethora » Thu Jun 30, 2005 8:17 pm

Hello Anton,

I don't have a reproducible testcase using the Tomcat sample applications.
However, I have something that is (I hope) almost as good:

A sample WAR file containing:
-spring.jar
-commons-logging.jar
-log4j.jar
-minimal web.xml
-minimal log4j.properties
-minimal leak-servlet.xml (Spring framework servlet context configuration)

Please note that this WAR file contains no custom classes at all (just the libraries mentioned above).

In essence, the WAR file contains a very basic Spring framework configuration, some logging, and nothing more.

I have been doing deployment tests with this WAR on a 'out of the box' Tomcat 5.5.9 (last stable version) on both JDK 1.5.0_04 and Mustang b42, capturing memory snapshots using EAP release 618.

Please let me know how I can provide the sample WAR and/or snapshots to you, if you are interested.

The behaviour that I see it that the (Tomcat/Catalina) WebappClassloader that loads my webapplication is marked as an "Unknown" GC root. This manifests itself when I undeploy the application using the Tomcat HTML manager app: while the application is removed from the list, a lot of data is kept referenced in memory, showing the particular WebappClassloader as a GC root.

I don't understand the "what" and "why" of JVMTI 'Unknown' roots. Do these indicate a JVM bug or am I just reading the results without the right knowledge and experience? Isn't the whole point of modern virtualized execution environments like the JVM to get rid of the 'unknown' in memory management?
:?
plethora
 
Posts: 314
Joined: Thu Jun 02, 2005 8:36 pm


Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 1 guest

cron

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.