On Wed, 29 Nov 2023 06:44:58 GMT, David Holmes <dhol...@openjdk.org> wrote:
> JDWP filters its own internal threads out of any thread lists it returns, so > this may be a case of using two different API's with different views of the > set of threads running. I think the issue that Bernd is running into is a long standing anomaly between ThreadMXBean.getAllThreadIds() and the ThreadMXBean.getThreadInfo methods. The former uses a ThreadsListEnumerator with include_jvmti_agent_threads=false so it filters out the JVMTI agent threads. The latter doesn't do the filtering so if you have threadId of a JVMTI agent thread then you can get its thread info. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16791#discussion_r1409102862