United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6173612 need an attach mechanism
JDK-6173612 : need an attach mechanism

Details
Type:
Enhancement
Submit Date:
2004-10-04
Status:
Resolved
Updated Date:
2011-12-22
Project Name:
JDK
Resolved Date:
2005-05-18
Component:
core-svc
OS:
generic
Sub-Component:
tools
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Duplicate:
Duplicate:
Relates:
Relates:
Relates:
Relates:
Relates:

Sub Tasks

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
                                     
2004-10-04



Hardware and Software, Engineered to Work Together