RFR: 8321069: JvmtiThreadState::state_for_while_locked() returns nullptr for an attached JNI thread with a java.lang.Thread object after JDK-8319935
Daniel D. Daugherty
dcubed at openjdk.org
Mon Dec 4 18:16:53 UTC 2023
On Mon, 4 Dec 2023 05:16:59 GMT, Jiangli Zhou <jiangli at openjdk.org> wrote:
>> In the fix for the following bug:
>>
>> [JDK-8319935](https://bugs.openjdk.org/browse/JDK-8319935) Ensure only one JvmtiThreadState is created for one JavaThread associated with attached native thread
>>
>> JvmtiThreadState::state_for_while_locked() was changed to
>> return nullptr for attaching JNI threads regardless of whether
>> that JNI thread/JavaThread had a java.lang.Thread object.
>>
>> We should only filter out a JavaThread that's attaching via JNI
>> if it has no java.lang.Thread object.
>>
>> This fix has been tested with Mach5 Tier[1-7] and there are no related test failures.
>> Mach5 Tier8 is in process.
>>
>> I'm going to need @jianglizhou to rerun her testing for:
>>
>> [JDK-8319935](https://bugs.openjdk.org/browse/JDK-8319935) Ensure only one JvmtiThreadState is created for one JavaThread associated with attached native thread
>>
>> since the test(s) for that fix are not yet integrated in the jdk/jdk repo.
>
> @dcubed-ojdk Thanks for the notification. I just ran one of our affected test 100 times with JDK-8312174 change rolled back and with both following applied:
>
> - https://git.openjdk.org/jdk/pull/16642
> - https://github.com/openjdk/jdk/pull/16934
>
> All 100 runs passed without failure. I'm going to run all tests tonight, will report back later tomorrow if I see any issue.
@jianglizhou - Thanks for doing the testing. Can you also do a review? We need two
reviewers for this change.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16934#issuecomment-1839205099
More information about the serviceability-dev
mailing list