-
Bug
-
Resolution: Unresolved
-
P4
-
22
-
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.
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.