-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
5.0
-
x86
-
linux
FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
1. Run the MBeanServer in Linux
2. Register an MBean to the server (Let the MBean method takes a custom object as a parameter)
3. Invoke that MBean from a client using RMI connector
For every invocation, the OrderClassLoader reference is getting leaked .
The leak happens when umarshalling happens in the RMI layer
REPRODUCIBILITY :
This bug can be reproduced always.
Submitter writes:
During the unwrapping of the object
The following line is getting executed (From javax.management.remote.rmi.RMIConnectionImpl.java
private static <T> T unwrap(final MarshalledObject mo,
final ClassLoader cl1,
final ClassLoader cl2,
final Class<T> wrappedClass)
{
// ....
return unwrap(mo, new OrderClassLoaders(cl1, cl2), wrappedClass);
}
When i profiled .. i found the instances that are created here are not getting garbage collected.. even after full GC.
This happens only in linux... when i tried the same in windows then i am not able to see the references in the profiler ... they are getting garbage collected ...
The MBean that i registered with the JMX server is taking some custom object
a method like
public void myMethod(MyObject obj)
{
}
A DESCRIPTION OF THE PROBLEM :
1. Run the MBeanServer in Linux
2. Register an MBean to the server (Let the MBean method takes a custom object as a parameter)
3. Invoke that MBean from a client using RMI connector
For every invocation, the OrderClassLoader reference is getting leaked .
The leak happens when umarshalling happens in the RMI layer
REPRODUCIBILITY :
This bug can be reproduced always.
Submitter writes:
During the unwrapping of the object
The following line is getting executed (From javax.management.remote.rmi.RMIConnectionImpl.java
private static <T> T unwrap(final MarshalledObject mo,
final ClassLoader cl1,
final ClassLoader cl2,
final Class<T> wrappedClass)
{
// ....
return unwrap(mo, new OrderClassLoaders(cl1, cl2), wrappedClass);
}
When i profiled .. i found the instances that are created here are not getting garbage collected.. even after full GC.
This happens only in linux... when i tried the same in windows then i am not able to see the references in the profiler ... they are getting garbage collected ...
The MBean that i registered with the JMX server is taking some custom object
a method like
public void myMethod(MyObject obj)
{
}