On Wed, 17 Mar 2021 16:36:19 GMT, Ioi Lam <ik...@openjdk.org> wrote:

>> That loop is checking that the Thread (in the parent) reading from the child 
>> is in the correct state (blocked).  On Windows, it is a BufferedInputStream.
>> 
>> But it does not indicate anything about the state of the child process.
>> From the scant information from previous failures, it appears that the the 
>> creation of some thread (not a java thread) in the child has failed.
>> The additional time is to avoid destroying the child while it is still 
>> initializing.
>
> The failures happened in tiers 6 and 8. The system may be overloaded so even 
> 100ms may not be enough for the child process to start sleeping. From the 
> error log, the child process tried to spawn a thread (probably one of those 
> usually started during VM bootstrap) at around 118ms
> 
> [0.118s][warning][os,thread] Failed to start thread - _beginthreadex failed 
> (EACCES) for attributes: stacksize: default, flags: 
> 
> The test runs 4 times. Each time it checks only STDOUT or STDERR, but not 
> both. So I think we can use the other stream to signal to the main process 
> that the child process is ready. That would be more reliable than an 
> arbitrary wait time.

That complicates the test and the child quite a bit for minimal gain.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3049

Reply via email to