JDK-6898169 : loadAgentLibrary fails to load JDWP agent
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 6u14
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2009-11-04
  • Updated: 2010-05-11
  • Resolved: 2009-11-04
Related Reports
Duplicate :  
Description
My attempt at loading a JDWP service agent through the attach API results in the following exception:

Exception in thread "main" com.sun.tools.attach.AgentLoadException: Failed to load agent library
	at sun.tools.attach.LinuxVirtualMachine.execute(LinuxVirtualMachine.java:198)
	at sun.tools.attach.HotSpotVirtualMachine.loadAgentLibrary(HotSpotVirtualMachine.java:40)
	at sun.tools.attach.HotSpotVirtualMachine.loadAgentLibrary(HotSpotVirtualMachine.java:61)

My invocation is:

    vm.loadAgentLibrary("jdwp","transport=dt_socket,server=y,suspend=n,address=9999")

Passing completely bogus values to either parameter doesn't change the error message, so it's possible that I'm doing something stupid, but I can't tell.

No visible output is observed in the console of the target JVM.

Comments
EVALUATION I think this bug should be closed as a duplicate of: 4841257 4/4 Should be able to 'attach on demand' to debug I'll check with the submitter to see if there any objections.
04-11-2009

EVALUATION The JDWP agent requires jvmti capabilities that can only be obtained during the onload phase (and will cause the VM to terminate if it cannot obtain the capabilities). 4841257 is tracking the work require to do on-demand debugging.
04-11-2009