0 Replies Latest reply on Jun 22, 2012 8:26 PM by 945355

    jvisualvm errors in Java 1.7 on Linux

      Dear Forum,

      Trying to track down a memory leak in my software with jvisualvm. I'm getting errors in the text output of the application I'm profiling.

      Multiple of :
      Profiler Agent Warning: Invalid declaringClass obtained from jmethodID
      Profiler Agent Warning: mId = 0x3530f88, *mId = 0
      Profiler Agent Warning: dCl = 0x2795e98, *dCl = 57536

      Soon afterward I get this message repeated frequently.
      *** Profiler engine warning: class sun.reflect.GeneratedConstructorAccessor1 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@2bf59432, its class = class sun.reflect.DelegatingClassLoader, index = 63, hashcode = 737514546
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedConstructorAccessor1
      *** probably it has been unloaded recently

      Afterwards, memory allocations totals are off significantly (taking into account recording only every 10 allocations) compared to heap totals. According to online posts, this behavior was in the Netbeans profiler ~2007 and was the result of dynamically generated classes being garbage collected before they were profiled, causing the crash. However, I'm not using dynamic classes. Also, at least one class not showing up in the profiler (one with a one memory leak I fixed) was a strictly normal class with no inner classes or other unusual class definition.

      Any advice on how to proceed with this would be great.

      Daniel McEnnis.