[VISUALVM-637] Java 8 profiler calibration is not working (hanging indefinitely) Created: 25/Sep/16  Updated: 26/Sep/16  Resolved: 26/Sep/16

Status: Resolved
Project: VisualVM
Component/s: None
Affects Version/s: 1.3.8
Fix Version/s: 1.3.9

Type: Bug Priority: Major
Reporter: devel1983 Assignee: thurka
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 10 X64



 Description   

Unable to use CPU profiler because Java 8 calibration is not working.
When starting manual calibration "Options->Profiling->Profiler Calibration" and selecting Java 8 executable - the process stucks with a message "Connecting to the target VM...".
Choosing Java 7 executable works fine !



 Comments   
Comment by devel1983 [ 25/Sep/16 ]

log file:

Current process ID: 4268
Parent process ID: 9368
Executable: c:\Program Files\Java\jdk1.8.0_102\bin\jvisualvm.exe
Application name: jvisualvm
Base dir: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm
readClusterFile() file: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\etc\visualvm.clusters
addCluster: visualvm
addCluster: profiler
parseConfigFile(c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\etc\visualvm.conf)
Option found: visualvm_default_userdir=$

{DEFAULT_USERDIR_ROOT}

/8u40
virtual bool VisualVMLauncher::findUserDir(const char*)
Default Userdir Root: C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM
User dir: C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM/8u40
Option found: visualvm_default_cachedir=$

{DEFAULT_CACHEDIR_ROOT}

/8u40
virtual bool VisualVMLauncher::findCacheDir(const char*)
Default Cachedir Root: C:\Users\Ievgen Krapyva\AppData\Local\VisualVM\Cache
Cache dir: C:\Users\Ievgen Krapyva\AppData\Local\VisualVM\Cache/8u40
Option found: visualvm_default_options=-J-client -J-Xms24m -J-Xmx256m -J-Dsun.jvmstat.perdata.syncWaitMs=10000 -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.d3d=false -J-Dnetbeans.keyring.no.master=true -J-Dplugin.manager.install.global=false
After replacement: -J-client -J-Xms24m -J-Xmx256m -J-Dsun.jvmstat.perdata.syncWaitMs=10000 -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.d3d=false -J-Dnetbeans.keyring.no.master=true -J-Dplugin.manager.install.global=false
parseArgs():
--trace
jvisualvm.log
parseArgs() finished
parseConfigFile(C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM/8u40\etc\visualvm.conf)
Cannot open file "C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM/8u40\etc\visualvm.conf" for reading. The system cannot find the path specified. (3)
void VisualVMLauncher::addExtraClusters()
Dir "platform" does not exist
Dir "c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform" exists
Starting platform...

Module: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\nbexec.dll
Platform dir: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform
Parsing arguments:
--branding
visualvm
--clusters
c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\visualvm;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\profiler
--userdir
C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM/8u40
--default_userdir_root
C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM
--cachedir
C:\Users\Ievgen Krapyva\AppData\Local\VisualVM\Cache/8u40
-J-client
-J-Xms24m
-J-Xmx256m
-J-Dsun.jvmstat.perdata.syncWaitMs=10000
-J-Dsun.java2d.noddraw=true
-J-Dsun.java2d.d3d=false
-J-Dnetbeans.keyring.no.master=true
-J-Dplugin.manager.install.global=false
--trace
jvisualvm.log
--jdkhome
c:\Program Files\Java\jdk1.8.0_102
--la_ppid
9368
User dir: C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40
Default Userdir root: C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM
JvmLauncher::initialize()
javaPathOrMinVersion: c:\Program Files\Java\jdk1.8.0_102
checkJava(c:\Program Files\Java\jdk1.8.0_102)
File "c:\Program Files\Java\jdk1.8.0_102\jre\bin\client\jvm.dll" does not exist
File "c:\Program Files\Java\jdk1.8.0_102\jre\bin\server\jvm.dll" exists
File "c:\Program Files\Java\jdk1.8.0_102\jre\bin\java.exe" exists
File "c:\Program Files\Java\jdk1.8.0_102\jre\bin\javaw.exe" exists
Parent process ID found: 9368
JvmLauncher::getJavaPath()
deleteNewClustersFile()...
File "C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40\update\download\netbeans.dirs" does not exist
File "C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40\var\cache\splash.png" does not exist
File "C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40\var\log\heapdump.hprof" does not exist
processAutoUpdateCL()...
File "C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40\update\download\netbeans.dirs" does not exist
checkForNewUpdater() at c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform
No new updater at c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\update\new_updater\updater.jar
Checking for updates: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\update\download*.nbm
checkForNewUpdater() at c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\visualvm
No new updater at c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\visualvm\update\new_updater\updater.jar
Checking for updates: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\visualvm\update\download*.nbm
checkForNewUpdater() at c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\profiler
No new updater at c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\profiler\update\new_updater\updater.jar
Checking for updates: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\profiler\update\download*.nbm
checkForNewUpdater() at C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40
No new updater at C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40\update\new_updater\updater.jar
Checking for updates: C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40\update\download*.nbm
Starting application...
constructClassPath()
addFilesToClassPath()
dir: C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40
subdir: lib\patches
pattern: *.jar
Nothing found (C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40\lib\patches*.jar)
addFilesToClassPath()
dir: C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40
subdir: lib\patches
pattern: *.zip
Nothing found (C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40\lib\patches*.zip)
addFilesToClassPath()
dir: C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40
subdir: lib
pattern: *.jar
Nothing found (C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40\lib*.jar)
addFilesToClassPath()
dir: C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40
subdir: lib
pattern: *.zip
Nothing found (C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40\lib*.zip)
addFilesToClassPath()
dir: C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40
subdir: lib\locale
pattern: *.jar
Nothing found (C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40\lib\locale*.jar)
addFilesToClassPath()
dir: C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40
subdir: lib\locale
pattern: *.zip
Nothing found (C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40\lib\locale*.zip)
addFilesToClassPath()
dir: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform
subdir: lib\patches
pattern: *.jar
Nothing found (c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\patches*.jar)
addFilesToClassPath()
dir: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform
subdir: lib\patches
pattern: *.zip
Nothing found (c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\patches*.zip)
addFilesToClassPath()
dir: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform
subdir: lib
pattern: *.jar
addToClassPath()
path: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\boot.jar
onlyIfExists: false
addToClassPath()
path: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\org-openide-modules.jar
onlyIfExists: false
addToClassPath()
path: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\org-openide-util-lookup.jar
onlyIfExists: false
addToClassPath()
path: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\org-openide-util.jar
onlyIfExists: false
addFilesToClassPath()
dir: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform
subdir: lib
pattern: *.zip
Nothing found (c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib*.zip)
addFilesToClassPath()
dir: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform
subdir: lib\locale
pattern: *.jar
addToClassPath()
path: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\boot_ja.jar
onlyIfExists: false
addToClassPath()
path: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\boot_zh_CN.jar
onlyIfExists: false
addToClassPath()
path: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-modules_ja.jar
onlyIfExists: false
addToClassPath()
path: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-modules_zh_CN.jar
onlyIfExists: false
addToClassPath()
path: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-util-lookup_ja.jar
onlyIfExists: false
addToClassPath()
path: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-util-lookup_zh_CN.jar
onlyIfExists: false
addToClassPath()
path: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-util_ja.jar
onlyIfExists: false
addToClassPath()
path: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-util_zh_CN.jar
onlyIfExists: false
addFilesToClassPath()
dir: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform
subdir: lib\locale
pattern: *.zip
Nothing found (c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale*.zip)
addToClassPath()
path: c:\Program Files\Java\jdk1.8.0_102\lib\dt.jar
onlyIfExists: true
File "c:\Program Files\Java\jdk1.8.0_102\lib\dt.jar" exists
addToClassPath()
path: c:\Program Files\Java\jdk1.8.0_102\lib\tools.jar
onlyIfExists: true
File "c:\Program Files\Java\jdk1.8.0_102\lib\tools.jar" exists
ClassPath: c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\boot.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\org-openide-modules.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\org-openide-util-lookup.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\org-openide-util.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\boot_ja.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\boot_zh_CN.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-modules_ja.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-modules_zh_CN.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-util-lookup_ja.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-util-lookup_zh_CN.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-util_ja.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-util_zh_CN.jar;c:\Program Files\Java\jdk1.8.0_102\lib\dt.jar;c:\Program Files\Java\jdk1.8.0_102\lib\tools.jar
JvmLauncher::start()
mainClassName: org/netbeans/Main
separateProcess: false
args:
--branding
visualvm
--cachedir
C:\Users\Ievgen Krapyva\AppData\Local\VisualVM\Cache/8u40
options:
-client
-Xms24m
-Xmx256m
-Dsun.jvmstat.perdata.syncWaitMs=10000
-Dsun.java2d.noddraw=true
-Dsun.java2d.d3d=false
-Dnetbeans.keyring.no.master=true
-Dplugin.manager.install.global=false
-Djdk.home=c:\Program Files\Java\jdk1.8.0_102
-Dnetbeans.home=c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform
-Dnetbeans.user=C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40
-Dnetbeans.default_userdir_root=C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40\var\log\heapdump.hprof
-Dsun.awt.keepWorkingSetOnMinimize=true
-Dnetbeans.dirs=c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\visualvm;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\profiler
-Djava.class.path=c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\boot.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\org-openide-modules.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\org-openide-util-lookup.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\org-openide-util.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\boot_ja.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\boot_zh_CN.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-modules_ja.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-modules_zh_CN.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-util-lookup_ja.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-util-lookup_zh_CN.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-util_ja.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-util_zh_CN.jar;c:\Program Files\Java\jdk1.8.0_102\lib\dt.jar;c:\Program Files\Java\jdk1.8.0_102\lib\tools.jar
Java DLL path: c:\Program Files\Java\jdk1.8.0_102\jre\bin\server\jvm.dll
PrepareDllPath: c:\Program Files\Java\jdk1.8.0_102\jre\bin
Falling back to running Java in a separate process; DLL cannot be loaded (64-bit DLL?).
Command line:
"c:\Program Files\Java\jdk1.8.0_102\jre\bin\java.exe" "client" "-Xms24m" "-Xmx256m" "-Dsun.jvmstat.perdata.syncWaitMs=10000" "-Dsun.java2d.noddraw=true" "-Dsun.java2d.d3d=false" "-Dnetbeans.keyring.no.master=true" "-Dplugin.manager.install.global=false" "-Djdk.home=c:\Program Files\Java\jdk1.8.0_102" "-Dnetbeans.home=c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform" "-Dnetbeans.user=C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40" "-Dnetbeans.default_userdir_root=C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM" "-XX:+HeapDumpOnOutOfMemoryError" "-XX:HeapDumpPath=C:\Users\Ievgen Krapyva\AppData\Roaming\VisualVM\8u40\var\log\heapdump.hprof" "-Dsun.awt.keepWorkingSetOnMinimize=true" "-Dnetbeans.dirs=c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\visualvm;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\profiler" "-Djava.class.path=c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\boot.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\org-openide-modules.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\org-openide-util-lookup.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\org-openide-util.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\boot_ja.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\boot_zh_CN.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-modules_ja.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-modules_zh_CN.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-util-lookup_ja.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-util-lookup_zh_CN.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-util_ja.jar;c:\Program Files\Java\jdk1.8.0_102\lib\visualvm\platform\lib\locale\org-openide-util_zh_CN.jar;c:\Program Files\Java\jdk1.8.0_102\lib\dt.jar;c:\Program Files\Java\jdk1.8.0_102\lib\tools.jar" org/netbeans/Main "branding" "visualvm" "-cachedir" "C:\Users\Ievgen Krapyva\AppData\Local\VisualVM\Cache/8u40"

Comment by thurka [ 26/Sep/16 ]

There is a bug in NetBeans Profiler (which is used by VisualVM). This bug prevents calibration of latest JDK 8 update releases on Windows. Fortunately there is an easy workaround. Please run VisualVM 1.3.8 from command-line with the following option:

bin\visualvm.exe -J-Dorg.netbeans.profiler.separateConsole=true

after this, you should be able to calibrate your JDK 8.

This issue will be fixed in VisualVM 1.3.9.





Generated at Thu Sep 29 16:24:05 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.