jmx-dev RFR: 8068774 CounterMonitorDeadlockTest.java timed out

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

jmx-dev RFR: 8068774 CounterMonitorDeadlockTest.java timed out

Shanliang JIANG
Hi

Please review this test bug fix

Bug: https://bugs.openjdk.java.net/browse/JDK-8068774
Webrev: http://cr.openjdk.java.net/~sjiang/JDK-8068774/00/


The problem must be here:
98 monitorProxy.start();
99
100 final int initGetCount = observedProxy.getGetCount();

The test calls initGetCount after starting the monitor, but the test
case 1 is:
      "Remove monitored MBean within monitored getAttribute"

that means if the monitor calls getAttribute before the test calls
observedProxy.getGetCount(), then no more getAttribute will happen and
the return of observedProxy.getGetCount() will not be changed any more.
This is why the test is timeout.

I reproduced the bug by inserting at line 99:
      Thread.sleep(1000);

Thanks,
Shanliang
Reply | Threaded
Open this post in threaded view
|

Re: jmx-dev RFR: 8068774 CounterMonitorDeadlockTest.java timed out

Jaroslav Bachorik
Looks good!

Just don't forget to add "noreg-self" label to the issue.

-JB-

On 13.1.2015 10:28, shanliang wrote:

> Hi
>
> Please review this test bug fix
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8068774
> Webrev: http://cr.openjdk.java.net/~sjiang/JDK-8068774/00/
>
>
> The problem must be here:
> 98 monitorProxy.start();
> 99
> 100 final int initGetCount = observedProxy.getGetCount();
>
> The test calls initGetCount after starting the monitor, but the test
> case 1 is:
>       "Remove monitored MBean within monitored getAttribute"
>
> that means if the monitor calls getAttribute before the test calls
> observedProxy.getGetCount(), then no more getAttribute will happen and
> the return of observedProxy.getGetCount() will not be changed any more.
> This is why the test is timeout.
>
> I reproduced the bug by inserting at line 99:
>       Thread.sleep(1000);
>
> Thanks,
> Shanliang

Reply | Threaded
Open this post in threaded view
|

Re: jmx-dev RFR: 8068774 CounterMonitorDeadlockTest.java timed out

Daniel Fuchs
In reply to this post by Shanliang JIANG
On 13/01/15 10:28, shanliang wrote:
> Hi
>
> Please review this test bug fix
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8068774
> Webrev: http://cr.openjdk.java.net/~sjiang/JDK-8068774/00/

Looks good Shanliang!

best regards,

-- daniel

>
>
> The problem must be here:
> 98 monitorProxy.start();
> 99
> 100 final int initGetCount = observedProxy.getGetCount();
>
> The test calls initGetCount after starting the monitor, but the test
> case 1 is:
>       "Remove monitored MBean within monitored getAttribute"
>
> that means if the monitor calls getAttribute before the test calls
> observedProxy.getGetCount(), then no more getAttribute will happen and
> the return of observedProxy.getGetCount() will not be changed any more.
> This is why the test is timeout.
>
> I reproduced the bug by inserting at line 99:
>       Thread.sleep(1000);
>
> Thanks,
> Shanliang