RFR 8067241 DeadlockTest.java failed with negative timeout value

serguei.spitsyn at oracle.com serguei.spitsyn at oracle.com
Fri Dec 12 09:11:31 UTC 2014


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) {


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20141212/d198d5cd/attachment.html>


More information about the serviceability-dev mailing list