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

List:       openjdk-serviceability-dev
Subject:    Re: [ping] RFR 8074041: sun/management/jmxremote/startstop/JMXStartStopTest.java fails
From:       Staffan Larsen <staffan.larsen () oracle ! com>
Date:       2015-03-11 12:20:21
Message-ID: 8B593E6B-652E-4A1E-BD95-C50A475D1971 () oracle ! com
[Download RAW message or body]

Let try this!

/Staffan

> On 11 mar 2015, at 09:35, Jaroslav Bachorik <jaroslav.bachorik@oracle.com> wrote:
> 
> On 5.3.2015 11:37, Jaroslav Bachorik wrote:
>> Please, review the following change
>> 
>> Issue : https://bugs.openjdk.java.net/browse/JDK-8074041
>> Webrev: http://cr.openjdk.java.net/~jbachorik/8074041/webrev.00
>> 
>> This test fails very intermittently still and the failure is very hard
>> to reproduce. Based on the symptoms the probable cause seems to be the
>> asynchronous processing of a launched process stdout and stderr.
>> 
>> The test is using ProcessTools.startProcess(...) to start the target
>> process and process its output (stdout/stderr) to mark the occurrence of
>> the expected string. When the target process has finished the test will
>> check the mark to assert the correctness. However, it may happen that
>> the assertion occurs in the time interval between the target process
>> finishing (process.waitFor() returns) and the asynchronous stderr/stdout
>> processors had the chance to dispatch the target process output to the
>> processor checking for the occurrence of the expected test.
>> 
>> The proposed fix is to wrap the Process instance into a wrapper
>> enhancing the waitFor() method with the wait for the stdout/stderr
>> processor being finished before proceeding. I ran the test in a tight
>> loop for 1000 times after applying this patch without any failure.
>> 
>> 
>> Thanks,
>> 
>> -JB-
> 

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

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