VisualVM CPU sampling not working

Mandy Chung mandy.chung at oracle.com
Wed May 3 00:39:08 UTC 2017


serviceability-dev (cc’ed) is the proper mailing list for this issue
and so bcc jdk9-dev.

https://bugs.openjdk.java.net/browse/JDK-8167121 has been pushed
to jdk8u-dev.  We will need to get this fix in a 8u release.

Mandy

> On May 2, 2017, at 2:15 PM, Alan Snyder <javalists at cbfiddle.com> wrote:
> 
> Is this a known problem? It resembles JDK-8165005. Makes it hard to investigate performance problems if the tools don't work. Are there other tools that work?
> 
> This is VisualVM 1.39 on an application running under jdk9-ea+166.
> 
> It reports:
> 
> Cannot access threads in target application.
> 
> The log file shows:
> 
> java.lang.IllegalArgumentException: Unexpected composite type for ThreadInfo
>  at sun.management.ThreadInfoCompositeData.validateCompositeData(ThreadInfoCompositeData.java:372)
>  at sun.management.ThreadInfoCompositeData.getInstance(ThreadInfoCompositeData.java:68)
>  at java.lang.management.ThreadInfo.<init>(ThreadInfo.java:263)
>  at java.lang.management.ThreadInfo.from(ThreadInfo.java:794)
> 
> Caused: java.lang.reflect.InvocationTargetException
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:498)
>  at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
>  at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
>  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:498)
>  at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
>  at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$CompositeBuilderViaFrom.fromCompositeData(DefaultMXBeanMappingFactory.java:1018)
> 
> Caused: java.io.InvalidObjectException: Failed to invoke from(CompositeData)
>  at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory.invalidObjectException(DefaultMXBeanMappingFactory.java:1457)
>  at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$CompositeBuilderViaFrom.fromCompositeData(DefaultMXBeanMappingFactory.java:1021)
>  at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$CompositeMapping.fromNonNullOpenValue(DefaultMXBeanMappingFactory.java:919)
>  at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$NonNullMXBeanMapping.fromOpenValue(DefaultMXBeanMappingFactory.java:133)
>  at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$ArrayMapping.fromNonNullOpenValue(DefaultMXBeanMappingFactory.java:584)
>  at com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$NonNullMXBeanMapping.fromOpenValue(DefaultMXBeanMappingFactory.java:133)
>  at com.sun.jmx.mbeanserver.ConvertingMethod.fromOpenReturnValue(ConvertingMethod.java:131)
>  at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:168)
>  at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:258)
> 
> Caused: java.lang.reflect.UndeclaredThrowableException
>  at com.sun.proxy.$Proxy16.dumpAllThreads(Unknown Source)
>  at com.sun.tools.visualvm.sampler.cpu.ThreadInfoProvider.dumpAllThreads(ThreadInfoProvider.java:103)
> 
> [catch] at com.sun.tools.visualvm.sampler.cpu.ThreadInfoProvider.initialize(ThreadInfoProvider.java:88)
>  at com.sun.tools.visualvm.sampler.cpu.ThreadInfoProvider.<init>(ThreadInfoProvider.java:54)
>  at com.sun.tools.visualvm.sampler.SamplerImpl$11.run(SamplerImpl.java:485)
>  at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
>  at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
> 



More information about the jdk9-dev mailing list