Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6823077

memory leak when making RMI invocation for JMX

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 5.0
    • core-svc

      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)
      {

      }

            jbachorik Jaroslav BachorĂ­k
            emcmanus Eamonn McManus
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: