JDK-6173612 : need an attach mechanism
  • Type: Enhancement
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 6
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2004-10-04
  • Updated: 2017-05-16
  • Resolved: 2005-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b37Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
The current Ctrl-Break handler executes a fixed set of tasks such as dumping threads, deadlock detection and printing the number of JNI global refs. While the current mechanism is extremely useful we need a more general mechanism that allows command-line utilities and other JDK tools to interact with the VM at runtime - for example we need to be able to start the M&M agent so that jconsole can attach, load JVMTI agent for profilers like JFluid, enable diagnostic flags, and do other things. 

This RFE is submitted to cover the general requirement to attach to the VM at runtime and execute a sequence of tasks. The mechanism that we introduce should not require that the VM be started with any special options, it must be secure (meaning that arbitrary users/tools can't attach), and it must not impact startup or performance.
###@###.### 10/4/04 08:53 GMT

Comments
EVALUATION The ability for tools to 'attach on demand' is essential. It is required to dynamically monitor, profile, debug, ... When users encounter problems with an application/VM they need the ability to attach a tool to diagnosis the problem. Currently to attach a tool the VM must be started with options to launch the agent. At the time the problem occurs it is too late to do this. Even in cases where problems were anticipated, adding the options is difficult or impossible when they are launched from embedded systems (web browsers, scripts, etc). Security is a major concern in the design of this capability. A unified system that works for all classes of tools is needed. The specific needs of 'attach on demand' for debuggers is specified in CR 4841257 -- which on top of these core capabilities, must integrate them with the debugger back-end. ###@###.### 10/4/04 00:47 GMT ###@###.### 10/5/04 19:30 GMT The attach mechanism was integrated for hotspot b35, and the SDK/API work is in SDK b37. So finally it is time to make this RFE as fixed. ###@###.### 2005-05-13 08:43:29 GMT
04-10-2004