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

Thread::getState and JVM TI GetThreadState should return TIMED_WAITING virtual thread is timed parked

    XMLWordPrintable

Details

    • b16
    • Verified

    Backports

      Description

        If a virtual thread is in a timed-parked (LockSupport.parkNanos) then Thread::getThread returns WAITING rather than TIMED_WAITING. The Thread::getState method was added for monitoring and management purposes but should be fixed.

        JVM TI GetThreadState has a similar issue. It returns the state with the JVMTI_THREAD_STATE_WAITING_INDEFINITELY rather than JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT bit set.

        Attachments

          Issue Links

            Activity

              People

                alanb Alan Bateman
                alanb Alan Bateman
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: