[jdk17u-dev] RFR: 8289643: File descriptor leak with ProcessBuilder.startPipeline

Rinku Kumar Maurya duke at openjdk.org
Thu May 23 11:26:28 UTC 2024


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
...

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

Commit messages:
 - Backport 620c8a045f92126c2552347b9f369405ab2d6d36

Changes: https://git.openjdk.org/jdk17u-dev/pull/2462/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=2462&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8289643
  Stats: 144 lines in 2 files changed: 143 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk17u-dev/pull/2462.diff
  Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/2462/head:pull/2462

PR: https://git.openjdk.org/jdk17u-dev/pull/2462


More information about the jdk-updates-dev mailing list