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

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 22
    • Component/s: 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.

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

              Created:
              Updated: