In the JDWP spec, INVALID_THREAD is spec'd to mean:
INVALID_THREAD - Passed thread is null, is not a valid thread or has exited.
However, the JVMTI THREAD_NOT_ALIVE error is also converted to INVALID_THREAD by the debug agent. SeeJDK-8283224. This means sometimes INVALID_THREAD might also potentially mean "Thread has not been started or is now dead.", which is how THREAD_NOT_ALIVE is currently described. The current description of INVALID_THREAD is only partially covering this meaning with the "...or has exited" wording. We need to go through the entire JDWP spec and where appropriate include the full THREAD_NOT_ALIVE meaning of INVALID_THREAD. Also where appropriate remove the "...or has exited" part when it is not possible.
This also could have some impact on descriptions in the JDI spec where INVALID_THREAD can result in any of the following 3 exceptions depending on the context.
java.lang.IllegalThreadStateException
com.sun.jdi.IncompatibleThreadStateException
com.sun.jdi.InvalidStackFrameException
The JDI spec does not seem to ever mention IllegalThreadStateException, since it is not a checked exception. For places where IncompatibleThreadStateException or InvalidStackFrameException are thrown, we need to make sure the descriptions of the meanings of these exceptions match the meaning of the underlying JDWP INVALID_THREAD error.
INVALID_THREAD - Passed thread is null, is not a valid thread or has exited.
However, the JVMTI THREAD_NOT_ALIVE error is also converted to INVALID_THREAD by the debug agent. See
This also could have some impact on descriptions in the JDI spec where INVALID_THREAD can result in any of the following 3 exceptions depending on the context.
java.lang.IllegalThreadStateException
com.sun.jdi.IncompatibleThreadStateException
com.sun.jdi.InvalidStackFrameException
The JDI spec does not seem to ever mention IllegalThreadStateException, since it is not a checked exception. For places where IncompatibleThreadStateException or InvalidStackFrameException are thrown, we need to make sure the descriptions of the meanings of these exceptions match the meaning of the underlying JDWP INVALID_THREAD error.
- relates to
-
JDK-8283224 Remove THREAD_NOT_ALIVE from possible JDWP error codes
-
- Resolved
-