RFR: 8290885: java/lang/ProcessBuilder/PipelineLeaksFD.java fail: More or fewer pipes than expected
Roger Riggs
rriggs at openjdk.org
Fri Jul 29 22:03:01 UTC 2022
On Fri, 29 Jul 2022 21:43:30 GMT, Naoto Sato <naoto at openjdk.org> wrote:
>> The test java/lang/ProcessBuilder/PipelineLeaksFD.java fails intermittently, usually associated with fastdebug and -Xcomp.
>> It reports extra file descriptors are open that not expected.
>> The test of pipelines did not explicitly use or close the stderr streams of each stream except the last.
>> The intermittent nature of the failure is due to the non-deterministic GC interactions that close the streams when they become un-referenced.
>>
>> The solution in this case is to redirect the error stream to the stdout stream for each pipeline stage except the last.
>>
>> The test is removed from the ProblemList-Xcomp.
>
> test/jdk/java/lang/ProcessBuilder/PipelineLeaksFD.java line 75:
>
>> 73: for (int i = 0; i < builders.size() - 1; i++) {
>> 74: builders.get(i).redirectErrorStream(true);
>> 75: }
>
> This loop could be removed by doing redirects in the data provider.
Thanks for the review.
The effect would be the same, though it would distribute the needed constraint to more places in the source and the descriptive comment would need to be duplicated.
-------------
PR: https://git.openjdk.org/jdk/pull/9687
More information about the core-libs-dev
mailing list