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

jvisualvm misreports memory usage, causes error output in profiled application

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 7
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      linux_ubuntu

      Description

      FULL PRODUCT VERSION :
      java version "1.7.0"
      Java(TM) SE Runtime Environment (build 1.7.0-b147)
      Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Linux collab-dev-401 2.6.32-36-server #79-Ubuntu SMP Tue Nov 8 22:44:38 UTC 2011 x86_64 GNU/Linux

      A DESCRIPTION OF THE PROBLEM :
      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 in jvisualvm profiling do not contain some classes in my application and 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 in any used class. (The GUI has a couple of dynamic listeners, but I'm running on the command line.) 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.

      Daniel McEnnis.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Lode the code, execute jvisualvm, change to record stack allocation, start profiling.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      All used classes showing up in the jvisualvm trace. Total reported memory in the profile is 1/10 of reported heap used. No error reports in the text output of the application.
      ACTUAL -
      Some classes are missing from the jvisualvm profiling and the memory used by these classes is not reported.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Profiler Agent: JNI On Load Initializing...
      Profiler Agent: JNI OnLoad Initialized successfully
      Profiler Agent: Waiting for connection on port 5140 (Protocol version: 10)
      Profiler Agent: Established connection with the tool
      Profiler Agent: Local accelerated session
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor13 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@407f5d73, its class = class sun.reflect.DelegatingClassLoader, index = 3, hashcode = 1082088819
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor13
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor10 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@6d6ca71b, its class = class sun.reflect.DelegatingClassLoader, index = 4, hashcode = 1835837211
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor10
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor23 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@4f18dc06, its class = class sun.reflect.DelegatingClassLoader, index = 5, hashcode = 1327029254
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor23
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor17 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@17ca54d7, its class = class sun.reflect.DelegatingClassLoader, index = 8, hashcode = 399135959
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor17
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor12 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@4d97af63, its class = class sun.reflect.DelegatingClassLoader, index = 13, hashcode = 1301786467
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor12
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor5 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@552d8f7d, its class = class sun.reflect.DelegatingClassLoader, index = 14, hashcode = 1429049213
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor5
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor18 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@6890e6ac, its class = class sun.reflect.DelegatingClassLoader, index = 20, hashcode = 1754326700
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor18
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor19 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@3ad64585, its class = class sun.reflect.DelegatingClassLoader, index = 21, hashcode = 987121029
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor19
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor11 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@6257211d, its class = class sun.reflect.DelegatingClassLoader, index = 22, hashcode = 1649877277
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor11
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor24 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@7adb929d, its class = class sun.reflect.DelegatingClassLoader, index = 24, hashcode = 2061210269
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor24
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor2 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@d59712f, its class = class sun.reflect.DelegatingClassLoader, index = 26, hashcode = 223965487
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor2
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor28 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@4662c503, its class = class sun.reflect.DelegatingClassLoader, index = 28, hashcode = 1180878083
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor28
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor9 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@702fa2d1, its class = class sun.reflect.DelegatingClassLoader, index = 29, hashcode = 1882170065
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor9
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor25 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@17cdddad, its class = class sun.reflect.DelegatingClassLoader, index = 30, hashcode = 399367597
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor25
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor7 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@7231eca1, its class = class sun.reflect.DelegatingClassLoader, index = 32, hashcode = 1915874465
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor7
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor1 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@11defb6c, its class = class sun.reflect.DelegatingClassLoader, index = 33, hashcode = 299826028
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor1
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor22 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@2b8ad68b, its class = class sun.reflect.DelegatingClassLoader, index = 34, hashcode = 730519179
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor22
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor20 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@6462d639, its class = class sun.reflect.DelegatingClassLoader, index = 35, hashcode = 1684198969
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor20
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor15 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@531d4b84, its class = class sun.reflect.DelegatingClassLoader, index = 37, hashcode = 1394428804
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor15
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor27 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@5c160db3, its class = class sun.reflect.DelegatingClassLoader, index = 39, hashcode = 1544949171
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor27
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor21 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@6ef4e59b, its class = class sun.reflect.DelegatingClassLoader, index = 40, hashcode = 1861543323
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor21
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor14 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@869f335, its class = class sun.reflect.DelegatingClassLoader, index = 41, hashcode = 141161269
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor14
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor4 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@2dbce75b, its class = class sun.reflect.DelegatingClassLoader, index = 43, hashcode = 767354715
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor4
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor3 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@63e3b913, its class = class sun.reflect.DelegatingClassLoader, index = 44, hashcode = 1675868435
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor3
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor6 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@13c7f111, its class = class sun.reflect.DelegatingClassLoader, index = 45, hashcode = 331870481
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor6
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor8 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@3330a97e, its class = class sun.reflect.DelegatingClassLoader, index = 46, hashcode = 858827134
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor8
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor29 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@666c7f5a, its class = class sun.reflect.DelegatingClassLoader, index = 47, hashcode = 1718386522
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor29
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedSerializationConstructorAccessor26 that should be instrumented is not loaded by target VM
      *** Requested classloader: sun.reflect.DelegatingClassLoader@2a28aef7, its class = class sun.reflect.DelegatingClassLoader, index = 50, hashcode = 707309303
      *** Profiler engine warning: target VM cannot load class to instrument sun.reflect.GeneratedSerializationConstructorAccessor26
      *** probably it has been unloaded recently
      *** Profiler engine warning: class sun.reflect.GeneratedConstructorAccessor1 that should be instrumented is not loaded by target VM
      *** Requested


      ( This report has more than 16,000 characters and has been truncated. )

        Attachments

          Activity

            People

            Assignee:
            thurka Tomáš Hůrka
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: