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

visualvm ClassNotFoundException on CPU profile

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8u20
    • 8u5
    • tools
    • b14
    • x86
    • os_x

      FULL PRODUCT VERSION :
       java -version
      java version "1.8.0_05"
      Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
      Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      uname -a
      Darwin mb.local 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64


      EXTRA RELEVANT SYSTEM CONFIGURATION :
      printenv |grep -P "JAVA_HOME|JRE_HOME|JAVA_TOOL_OPTIONS|_JAVA_OPTIONS|CLASSPATH|JAVA_COMPILER|PATH|USERNAME|LD_LIBRARY_PATH|LD_PRELOAD|SHELL|DISPLAY|HOSTTYPE|OSTYPE|ARCH|MACHTYPE"
      SHELL=/bin/bash
      PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
      DISPLAY=/tmp/launch-MCUsKw/org.macosforge.xquartz:0

      A DESCRIPTION OF THE PROBLEM :
      visualvm ClassNotFoundException on CPU profile. no profile results are shown in the UI.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      click start CPU profile button, wait a bit after it it not busy then pres stop.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      some output; a CPU profile
      ACTUAL -
      no output.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      -------------------------------------------------------------------------------
      JRE messages:
      macBook> nice /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bin/java -Xshare:off -cp bin Test
      objc[738]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
      Profiler Agent: JNI OnLoad Initializing...
      Profiler Agent: JNI OnLoad Initialized successfully
      Profiler Agent: Waiting for connection on port 5140 (Protocol version: 13)
      Profiler Agent: Established connection with the tool
      Profiler Agent: Local accelerated session
      java.lang.ClassNotFoundException: java/util/LinkedHashMap$KeyIterator
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:259)
      at org.netbeans.lib.profiler.server.ProfilerInterface$InitiateProfilingThread.initiateInstrumentation(ProfilerInterface.java:138)
      at org.netbeans.lib.profiler.server.ProfilerInterface$InitiateProfilingThread.run(ProfilerInterface.java:100)
      Profiler Agent: Connection with agent closed


      -------------------------------------------------------------------------------
      Alt. JRE message:
      java.lang.ClassNotFoundException: java/util/LinkedHashMap$KeyIterator
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:259)
      at org.netbeans.lib.profiler.server.ProfilerInterface$InitiateProfilingThread.initiateInstrumentation(ProfilerInterface.java:138)
      at org.netbeans.lib.profiler.server.ProfilerInterface$InitiateProfilingThread.run(ProfilerInterface.java:100)


      -------------------------------------------------------------------------------
      >Log Session: Monday, June 9, 2014 10:59:01 AM EDT
      >System Info:
        Product Version = Java VisualVM
        Operating System = Mac OS X version 10.9.3 running on x86_64
        Java; VM; Vendor = 1.8.0_05; Java HotSpot(TM) 64-Bit Server VM 25.5-b02; Oracle Corporation
        Runtime = Java(TM) SE Runtime Environment 1.8.0_05-b13
        Java Home = /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre
        System Locale; Encoding = en_US (visualvm); UTF-8
        Home Directory = /Users/timl
        Current Directory = /Users/timl/Documents/eclipse-workspace/Test
        User Directory = /Users/timl/Library/Application Support/visualvm/7u60
        Cache Directory = /Users/timl/Library/Caches/VisualVM/7u60
        Installation = /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/visualvm
                                  /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/profiler
                                  /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform
        Boot & Ext. Classpath = /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/classes:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/System/Library/Java/Extensions/AppleScriptEngine.jar:/System/Library/Java/Extensions/dns_sd.jar:/System/Library/Java/Extensions/j3daudio.jar:/System/Library/Java/Extensions/j3dcore.jar:/System/Library/Java/Extensions/j3dutils.jar:/System/Library/Java/Extensions/jai_codec.jar:/System/Library/Java/Extensions/jai_core.jar:/System/Library/Java/Extensions/mlibwrapper_jai.jar:/System/Library/Java/Extensions/MRJToolkit.jar:/System/Library/Java/Extensions/QTJava.zip:/System/Library/Java/Extensions/vecmath.jar
        Application Classpath = /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform/lib/boot.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform/lib/org-openide-modules.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform/lib/org-openide-util-lookup.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform/lib/org-openide-util.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform/lib/locale/boot_ja.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform/lib/locale/boot_zh_CN.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform/lib/locale/org-openide-modules_ja.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform/lib/locale/org-openide-modules_zh_CN.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform/lib/locale/org-openide-util-lookup_ja.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform/lib/locale/org-openide-util-lookup_zh_CN.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform/lib/locale/org-openide-util_ja.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform/lib/locale/org-openide-util_zh_CN.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/tools.jar
        Startup Classpath = /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform/core/core.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform/core/org-openide-filesystems.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform/core/locale/core_ja.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform/core/locale/core_zh_CN.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform/core/locale/org-openide-filesystems_ja.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform/core/locale/org-openide-filesystems_zh_CN.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/visualvm/core/com-sun-tools-visualvm-modules-startup.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/visualvm/core/locale/com-sun-tools-visualvm-modules-startup_ja.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/visualvm/core/locale/com-sun-tools-visualvm-modules-startup_zh_CN.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/visualvm/core/locale/core_visualvm.jar
      -------------------------------------------------------------------------------
      INFO [org.netbeans.core.startup.NbEvents]: Turning on modules:
      org.openide.util.lookup [8.19.1 20130911-unknown-revn]
      org.openide.util [8.29.3 20130911-unknown-revn]
      org.openide.modules [7.35.1 20130911-unknown-revn]
      org.netbeans.api.annotations.common/1 [1.17.1 20130911-unknown-revn]
      org.openide.filesystems [8.5.1 20130911-unknown-revn]
      org.openide.awt [7.55.1 20130911-unknown-revn]
      org.netbeans.api.progress/1 [1.32.1 20130911-unknown-revn]
      org.openide.dialogs [7.28.1 20130911-unknown-revn]
      org.openide.nodes [7.33.2 20130911-unknown-revn]
      org.openide.windows [6.60.1 20130911-unknown-revn]
      org.netbeans.modules.editor.mimelookup/1 [1.29.1 20130911-unknown-revn]
      org.openide.text [6.54.2 20130911-unknown-revn]
      org.netbeans.swing.tabcontrol [1.42.1 20130911-unknown-revn]
      org.netbeans.swing.outline [1.23.3 20130911-unknown-revn]
      org.openide.explorer [6.50.3 20130911-unknown-revn]
      org.openide.actions [6.29.1 20130911-unknown-revn]
      org.netbeans.modules.queries/1 [1.32.1 20130911-unknown-revn]
      org.openide.loaders [7.44.3 20130911-unknown-revn]
      org.openide.io [1.35.1 20130911-unknown-revn]
      org.netbeans.swing.plaf [1.30.1 20130911-unknown-revn]
      org.netbeans.spi.quicksearch [1.17.1 20130911-unknown-revn]
      org.netbeans.bootstrap/1 [2.56.2 20130911-unknown-revn]
      org.netbeans.core.startup/1 [1.47.2 20130911-unknown-revn]
      org.netbeans.modules.settings/1 [1.38.2 20130911-unknown-revn]
      org.netbeans.modules.sendopts/2 [2.25.1 20130911-unknown-revn]
      org.netbeans.modules.sampler [1.4.1 20130911-unknown-revn]
      org.netbeans.modules.progress.ui [1.23.1 20130911-unknown-revn]
      org.netbeans.modules.profiler.utilities/1 [1.25.1 20130911-unknown-revn]
      org.netbeans.lib.profiler/1 [1.23.2 20130911-unknown-revn]
      org.netbeans.lib.profiler.charts/1 [1.17.1 20130911-unknown-revn]
      org.netbeans.lib.profiler.common/1 [1.23.1 20130911-unknown-revn]
      org.netbeans.modules.profiler.api/1 [1.9.1 20130911-unknown-revn]
      org.netbeans.lib.profiler.ui/1 [1.23.1 20130911-unknown-revn]
      org.netbeans.modules.keyring [1.14.1 20130911-unknown-revn]
      org.netbeans.core/2 [3.37.2 20130911-unknown-revn]
      org.netbeans.modules.options.api/1 [1.31.2 20130911-unknown-revn]
      org.netbeans.modules.profiler.selector.api/1 [1.23.1 20130911-unknown-revn]
      org.netbeans.modules.profiler.attach/2 [2.8.1 20130911-unknown-revn]
      org.netbeans.modules.profiler.selector.ui/1 [1.20.1 20130911-unknown-revn]
      org.netbeans.modules.profiler/2 [2.9.2 20130911-unknown-revn]
      org.netbeans.modules.profiler.snaptracer/1 [1.11.1 20130911-unknown-revn]
      org.netbeans.modules.profiler.oql/2 [2.6.1 20130911-unknown-revn]
      org.netbeans.modules.profiler.heapwalker [1.7.2 20130911-unknown-revn]
      org.netbeans.modules.masterfs/2 [2.41.2 20130911-unknown-revn]
      org.netbeans.modules.keyring.impl [1.10.1 20130911-unknown-revn]
      org.netbeans.modules.editor.mimelookup.impl/1 [1.21.1 20130911-unknown-revn]
      org.netbeans.modules.autoupdate.services [1.39.2 20130911-unknown-revn]
      org.netbeans.modules.autoupdate.ui [1.33.1 20130911-unknown-revn]
      org.netbeans.modules.autoupdate.cli [1.3.1 20130911-unknown-revn]
      org.netbeans.core.windows/2 [2.58.5 20130911-unknown-revn]
      org.netbeans.modules.applemenu/1 [1.27.1 20130911-unknown-revn]
      org.netbeans.core.ui/1 [1.35.1 20130911-unknown-revn]
      com.sun.tools.visualvm.uisupport/0 [1.1 130911]
      com.sun.tools.visualvm.core/0 [1.4 130911]
      com.sun.tools.visualvm.host/0 [1.0 130911]
      com.sun.tools.visualvm.application/0 [1.7 130911]
      com.sun.tools.visualvm.tools/0 [1.3 130911]
      com.sun.tools.visualvm.coredump/0 [1.0 130911]
      com.sun.tools.visualvm.threaddump/0 [1.0 130911]
      com.sun.tools.visualvm.heapdump/0 [1.1 130911]
      com.sun.tools.visualvm.profiling/0 [1.1 130911]
      com.sun.tools.visualvm.sampler [2.1 130911]
      com.sun.tools.visualvm.sa/0 [1.1 130911]
      com.sun.tools.visualvm.modules.startup [1.1 130911]
      com.sun.tools.visualvm.profiler/0 [1.1.1 130911]
      com.sun.tools.visualvm.modules.appui [1.0 130911]
      com.sun.tools.visualvm.jvmstat/0 [1.0 130911]
      com.sun.tools.visualvm.jvm/0 [1.1 130911]
      com.sun.tools.visualvm.jmx/0 [1.2 130911]
      com.sun.tools.visualvm.charts/0 [1.1 130911]
      com.sun.tools.visualvm.host.views/0 [1.0 130911]
      com.sun.tools.visualvm.host.remote/0 [1.0 130911]
      com.sun.tools.visualvm.attach/0 [1.1 130911]
      com.sun.tools.visualvm.application.views/0 [1.0 130911]
      Diagnostic information
      Input arguments:
      -Djdk.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home
      -Dnetbeans.default_userdir_root=/Users/timl/Library/Application Support/VisualVM
      -Dnetbeans.system_http_proxy=DIRECT
      -Dnetbeans.system_http_non_proxy_hosts=
      -Dnetbeans.dirs=/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/visualvm:/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/profiler:
      -Dnetbeans.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform
      -Dcom.apple.mrj.application.apple.menu.about.name=VisualVM
      -Xms24m
      -Xmx256m
      -Dsun.jvmstat.perdata.syncWaitMs=10000
      -Dsun.java2d.noddraw=true
      -Dsun.java2d.d3d=false
      -Dnetbeans.keyring.no.master=true
      -XX:+HeapDumpOnOutOfMemoryError
      -XX:HeapDumpPath=/Users/timl/Library/Application Support/VisualVM/7u60/var/log/heapdump.hprof
      Compiler: HotSpot 64-Bit Tiered Compilers
      Heap memory usage: initial 24.0MB maximum 228.0MB
      Non heap memory usage: initial 2.4MB maximum -1b
      Garbage collector: PS Scavenge (Collections=15 Total time spent=0s)
      Garbage collector: PS MarkSweep (Collections=1 Total time spent=0s)
      Classes: loaded=4750 total loaded=4750 unloaded 0
      INFO [org.netbeans.core.ui.warmup.DiagnosticTask]: Total memory 4,294,967,296
      INFO [null]: Total physical memory 4,294,967,296
      WARNING [org.netbeans.modules.progress.spi.InternalHandle]: Cannot switch to silent mode when not running at org.netbeans.core.ui.warmup.MenuWarmUpTask$NbWindowsAdapter$1HandleBridge.run(MenuWarmUpTask.java:230)
      INFO [org.netbeans.ui.metrics.profiler]: Profiler Attach
      INFO [org.netbeans.ui.metrics.profiler]: Profiler Settings
      *** Profiler warning (Mon Jun 09 11:00:00 EDT 2014): Error reading class java/util/Comparator:
      Bad constant pool tag: 18 at 20
      *** Profiler warning (Mon Jun 09 11:00:00 EDT 2014): Error reading class java/util/Comparator:
      Bad constant pool tag: 18 at 20
      *** Profiler warning (Mon Jun 09 11:00:00 EDT 2014): Error reading class java/util/Comparator:
      Bad constant pool tag: 18 at 20
      *** Profiler warning (Mon Jun 09 11:00:00 EDT 2014): Error reading class java/util/Comparator:
      Bad constant pool tag: 18 at 20
      *** Profiler warning (Mon Jun 09 11:00:00 EDT 2014): Error reading class java/lang/reflect/AnnotatedElement:
      Bad constant pool tag: 18 at 76
      *** Profiler warning (Mon Jun 09 11:00:00 EDT 2014): class com/sun/proxy/$Proxy1, ldr = 0 not found anywhere
      *** Profiler warning (Mon Jun 09 11:00:00 EDT 2014): class com/sun/proxy/$Proxy0, ldr = 0 not found anywhere
      *** Profiler warning (Mon Jun 09 11:00:00 EDT 2014): Error reading class java/util/Map$Entry:
      Bad constant pool tag: 18 at 10
      *** Profiler warning (Mon Jun 09 11:00:00 EDT 2014): Error reading class java/util/Comparator:
      Bad constant pool tag: 18 at 20
      *** Profiler warning (Mon Jun 09 11:00:00 EDT 2014): Error reading class java/util/function/BiFunction:
      Bad constant pool tag: 18 at 15
      *** Profiler warning (Mon Jun 09 11:00:00 EDT 2014): Error reading class java/util/function/BiFunction:
      Bad constant pool tag: 18 at 15
      *** Profiler warning (Mon Jun 09 11:00:00 EDT 2014): Error reading class java/util/function/BiFunction:
      Bad constant pool tag: 18 at 15
      *** Profiler warning (Mon Jun 09 11:00:00 EDT 2014): Error reading class java/util/Comparator:
      Bad constant pool tag: 18 at 20
      *** Profiler warning (Mon Jun 09 11:00:00 EDT 2014): Error reading class java/lang/reflect/AnnotatedElement:
      Bad constant pool tag: 18 at 76
      *** Profiler warning (Mon Jun 09 11:00:00 EDT 2014): Error reading class java/util/regex/Pattern:
      Bad constant pool tag: 18 at 1753
      *** Profiler warning (Mon Jun 09 11:00:00 EDT 2014): Error reading class java/util/Map$Entry:
      Bad constant pool tag: 18 at 10
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/util/Map$Entry:
      Bad constant pool tag: 18 at 10
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/util/concurrent/ConcurrentMap:
      Bad constant pool tag: 18 at 61
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/util/concurrent/ConcurrentMap:
      Bad constant pool tag: 18 at 61
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/util/BitSet:
      Bad constant pool tag: 18 at 403
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/nio/CharBuffer:
      Bad constant pool tag: 18 at 245
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/nio/CharBuffer:
      Bad constant pool tag: 18 at 245
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/util/Map$Entry:
      Bad constant pool tag: 18 at 10
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/util/Map$Entry:
      Bad constant pool tag: 18 at 10
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/util/Arrays:
      Bad constant pool tag: 18 at 755
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/util/Map$Entry:
      Bad constant pool tag: 18 at 10
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/util/Map$Entry:
      Bad constant pool tag: 18 at 10
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/util/Map$Entry:
      Bad constant pool tag: 18 at 10
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/util/Comparator:
      Bad constant pool tag: 18 at 20
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/util/Comparator:
      Bad constant pool tag: 18 at 20
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/lang/CharSequence:
      Bad constant pool tag: 18 at 10
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/lang/CharSequence:
      Bad constant pool tag: 18 at 10
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/lang/CharSequence:
      Bad constant pool tag: 18 at 10
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/lang/CharSequence:
      Bad constant pool tag: 18 at 10
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/lang/CharSequence:
      Bad constant pool tag: 18 at 10
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/lang/reflect/AnnotatedElement:
      Bad constant pool tag: 18 at 76
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/lang/reflect/AnnotatedElement:
      Bad constant pool tag: 18 at 76
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/lang/reflect/AnnotatedElement:
      Bad constant pool tag: 18 at 76
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/lang/reflect/AnnotatedElement:
      Bad constant pool tag: 18 at 76
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/lang/reflect/AnnotatedElement:
      Bad constant pool tag: 18 at 76
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/lang/reflect/AnnotatedElement:
      Bad constant pool tag: 18 at 76
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/lang/reflect/AnnotatedElement:
      Bad constant pool tag: 18 at 76
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/lang/reflect/AnnotatedElement:
      Bad constant pool tag: 18 at 76
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/lang/reflect/AnnotatedElement:
      Bad constant pool tag: 18 at 76
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/lang/reflect/AnnotatedElement:
      Bad constant pool tag: 18 at 76
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/lang/reflect/AnnotatedElement:
      Bad constant pool tag: 18 at 76
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/lang/reflect/AnnotatedElement:
      Bad constant pool tag: 18 at 76
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/lang/CharSequence:
      Bad constant pool tag: 18 at 10
      *** Profiler warning (Mon Jun 09 11:00:01 EDT 2014): Error reading class java/lang/CharSequence:
      Bad constant pool tag: 18 at 10


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.util.Date;
      import java.util.HashMap;
      import java.util.Vector;

      public class Test {

      static HashMap<Integer, Vector<Integer>> patterns;
      static HashMap<Integer, String> patternStrings;
      static Vector<Integer> tempV;

      public static void main(String[] args) {
      try {
      test();
      } catch (Exception e) {
      e.printStackTrace();
      }
      }

      private static void test() {
      patterns = new HashMap<Integer, Vector<Integer>>();
      patternStrings = new HashMap<Integer, String>();
      tempV = new Vector<Integer>();
      long from = new Date().getTime();
      for (int test = 0; test <= Integer.MAX_VALUE; test++) {
      if (test % 1000 == 0) {
      long to = new Date().getTime();
      Double speed = (double) (to - from);
      speed = (((double) test) / ((speed / 1000.0) / 60.0));
      Double progress = ((((double) test) / ((double) Integer.MAX_VALUE)) * 100.0);
      System.err.println("# " + test + ", " + progress + "%, " + speed + " tests/minute");
      }
      samplePattern(test).size();
      samplePatternString(test);

      }
      }

      private static Vector<Integer> samplePattern(int n) {
      if (patterns.get(n) == null) {
      String s = samplePatternString(n);
      if (s.length() > 24) {
      return null;
      }
      tempV.clear();
      for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) == '1') {
      tempV.add(s.length() - i);
      }
      }
      patterns.clear();
      patterns.put(n, tempV);
      }
      return patterns.get(n);
      }

      private static String samplePatternString(int n) {
      if (patternStrings.get(n) == null) {
      Vector<Integer> v = new Vector<Integer>();
      for (int c = 1; c <= n; c++) {
      if (v.isEmpty()) {
      v.add(1);
      } else {
      if (v.get(v.size() - 1) == rotateInt(24)) {
      v.set(v.size() - 1, shift(v, v.size() - 2));
      } else {
      v.set(v.size() - 1, v.get(v.size() - 1) << 1);
      }
      }
      }
      int a = 0;
      for (int i = 0; i < v.size(); i++) {
      a += v.get(i);
      }
      patternStrings.clear();
      patternStrings.put(n, Integer.toBinaryString(a));
      }
      return patternStrings.get(n);
      }

      private static Integer shift(Vector<Integer> v, int i) {
      if (i < 0) {
      v.add(1);
      return 2;
      }
      if (v.get(i) << 1 == v.get(i + 1)) {
      if (i - 1 == 0) {
      v.add(1);
      v.set(i, 1 << 1);
      } else {
      v.set(i, shift(v, i - 1));
      }
      } else {
      v.set(i, v.get(i) << 1);
      }
      return v.get(i) << 1;
      }

      private static int rotateInt(int n) {
      String s = "1";
      for (int i = 1; i < n; i++) {
      s += "0";
      }
      return Integer.parseInt(s, 2);
      }

      }

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      killing the jre lets visualvm capture a profile of the sigint but not the code that was running.

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

              Created:
              Updated:
              Resolved: