VisualVM 分析在检测时挂起 类
VisualVM profiling hangs while instrumenting classes
我在尝试使用 VisualVm 分析 Java 应用程序时出现奇怪的行为。
Hostsystem = SUSE Linux Enterprise Server 10
Java JDK
(same is running VisualVM
and Application to profile) = jdk1.8.0_40 64bit
在具有相同 JDK
的主机上分析其他应用程序(例如 Tomcat)运行 没有此问题。
在 Windows(来自 Eclipse 的运行)上分析我的应用程序也工作正常。
开始分析后,日志显示以下行:
INFO [org.netbeans.ui.metrics.profiler]: Profiler Attach
INFO [org.netbeans.ui.metrics.profiler]: Profiler Settings
*** Profiler warning (Thu Oct 08 14:36:10 CEST 2015): class java/lang /UNIXProcess$$Lambda/1156856411, ldr = 0 not found anywhere
*** Profiler warning (Thu Oct 08 14:36:10 CEST 2015): class java/lang/invoke/LambdaForm$DMH/1131480230, ldr = 0 not found anywhere
*** Profiler warning (Thu Oct 08 14:36:10 CEST 2015): class java/lang/invoke/LambdaForm$MH/1901642836, ldr = 0 not found anywhere
*** Profiler warning (Thu Oct 08 14:36:10 CEST 2015): class java/lang
... and so on, stopping after 60 lines with similar output ...
我的应用程序有以下 JVM
参数(顺便说一句。我在其他地方读到,设置 tmp 目录有问题,但删除参数也无济于事)
-XX:-UseLWPSynchronization
-XX:+UseConcMarkSweepGC
-Djava.rmi.server.hostname=<removed>
-Duser.timezone=Europe/Berlin
-Dcom.sun.management.config.file=/global/ECAS_TESTAS/ecastest/ecas/conf/management.properties
-Dsun.rmi.transport.tcp.handshakeTimeout=180000
-Dsun.rmi.dgc.client.gcInterval=600000
-Dsun.rmi.dgc.server.gcInterval=600000
-verbose:gc
-XX:CompileCommand=exclude,ecas/logik/ELogikKomponentenVersion.doBerechnen
-XX:CICompilerCount=2
-Djava.io.tmpdir=/global/ECAS_TESTAS/ecastest/ecas/tmp
-XX:NewSize=2100m
-XX:SurvivorRatio=20
-Xms10000m
-Xmx10000m
-XX:MaxPermSize=120m
在这里您可以找到显示问题的 Screenshot。
经过一些关于发送 sigterm (kill -3 pid) 以生成堆栈跟踪的研究后,我发现 visualvm 仍然可以解析 类。
在那之后,我注意到对于这个过程“。”在类路径中。所以我删除了它。现在它按预期工作了。
我在尝试使用 VisualVm 分析 Java 应用程序时出现奇怪的行为。
Hostsystem = SUSE Linux Enterprise Server 10
Java
JDK
(same is runningVisualVM
and Application to profile) = jdk1.8.0_40 64bit
在具有相同 JDK
的主机上分析其他应用程序(例如 Tomcat)运行 没有此问题。
在 Windows(来自 Eclipse 的运行)上分析我的应用程序也工作正常。
开始分析后,日志显示以下行:
INFO [org.netbeans.ui.metrics.profiler]: Profiler Attach
INFO [org.netbeans.ui.metrics.profiler]: Profiler Settings
*** Profiler warning (Thu Oct 08 14:36:10 CEST 2015): class java/lang /UNIXProcess$$Lambda/1156856411, ldr = 0 not found anywhere
*** Profiler warning (Thu Oct 08 14:36:10 CEST 2015): class java/lang/invoke/LambdaForm$DMH/1131480230, ldr = 0 not found anywhere
*** Profiler warning (Thu Oct 08 14:36:10 CEST 2015): class java/lang/invoke/LambdaForm$MH/1901642836, ldr = 0 not found anywhere
*** Profiler warning (Thu Oct 08 14:36:10 CEST 2015): class java/lang
... and so on, stopping after 60 lines with similar output ...
我的应用程序有以下 JVM
参数(顺便说一句。我在其他地方读到,设置 tmp 目录有问题,但删除参数也无济于事)
-XX:-UseLWPSynchronization
-XX:+UseConcMarkSweepGC
-Djava.rmi.server.hostname=<removed>
-Duser.timezone=Europe/Berlin
-Dcom.sun.management.config.file=/global/ECAS_TESTAS/ecastest/ecas/conf/management.properties
-Dsun.rmi.transport.tcp.handshakeTimeout=180000
-Dsun.rmi.dgc.client.gcInterval=600000
-Dsun.rmi.dgc.server.gcInterval=600000
-verbose:gc
-XX:CompileCommand=exclude,ecas/logik/ELogikKomponentenVersion.doBerechnen
-XX:CICompilerCount=2
-Djava.io.tmpdir=/global/ECAS_TESTAS/ecastest/ecas/tmp
-XX:NewSize=2100m
-XX:SurvivorRatio=20
-Xms10000m
-Xmx10000m
-XX:MaxPermSize=120m
在这里您可以找到显示问题的 Screenshot。
经过一些关于发送 sigterm (kill -3 pid) 以生成堆栈跟踪的研究后,我发现 visualvm 仍然可以解析 类。 在那之后,我注意到对于这个过程“。”在类路径中。所以我删除了它。现在它按预期工作了。