-
Enhancement
-
Resolution: Fixed
-
P3
-
23
-
b09
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8332766 | 21.0.5-oracle | Calvin Cheung | P3 | Resolved | Fixed | b01 |
JDK-8333339 | 21.0.5 | Martin Doerr | P3 | Resolved | Fixed | b01 |
JDK-8334120 | 17.0.13 | Dmitry Cherepanov | P3 | Resolved | Fixed | b01 |
[~jpai] reports:
The root cause is this code in jdwp which does the work of launching a process (passed as a command to launch=cmdline option)
https://github.com/openjdk/jdk/blob/master/src/jdk.jdwp.agent/unix/native/libjdwp/exec_md.c#L103.
it forks the child process and then goes ahead to close all possible file descriptor copies (from its parent) of this newly created child process. to do that it fetches the max number of allowed open descriptors (sysconf) and then iterates over it one by one (starting fd=3) to close them all. before the change in
I had a quick look at how we handle forking in other APIs in the JDK and turns out there is a more optimal way we do it in the Process impl native code https://github.com/openjdk/jdk/blob/master/src/java.base/unix/native/libjava/childproc.c#L74
- backported by
-
JDK-8332766 JDWP process management needs more efficient file descriptor handling
- Resolved
-
JDK-8333339 JDWP process management needs more efficient file descriptor handling
- Resolved
-
JDK-8334120 JDWP process management needs more efficient file descriptor handling
- Resolved
- blocks
-
JDK-8324577 [REDO] - [IMPROVE] OPEN_MAX is no longer the max limit on macOS >= 10.6 for RLIMIT_NOFILE
- Resolved
- relates to
-
JDK-8324979 Can the JDWP process management file descriptor handling be more robust?
- Open
-
JDK-8326433 Make file-local functions static in src/jdk.jdwp.agent/unix/native/libjdwp/exec_md.c
- Resolved
-
JDK-8300088 [IMPROVE] OPEN_MAX is no longer the max limit on macOS >= 10.6 for RLIMIT_NOFILE
- Closed
- links to
-
Commit openjdk/jdk17u-dev/f9c11cb4
-
Commit openjdk/jdk21u-dev/0dcbc1d0
-
Commit openjdk/jdk/a6632487
-
Review openjdk/jdk17u-dev/2557
-
Review openjdk/jdk21u-dev/619
-
Review openjdk/jdk/17588