On Thu, 22 Apr 2021 15:59:09 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

> This bug was introduced by my recent changes for 
> [JDK-8265028](https://bugs.openjdk.java.net/browse/JDK-8265028), which 
> attempted to speed up ThreadNode lookups by not looking in the runningThreads 
> list if the TLS lookup failed. At the time it was thought that the thread 
> could not possibly be on the list, but it turns out sometimes it can.
> 
> For now I'm just doing a quick fix to replace the assert being triggered with 
> a lookup instead, which is pretty much how it worked before JDK-8265028. 
> However, I eventually want to get back to not having to do the lookup, but 
> first I need to better understand why this is happening in the first place, 
> and the tests are failing too often to wait for that, thus the quick fix.

Thumbs up for the quick and dirty fix.

Do you plan to another bug to continue your investigation?

src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c line 260:

> 258:          * thread has terminated, but the ThreadNode may still be 
> present.
> 259:          */
> 260:         if ( node == NULL ) {

nit - s/( /(/ and s/ )/)/

src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c line 261:

> 259:          */
> 260:         if ( node == NULL ) {
> 261:             if (list == NULL || list == &runningThreads ) {

nit - s/ )/)/

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

Marked as reviewed by dcubed (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/3634

Reply via email to