RFR (S) 8048215: [TESTBUG] java/lang/management/ManagementFactory/ThreadMXBeanProxy.java Expected non-null LockInfo

David Holmes david.holmes at oracle.com
Mon Oct 15 19:59:33 UTC 2018


Thanks Jc!

David

On 16/10/2018 1:10 AM, JC Beyler wrote:
> Hi David,
> 
> Looks good to me as well,
> Jc
> 
> On Mon, Oct 15, 2018 at 4:55 AM David Holmes <david.holmes at oracle.com 
> <mailto:david.holmes at oracle.com>> wrote:
> 
>     Thanks for the review Daniel!
> 
>     David
> 
>     On 15/10/2018 7:47 PM, Daniel Fuchs wrote:
>      > Hi David,
>      >
>      > Good finding! Looks reasonable to me.
>      >
>      > best regards,
>      >
>      > -- daniel
>      >
>      > On 15/10/2018 05:23, David Holmes wrote:
>      >> bug: https://bugs.openjdk.java.net/browse/JDK-8048215
>      >> webrev: http://cr.openjdk.java.net/~dholmes/8048215/webrev/
>     <http://cr.openjdk.java.net/%7Edholmes/8048215/webrev/>
>      >>
>      >> Simple race condition in the test. The main thread does checks that
>      >> are only valid once the target thread has called o.wait() but
>     there's
>      >> nothing to ensure that point of execution is reached. The
>     failure is
>      >> easily reprodcued by just putting in a sleep after:
>      >>
>      >> Object o = new Object();
>      >>
>      >> Fix is to add a shared 'waiter' Object that the target waits
>     upon and
>      >> for which the main also synchronizes on such that the main thread
>      >> can't proceed until wait() has been called and released the monitor.
>      >>
>      >> Thanks,
>      >> David
>      >
> 
> 
> 
> -- 
> 
> Thanks,
> Jc


More information about the serviceability-dev mailing list