RFR(S): 8191229: serviceability/jvmti/GetOwnedMonitorInfo/GetOwnedMonitorInfoTest.java fails with NoClassDefFoundError
Chris Plummer
chris.plummer at oracle.com
Thu Dec 7 00:14:00 UTC 2017
On 12/6/17 4:10 PM, serguei.spitsyn at oracle.com wrote:
>
> On 12/6/17 15:55, Chris Plummer wrote:
>> I didn't see any other suspicious uses of FindClass in the jvmti
>> jtreg tests.
>
> Good to know.
> There are not that many jvmti jtreg tests.
> Interesting part would be the nsk.jvmti tests.
> There are many uses of the FindClass there.
> But let's keep it out of this review.
Yes, I did check there and noticed too many calls to go through. We'll
just need to keep an eye out for new failures since this failure seems
to have been triggered by recent JDK or VM changes resulting in a
contended monitor that we did not see in past.
Chris
>
> Thanks,
> Serguei
>
>
>> Chris
>>
>> On 12/6/17 3:33 PM, serguei.spitsyn at oracle.com wrote:
>>> Hi Chris,
>>>
>>> It looks good to me.
>>> I wonder if we have other similar cases like this in the JVMTI tests.
>>>
>>> Thanks,
>>> Serguei
>>>
>>>
>>> On 12/6/17 14:38, Chris Plummer wrote:
>>>> Hello,
>>>>
>>>> Please review the following:
>>>>
>>>> https://bugs.openjdk.java.net/browse/JDK-8191229
>>>> http://cr.openjdk.java.net/~cjplummer/8191229/webrev.00/
>>>>
>>>> The test is testing contended monitor support. After registering
>>>> the callback, it gets an unexpected notification of a contended
>>>> monitor, which is happening while the finalizer thread is running.
>>>> In the callback the test does a FindClass to find a test class, but
>>>> the classloader context is not correct when the finalizer thread is
>>>> current, so FindClass fails and leaves an exception pending
>>>> (probably blowing away the finalzer thread) and also (separately)
>>>> causes the test to fail. It's unknown why this callback is suddenly
>>>> being triggered, but the callback itself is not a bug, and the test
>>>> needs to defend against it.
>>>>
>>>> The fix is to lookup the test class during test initialization and
>>>> keep it cached, rather than look it up every time there is a
>>>> contended monitor callback.
>>>>
>>>> thanks,
>>>>
>>>> Chris
>>>
>>
>
More information about the serviceability-dev
mailing list