Re: RFR [8038982]: java/lang/ref/EarlyTimeout.java failed again

2014-04-18 Thread Ivan Gerasimov
On 18.04.2014 18:38, Mandy Chung wrote: Thumbs up Mandy Thanks! On 4/18/2014 4:21 AM, Ivan Gerasimov wrote: Hi Mandy! May I consider this fix approved? Sincerely yours, Ivan On 15.04.2014 10:10, Ivan Gerasimov wrote: On 15.04.2014 6:23, Mandy Chung wrote: On 4/14/2014 11:26 AM, Ivan G

Re: RFR [8038982]: java/lang/ref/EarlyTimeout.java failed again

2014-04-18 Thread Mandy Chung
Thumbs up Mandy On 4/18/2014 4:21 AM, Ivan Gerasimov wrote: Hi Mandy! May I consider this fix approved? Sincerely yours, Ivan On 15.04.2014 10:10, Ivan Gerasimov wrote: On 15.04.2014 6:23, Mandy Chung wrote: On 4/14/2014 11:26 AM, Ivan Gerasimov wrote: Actually, zero tolerance should be su

Re: RFR [8038982]: java/lang/ref/EarlyTimeout.java failed again

2014-04-18 Thread Ivan Gerasimov
Hi Mandy! May I consider this fix approved? Sincerely yours, Ivan On 15.04.2014 10:10, Ivan Gerasimov wrote: On 15.04.2014 6:23, Mandy Chung wrote: On 4/14/2014 11:26 AM, Ivan Gerasimov wrote: Actually, zero tolerance should be sufficient now even for Windows platform. Measuring the time wi

Re: RFR [8038982]: java/lang/ref/EarlyTimeout.java failed again

2014-04-15 Thread David Holmes
On 15/04/2014 4:54 PM, Daniel Fuchs wrote: Hi guys, Should 'actual' and 'reference' be declared as volatile? I see that they are accessed from main() after joining the threads. Or does joining the threads guarantees that 'main' will see the right values? Yes. If you join() a Thread you are g

Re: RFR [8038982]: java/lang/ref/EarlyTimeout.java failed again

2014-04-14 Thread Daniel Fuchs
Hi guys, Should 'actual' and 'reference' be declared as volatile? I see that they are accessed from main() after joining the threads. Or does joining the threads guarantees that 'main' will see the right values? best regards, -- daniel On 4/15/14 8:48 AM, David Holmes wrote: On 15/04/2014

Re: RFR [8038982]: java/lang/ref/EarlyTimeout.java failed again

2014-04-14 Thread David Holmes
On 15/04/2014 4:10 PM, Ivan Gerasimov wrote: On 15.04.2014 6:23, Mandy Chung wrote: On 4/14/2014 11:26 AM, Ivan Gerasimov wrote: Actually, zero tolerance should be sufficient now even for Windows platform. Measuring the time with nanoTime() should make the inner and outer time intervals consis

Re: RFR [8038982]: java/lang/ref/EarlyTimeout.java failed again

2014-04-14 Thread Ivan Gerasimov
On 15.04.2014 6:23, Mandy Chung wrote: On 4/14/2014 11:26 AM, Ivan Gerasimov wrote: Actually, zero tolerance should be sufficient now even for Windows platform. Measuring the time with nanoTime() should make the inner and outer time intervals consistent. I've added the tolerance just to play

Re: RFR [8038982]: java/lang/ref/EarlyTimeout.java failed again

2014-04-14 Thread Mandy Chung
On 4/14/2014 11:26 AM, Ivan Gerasimov wrote: Actually, zero tolerance should be sufficient now even for Windows platform. Measuring the time with nanoTime() should make the inner and outer time intervals consistent. I've added the tolerance just to play safer. I can remove it. That'd be eve

Re: RFR [8038982]: java/lang/ref/EarlyTimeout.java failed again

2014-04-14 Thread Ivan Gerasimov
Thank you Brent for the pointer! I think that using nanoTime() is simpler in this situation. We don't really have to use currentTimeMillis(), so no need to make it more reliable. Sincerely yours, Ivan On 14.04.2014 21:22, Brent Christian wrote: Hi, Ivan This sounds like an issue we saw in F

Re: RFR [8038982]: java/lang/ref/EarlyTimeout.java failed again

2014-04-14 Thread Ivan Gerasimov
On 14.04.2014 20:18, Mandy Chung wrote: On 4/14/2014 6:21 AM, Ivan Gerasimov wrote: Hello! The test EarlyTimeout.java failed again, now with message "elapsed time 981 is less than timeout 1000." The root cause seems to be non-accurate time measurement in Windows: http://msdn.microsoft.com/

Re: RFR [8038982]: java/lang/ref/EarlyTimeout.java failed again

2014-04-14 Thread Ivan Gerasimov
Thanks Chris! It's very similar, though still different. ReferenceQueue.remove(timeout) makes sure the timeout has fully elapsed, using System.nanoTime(). Thus the test failure only indicates that nested time intervals measured with nanoTime() and currentTimeMillis() can be inconsistent: The i

Re: RFR [8038982]: java/lang/ref/EarlyTimeout.java failed again

2014-04-14 Thread Brent Christian
Hi, Ivan This sounds like an issue we saw in FX a while ago with imprecise timers on Windows. If it is, you might check out: https://bugs.openjdk.java.net/browse/JDK-6435126 It describes a workaround to enable higher-precision timing on Windows (using a long-sleeping daemon thread). That m

Re: RFR [8038982]: java/lang/ref/EarlyTimeout.java failed again

2014-04-14 Thread Mandy Chung
On 4/14/2014 6:21 AM, Ivan Gerasimov wrote: Hello! The test EarlyTimeout.java failed again, now with message "elapsed time 981 is less than timeout 1000." The root cause seems to be non-accurate time measurement in Windows: http://msdn.microsoft.com/en-us/library/windows/desktop/ms724397(v=v

Re: RFR [8038982]: java/lang/ref/EarlyTimeout.java failed again

2014-04-14 Thread Chris Hegarty
Are you by any chance running on a VM? We have seen issues like this before, see https://bugs.openjdk.java.net/browse/JDK-7148829 ( as of yet still unresolved) -Chris. On 14/04/14 14:21, Ivan Gerasimov wrote: Hello! The test EarlyTimeout.java failed again, now with message "elapsed time

RFR [8038982]: java/lang/ref/EarlyTimeout.java failed again

2014-04-14 Thread Ivan Gerasimov
Hello! The test EarlyTimeout.java failed again, now with message "elapsed time 981 is less than timeout 1000." The root cause seems to be non-accurate time measurement in Windows: http://msdn.microsoft.com/en-us/library/windows/desktop/ms724397(v=vs.85).aspx Because of this we can achieve thi