Re: jmx-dev RFR: 6815130 intermittent ThreadMXBean/Locks.java failure

2013-09-05 Thread David Holmes
Seems good to go to me. David On 5/09/2013 10:52 PM, Jaroslav Bachorik wrote: On 09/04/2013 10:33 AM, Jaroslav Bachorik wrote: On 09/04/2013 10:29 AM, David Holmes wrote: On 4/09/2013 4:56 PM, Jaroslav Bachorik wrote: On 09/04/2013 04:24 AM, Mandy Chung wrote: Hi Jaroslav, Like Daniel and

Re: jmx-dev RFR: 6815130 intermittent ThreadMXBean/Locks.java failure

2013-09-05 Thread Mandy Chung
On 9/3/13 11:56 PM, Jaroslav Bachorik wrote: Ok, let's go back to the basics :) The reason for the test to fail intermittently are stale reads from the "waiting" variable. In order to minimize the changes it seems sufficient to make the "waiting" variable volatile to prevent the stale reads. Th

Re: jmx-dev RFR: 6815130 intermittent ThreadMXBean/Locks.java failure

2013-09-05 Thread Daniel Fuchs
On 9/5/13 2:52 PM, Jaroslav Bachorik wrote: On 09/04/2013 10:33 AM, Jaroslav Bachorik wrote: On 09/04/2013 10:29 AM, David Holmes wrote: On 4/09/2013 4:56 PM, Jaroslav Bachorik wrote: On 09/04/2013 04:24 AM, Mandy Chung wrote: Hi Jaroslav, Like Daniel and David said, CyclicBarrier and other

Re: jmx-dev RFR: 6815130 intermittent ThreadMXBean/Locks.java failure

2013-09-05 Thread Jaroslav Bachorik
On 09/04/2013 10:33 AM, Jaroslav Bachorik wrote: > On 09/04/2013 10:29 AM, David Holmes wrote: >> On 4/09/2013 4:56 PM, Jaroslav Bachorik wrote: >>> On 09/04/2013 04:24 AM, Mandy Chung wrote: Hi Jaroslav, Like Daniel and David said, CyclicBarrier and other j.u.concurrent utility

Re: jmx-dev RFR: 6815130 intermittent ThreadMXBean/Locks.java failure

2013-09-04 Thread Jaroslav Bachorik
On 09/04/2013 10:29 AM, David Holmes wrote: > On 4/09/2013 4:56 PM, Jaroslav Bachorik wrote: >> On 09/04/2013 04:24 AM, Mandy Chung wrote: >>> Hi Jaroslav, >>> >>> Like Daniel and David said, CyclicBarrier and other j.u.concurrent >>> utility seem a good replacement with the ThreadExecutionSynchron

Re: jmx-dev RFR: 6815130 intermittent ThreadMXBean/Locks.java failure

2013-09-04 Thread David Holmes
On 4/09/2013 4:56 PM, Jaroslav Bachorik wrote: On 09/04/2013 04:24 AM, Mandy Chung wrote: Hi Jaroslav, Like Daniel and David said, CyclicBarrier and other j.u.concurrent utility seem a good replacement with the ThreadExecutionSynchronizer class. ThreadMXBean/Locks.java was written prior to j.u

Re: jmx-dev RFR: 6815130 intermittent ThreadMXBean/Locks.java failure

2013-09-04 Thread Daniel Fuchs
Hi Jaroslav, That looks like a reasonable small change if you are anxious to get that fix out of your plate fast. I'll trust that your analysis is right and that declaring waiting volatile is enough to fix the issue. It was certainly an error to access 'waiting' from multiple threads without any

Re: jmx-dev RFR: 6815130 intermittent ThreadMXBean/Locks.java failure

2013-09-03 Thread Jaroslav Bachorik
On 09/04/2013 04:24 AM, Mandy Chung wrote: > Hi Jaroslav, > > Like Daniel and David said, CyclicBarrier and other j.u.concurrent > utility seem a good replacement with the ThreadExecutionSynchronizer > class. ThreadMXBean/Locks.java was written prior to j.u.concurrent > added to the platform (bot

Re: jmx-dev RFR: 6815130 intermittent ThreadMXBean/Locks.java failure

2013-09-03 Thread Mandy Chung
Hi Jaroslav, Like Daniel and David said, CyclicBarrier and other j.u.concurrent utility seem a good replacement with the ThreadExecutionSynchronizer class. ThreadMXBean/Locks.java was written prior to j.u.concurrent added to the platform (both java.util.concurrent and java.lang.management we

Re: jmx-dev RFR: 6815130 intermittent ThreadMXBean/Locks.java failure

2013-09-03 Thread David Holmes
Hi Jaroslav, On 3/09/2013 11:02 PM, Jaroslav Bachorik wrote: On 09/03/2013 02:10 PM, Daniel Fuchs wrote: Hi Jaroslav, Have you considered replacing the ThreadExecutionSynchronizer with a plain (and more reliable) CyclicBarrier or Phaser object?

Re: jmx-dev RFR: 6815130 intermittent ThreadMXBean/Locks.java failure

2013-09-03 Thread Jaroslav Bachorik
On 09/03/2013 02:10 PM, Daniel Fuchs wrote: > Hi Jaroslav, > > Have you considered replacing the ThreadExecutionSynchronizer with > a plain (and more reliable) CyclicBarrier or Phaser object? > > > >

Re: jmx-dev RFR: 6815130 intermittent ThreadMXBean/Locks.java failure

2013-09-03 Thread Daniel Fuchs
Hi Jaroslav, Have you considered replacing the ThreadExecutionSynchronizer with a plain (and more reliable) CyclicBarrier or Phaser object?

jmx-dev RFR: 6815130 intermittent ThreadMXBean/Locks.java failure

2013-09-03 Thread Jaroslav Bachorik
Please, review the following patch of the intermittently failing test: http://cr.openjdk.java.net/~jbachorik/6815130/webrev.01 Issue: https://bugs.openjdk.java.net/browse/JDK-6815130 Sometimes the ThreadExecutionSynchronizer class failes to achieve the desired synchronization (due to possible da