Skip to content

IOException: Can not attach to current VM #289

@thurka

Description

@thurka

The exception below is thrown only with GraalVM JDK 11+.

java.io.IOException: Can not attach to current VM
	at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.<init>(HotSpotVirtualMachine.java:75)
	at jdk.attach/sun.tools.attach.VirtualMachineImpl.<init>(VirtualMachineImpl.java:56)
	at jdk.attach/sun.tools.attach.AttachProviderImpl.attachVirtualMachine(AttachProviderImpl.java:58)
	at jdk.attach/com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:207)
[catch] at org.graalvm.visualvm.sampler.truffle.TruffleDataProvider.loadAgent(TruffleDataProvider.java:103)
	at org.graalvm.visualvm.sampler.truffle.TruffleDataProvider.checkAndLoadJMX(TruffleDataProvider.java:85)
	at org.graalvm.visualvm.sampler.truffle.cpu.ThreadInfoProvider.initialize(ThreadInfoProvider.java:52)
	at org.graalvm.visualvm.sampler.truffle.cpu.ThreadInfoProvider.<init>(ThreadInfoProvider.java:44)
	at org.graalvm.visualvm.sampler.truffle.SamplerImpl$10.run(SamplerImpl.java:514)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)

To Reproduce
Steps to reproduce the behavior:

  1. start VisualVM on GraalVM JDK 11+ (bin/jvisualvm)
  2. Open VisualVM itself
  3. Select 'Polyglot Sampler' tab
  4. IOException

Desktop (please complete the following information):

  • OS: macOS
  • JDK version: JDK 11
  • Version 2.0.6

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions