jvm-profiling-tools / honest-profiler

A sampling JVM profiler without the safepoint sample bias
https://github.com/RichardWarburton/honest-profiler/wiki
MIT License
1.25k stars 146 forks source link

java.io.IOException: Can not attach to current VM #233

Open ghost opened 6 years ago

ghost commented 6 years ago

This keeps blasting by the console

22:26:36.644 [Thread-0] WARN com.insightfullogic.honest_profiler.ports.sources.LocalMachineSource - Can not attach to current VM java.io.IOException: Can not attach to current VM at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.(HotSpotVirtualMachine.java:75) at jdk.attach/sun.tools.attach.VirtualMachineImpl.(VirtualMachineImpl.java:56) at jdk.attach/sun.tools.attach.AttachProviderImpl.attachVirtualMachine(AttachProviderImpl.java:73) at jdk.attach/com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:249) at com.insightfullogic.honest_profiler.ports.sources.LocalMachineSource.attach(LocalMachineSource.java:142) at com.insightfullogic.honest_profiler.ports.sources.LocalMachineSource.onNewDescriptor(LocalMachineSource.java:123) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1604) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:430) at com.insightfullogic.honest_profiler.ports.sources.LocalMachineSource.difference(LocalMachineSource.java:118) at com.insightfullogic.honest_profiler.ports.sources.LocalMachineSource.poll(LocalMachineSource.java:105) at com.insightfullogic.honest_profiler.ports.sources.LocalMachineSource.discoverVirtualMachines(LocalMachineSource.java:84) at com.insightfullogic.honest_profiler.core.ThreadedAgent.run(ThreadedAgent.java:67)

nitsanw commented 6 years ago

Can you give some relevant details here? JVM version? code version? test case for reproduction?