Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8283224

Remove THREAD_NOT_ALIVE from possible JDWP error codes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 20
    • 19
    • core-svc
    • None
    • b14

      THREAD_NOT_ALIVE originates from JVMTI. However, the debug agent converts it to INVALID_THREAD before passing it on to the debug agent client (the debugger, usually JDI). Currently ThreadReference.forceEarlyReturn() is the only API that even bothers to check for it, and it throws com.sun.jdi.IllegalThreadStateException, which is the same thing it already does for INVALID_THREAD.

      In the JDWP spec, THREAD_NOT_ALIVE should be changed to "Not used".

      For the following part of the JDWP spec for ThreadReference.ForceEarlyReturn, the THREAD_NOT_ALIVE entry should be removed. [UPDATE: It looks like this was already done by Loom.]

      In the JDI ThreadReference.forceEarlyReturn implementation, the code that checks for THREAD_NOT_ALIVE should be removed. There is no behavior change associated with these changes, and there is no JDI spec update necessary. The spec already says IllegalThreadStateException means "the thread is not suspended", and not being alive implies not suspended.

            cjplummer Chris Plummer
            cjplummer Chris Plummer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: