[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR 8078143: java/lang/management/ThreadMXBean/AllThreadIds.java fails intermittently
From:       David Holmes <david.holmes () oracle ! com>
Date:       2015-04-30 23:56:25
Message-ID: 5542C129.1070600 () oracle ! com
[Download RAW message or body]

Hi Jaroslav,

On 1/05/2015 12:25 AM, Jaroslav Bachorik wrote:
> Please, review the following test change
>
> Issue : https://bugs.openjdk.java.net/browse/JDK-8078143
> Webrev: http://cr.openjdk.java.net/~jbachorik/8078143/webrev.00
>
> The test fails intermittently due to inconsistent reporting of the live
> threads number.It is related to
> https://bugs.openjdk.java.net/browse/JDK-8021335 (or, better said,
> caused by) - certain performance counters used for the thread accounting
> are being updated under a mutex but are read without it - and it can
> lead to stale data being reported. More details are available in the
> linked issue and discussion.

Okay I just refreshed my memory on that - the fix is non-trivial 
unfortunately.

> Because of this it is not enough to join() a terminating thread to make
> sure the numbers would be correct.

Right.

> Luckily enough, it seems to be
> sufficient to wait for a short time before actually accessing the
> counters to be able to get a consistent view. In this fix I opted for a
> ridiculously huge interval of 500ms just to be sure.

It is a kludge but there's little else to be done without fixing 8021335.

So grudgingly Reviewed.

Thanks,
David


> Thanks,
>
> -JB-
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic