[jdk17u-dev] RFR: 8289643: File descriptor leak with ProcessBuilder.startPipeline
Rinku Kumar Maurya
duke at openjdk.org
Mon May 27 13:59:25 UTC 2024
On Mon, 13 May 2024 11:40:09 GMT, Rinku Kumar Maurya <duke at openjdk.org> wrote:
> clean backport to fix file descriptor leak with ProcessBuilder.startPipeline. When using ProcessBuilder.startPipeline the pipes (or pipe if only 2 ProcessBuilder instance used) created are never closed.
>
>
> with changes :-
> ==============================
> Test summary
> ==============================
> TEST TOTAL PASS FAIL ERROR
> jtreg:test/jdk/java/lang/ProcessBuilder/PipelineLeaksFD.java
> 1 1 0 0
> ==============================
> TEST SUCCESS
>
>
> without changes :-
> ==============================
> Test summary
> ==============================
> TEST TOTAL PASS FAIL ERROR
> jtreg:test/jdk/java/lang/ProcessBuilder/PipelineLeaksFD.java
> 1 0 1 0
> ==============================
> TEST FAILURE
>
> with expected output :-
> test PipelineLeaksFD.checkForLeaks(java.util.ImmutableCollections$ListN at 44d1a216): failure
> java.lang.AssertionError: More or fewer pipes than expected
> ...
unclean backport of commit 226b8e680a82096b3d268703872d30182c10e326 which fixes intermittent failures observed for the newly added test. Changes in `test/jdk/ProblemList-Xcomp.txt` were causing conflicts but they are not needed with this new backport as addition and removal of problem-list entry is a no-op change and file contents remain unchanged.
Ran test again :
with changes :-
==============================
Test summary
==============================
TEST TOTAL PASS FAIL ERROR
jtreg:test/jdk/java/lang/ProcessBuilder/PipelineLeaksFD.java
1 1 0 0
==============================
TEST SUCCESS
without changes :-
==============================
Test summary
==============================
TEST TOTAL PASS FAIL ERROR
jtreg:test/jdk/java/lang/ProcessBuilder/PipelineLeaksFD.java
1 0 1 0
==============================
TEST FAILURE
with expected output :-
test PipelineLeaksFD.checkForLeaks(java.util.ImmutableCollections$ListN at 44d1a216): failure
java.lang.AssertionError: More or fewer pipes than expected
...
-------------
PR Comment: https://git.openjdk.org/jdk17u-dev/pull/2462#issuecomment-2133536103
More information about the jdk-updates-dev
mailing list