[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8319935: Ensure only one JvmtiThreadState is created for one JavaThread associated with att
From:       Jiangli Zhou <jiangli () openjdk ! org>
Date:       2023-11-30 16:50:23
Message-ID: oX7Kz3uo2cGdGr8v_AFtvuQvaVmWYTVZsNjHtplWcMc=.9cd55bba-6954-4318-b65e-ece22dcd16ff () github ! com
[Download RAW message or body]

On Wed, 29 Nov 2023 23:06:10 GMT, Daniel D. Daugherty <dcubed@openjdk.org> wrote:

> A belated thumbs up. Sorry I didn't get back to this review before the fix was \
> integrated.

Still thanks for reviewing the change, @dcubed-ojdk.

> 
> I found just a nit comment that could be more clear.

The particular issue occurred when `JavaThread::allocate_threadObj` was allocating \
and initializing the Thread instance. When the allocation of the Thread object \
triggered sampling, it could create a `JvmtiThreadState` with null thread oop with \
the bug. 

It seems "is being allocated" describes the issue more accurately.

> src/hotspot/share/prims/jvmtiExport.cpp line 3143:
> 
> > 3141: 
> > 3142:   // If the current thread is attaching from native and its Java thread \
> >                 object
> > 3143:   // is being allocated, things are not ready for allocation sampling.
> 
> nit - typo: s/is being allocated/has not been allocated/

Please see other comment.

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

PR Comment: https://git.openjdk.org/jdk/pull/16642#issuecomment-1834148374
PR Review Comment: https://git.openjdk.org/jdk/pull/16642#discussion_r1410956027


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic