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

ThreadMXBean.getXXX methods inconsistent on whether JVMTI agent threads are hidden

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 22
    • core-svc
    • None

      ThreadMXBean.getAllThreadIds filters out JVMTI agent threads. See JVM_GetAllThreads use of ThreadsListEnumerator where include_jvmti_agent_threads=false.

      On the other hand, ThreadMXBean.getThreadInfo(long) returns the thread info for a JVMTI agent thread if it has the given thread ID.

      This inconsistency should be re-examined and also compared to other APIs that enumerate threads, e.g. Thread.getAllStackTraces does not enumerate JVMTI agent threads. It may be that some spec clarification is needed.

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

              Created:
              Updated: