On Wed, 14 Jun 2023 09:30:49 GMT, Kevin Walls <kev...@openjdk.org> wrote:

> This test fails when additional threads are created, as it compares thread 
> lists from different sources and sees a mismatch.
> 
> It needs to tolerate some threads with certain names appearing, e.g. JVMCI 
> and ForkJoin threads.  If there are extra threads in the thread ID list from 
> the ThreadMBean, remove them from the thread count before comparing.
> 
> When it fails, additionally print the ids and names of threads that it got 
> from the MBean.
> 
> I found the test quite confusing, the naming of thread counts, arrays of 
> threads, and arrays of thread stacktraces from different sources, so have 
> renamed some things.

> 

Thanks - that's a useful reference list.  For this test, it's never managed to 
not have Common-Cleaner in the initial set of threads it observes, I think...  
But it's very easy to see a couple of ForkJoinPool-x-worker-x threads, and see 
one more of them by the time it gets threads from the MXBean.  That's the way I 
see it failing for us now.  If we do see others appear, I hope having added the 
extra printing it will be easy to add other names, if they affect this test...

-------------

PR Comment: https://git.openjdk.org/jdk/pull/14465#issuecomment-1591874809

Reply via email to