RFR: 8263729: [test] Extend time to wait before destroying child in ProcssBuilder Basic test

Roger Riggs rriggs at openjdk.java.net
Wed Mar 17 16:43:49 UTC 2021


On Wed, 17 Mar 2021 16:36:19 GMT, Ioi Lam <iklam at 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


More information about the core-libs-dev mailing list