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

GetThreadState does not report JVMTI_THREAD_STATE_IN_NATIVE for current thread

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 22
    • hotspot
    • None

      Test test/hotspot/jtreg/serviceability/jvmti/vthread/ThreadStateTest/ shows the issue:
      The test uses native library to implement JVMTI agent and to implement native methods of the test class.
      Native method testGetThreadState uses agent's jvmtiEnv to call GetThreadState for the current thread.
      It's expected that the thread state value is "JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE", but the call is made from native method, so it should include JVMTI_THREAD_STATE_IN_NATIVE bit

            amenkov Alex Menkov
            amenkov Alex Menkov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: