FULL JDK VERSION(S)
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode)
DESCRIPTION:
launching java with -Xrunjdwp (or agentlib:jdwp) specified twice (as can happen
easily through script errors in an invocation script) results in the unhelpful
error message:
ERROR: JDWP unable to get necessary JVMTI capabilities. ["debugInit.c",L279]
...and the JVM terminates. This does not give the user any useful information on
the cause of the failure.
JDWP was clearly never coded to be loaded multiple times, its onload routine sets
various static variables and memsets to zeroes a global static area "gdata".
That is not the issue here.
The issue is that it does not protect itself against such user error. It does not
check that it has not already been loaded and will blithely overwrite any previous
settings and continue executing. However it then hits an error it cannot handle
and terminates with a misleading error message.
example command to produce the problem:
java -Xrunjdwp:transport=dt_socket,address=8000
-Xrunjdwp:transport=dt_socket,address=8000 HelloWorld
ERROR: JDWP unable to get necessary JVMTI capabilities. ["debugInit.c",L279]
[This bug is being submitted as a courtesy, in order to maintain uniformity between Sun & IBM JDKs. It has been fixed in IBM JDKs.
Please contact ###@###.### if you have questions.]
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode)
DESCRIPTION:
launching java with -Xrunjdwp (or agentlib:jdwp) specified twice (as can happen
easily through script errors in an invocation script) results in the unhelpful
error message:
ERROR: JDWP unable to get necessary JVMTI capabilities. ["debugInit.c",L279]
...and the JVM terminates. This does not give the user any useful information on
the cause of the failure.
JDWP was clearly never coded to be loaded multiple times, its onload routine sets
various static variables and memsets to zeroes a global static area "gdata".
That is not the issue here.
The issue is that it does not protect itself against such user error. It does not
check that it has not already been loaded and will blithely overwrite any previous
settings and continue executing. However it then hits an error it cannot handle
and terminates with a misleading error message.
example command to produce the problem:
java -Xrunjdwp:transport=dt_socket,address=8000
-Xrunjdwp:transport=dt_socket,address=8000 HelloWorld
ERROR: JDWP unable to get necessary JVMTI capabilities. ["debugInit.c",L279]
[This bug is being submitted as a courtesy, in order to maintain uniformity between Sun & IBM JDKs. It has been fixed in IBM JDKs.
Please contact ###@###.### if you have questions.]
- duplicates
-
JDK-6374165 com/sun/jdi/DoubleAgentTest.java under JDI_REGRESSION suite fail due to java.lang.Exception
-
- Closed
-
- relates to
-
JDK-6358509 HPROF: Loading twice is not properly handled. Misleading error message.
-
- Resolved
-