jmx-dev Codereview request: 8050115 javax/management/monitor/GaugeMonitorDeadlockTest.java fails intermittently
Daniel Fuchs
daniel.fuchs at oracle.com
Tue Sep 16 12:28:26 UTC 2014
On 9/16/14 1:24 PM, shanliang wrote:
> Daniel Fuchs wrote:
>> Hi Shanliang,
>>
>> line 116 - you could use a CountDownLatch instead of an
>> AtomicInteger. It would avoid having to use the busy loop at
>> lines 134-136.
> Yes CountDownLatch is really a good idea, I tried to modify the code as
> less as possible, I prefer to keep the old code this time, another
> reason is that we still need to do same thing at line 103.
>>
>> I also wonder whether you could increase the sleep timeout
>> at line 107 - to make that loop a bit less buzy.
>> Unless that would alter the test too much and make the
>> deadlock less probable?
> Line 95: monitorProxy.setGranularityPeriod(10L); // 10 ms
> So waiting 10ms seems reasonable.
>>
>> Otherwise the changes look reasonable.
>>
>> Have you tried reproducing the failure (before fixing) on your
>> own machine using the same config than what was reported to
>> fail? (fastdebug build with all the -server + -XX etc options?)
> I reproduced the bug only by reducing the waiting time.
Well - if your changes fix it - then push it :-)
-- daniel
>
> Thanks Daniel!
> Shanliang
>>
>> best regards,
>>
>> -- daniel
>>
>>
>> On 9/16/14 11:12 AM, shanliang wrote:
>>> Hi,
>>>
>>> Please review the following fix:
>>>
>>> bug: https://bugs.openjdk.java.net/browse/JDK-8050115
>>> webrev: http://cr.openjdk.java.net/~sjiang/JDK-8050115/00/
>>>
>>> Thanks,
>>> Shanliang
>>
>
More information about the serviceability-dev
mailing list