jmx-dev RFR 8067241 DeadlockTest.java failed with negative timeout value
Daniel Fuchs
daniel.fuchs at oracle.com
Fri Dec 12 10:15:11 UTC 2014
On 12/12/14 10:11, serguei.spitsyn at oracle.com wrote:
> Hi Shanliang,
>
> The fix is good.
>
> Just a side note...
> I do not see why the line 98 is needed as no other thread is going to sync
> on the DeadlockTest object (that is o) that is passed to the BadBoy
> constructor:
>
> 98 synchronized(o) {
Hi Sergey,
I believe this is the purpose of the test.
See https://bugs.openjdk.java.net/browse/JDK-6331746
best regards,
-- daniel
>
>
> Thanks,
> Serguei
>
>
> On 12/11/14 11:33 PM, shanliang wrote:
>> Hi,
>>
>> It is a test bug, it is not correct:
>> while(!wb.done || timeToWait > 0) {
>>
>> it should be:
>> while(!wb.done && timeToWait > 0) {
>>
>> || should be changed to &&
>>
>> Another issue is that the waiting time could be not enough (final long
>> timeout = 2000).
>>
>> The fix is to remove the waiting time specified in the test, the
>> timeout of test harness will be used as the max waiting time.
>>
>> bug: https://bugs.openjdk.java.net/browse/JDK-8067241
>> webrev: http://cr.openjdk.java.net/~sjiang/JDK-8067241/00/
>>
>> thanks,
>> Shanliang
>
More information about the serviceability-dev
mailing list