History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: JBAS-4593
Type: Bug Bug
Status: Closed Closed
Resolution: Done
Priority: Major Major
Assignee: Scott M Stark
Reporter: Mike Millson
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JBoss Application Server

Leak in org/jboss/mx/loading/UnifiedClassLoader3

Created: 06/Aug/07 05:23 PM   Updated: 28/Aug/07 10:58 AM
Component/s: ClassLoading
Affects Version/s: JBossAS-4.0.5.GA
Fix Version/s: JBossAS-5.0.0.Beta3 , JBossAS-4.2.2.GA
Security Level: Public (Everyone can see)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

JBoss Forum Reference: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=116213
Help Desk Ticket Reference: https://na1.salesforce.com/50030000003PipZ


 Description  « Hide
[description pasted from support case]

After many redeploys of applications, we have JVMs failing with "OutOfMemory perm gen" errors. We have installed the JBoss profiler, and taken heap dumps when the JVM is close to failing (after deploying and undeploying an application ~30 times). By searching for classloaders that have "com.XXX" classes loaded, and then searching for paths to heap roots from those classloaders, we have identified what we believe to be a leak associated with instances of org/jboss/mx/loading/UnifiedClassLoader3. Specifically, we see strong paths to heap roots like the following:

found a path to the target: 26093 (depth: 5)
0 0 Heap root
26636 0 Instance: Lcom/sun/jmx/remote/internal/ArrayNotificationBuffer;
124809 0 Instance: Lcom/sun/jmx/remote/internal/ArrayQueue;
160611 0 Instance: [Ljava/lang/Object;
161523 0 Instance: Lcom/sun/jmx/remote/internal/ArrayNotificationBuffer$NamedNotification;
217357 0 Instance: Ljavax/management/Notification;
26093 26106 Instance: Lorg/jboss/mx/loading/UnifiedClassLoader3;

So, even though our application is undeployed, strong paths from their classloaders to heap roots exist.

Specifically, it appears that this might be related to registering the classloader to receive JMX notifications and not unregistering it on an application undeploy. Please advise on what you think is the best strategy for resolving this problem.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order:
Brian Stansberry [15/Aug/07 04:24 PM]
Opened a forum thread with some preliminary diagnostic info.

Scott M Stark [25/Aug/07 12:33 AM]
Added a org.jboss.mx.loading.UnifiedLoaderRepository.notifyMode system property that controls how whether a jmx notification is sent, if done, whether the class loader is wrapped in a WeakReference. It should be set to one of 0, 1 or 2:
   // Send notification with the ClassLoader as the user data
   private static int LEGACY_MODE = 0;
   // Send notification with the ClassLoader as the user data wrapped in a WeakReference
   private static int WEAK_REFERENCE_MODE = 1;
   // Don't send any notifications
   private static int NO_NOTIFICATION_MODE = 2;

The default is the LEGACY_MODE.