-
Bug
-
Resolution: Fixed
-
P3
-
21, 23, 24
ADDITIONAL SYSTEM INFORMATION :
A DESCRIPTION OF THE PROBLEM :
In JDK 8, using the Process class to execute the command "/Applications/LibreOffice.app/Contents/MacOS/soffice --help"works as expected. However, after switching to JDK 21, the thread executing the command becomes unresponsive, and the forked process causes CPU usage to spike to 100%.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. install soffice
2. run code
3. switch jdk
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
return immediately
ACTUAL -
no result
---------- BEGIN SOURCE ----------
ProcessBuilder processBuilder = new ProcessBuilder(
"/Applications/LibreOffice.app/Contents/MacOS/soffice",
"--help"
);
Process process = processBuilder.start();
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
String line;
while ((line = reader.readLine()) != null) {
System.out.println(line);
}
int exitCode = process.waitFor();
System.out.println("Process exited with code: " + exitCode);
---------- END SOURCE ----------
A DESCRIPTION OF THE PROBLEM :
In JDK 8, using the Process class to execute the command "/Applications/LibreOffice.app/Contents/MacOS/soffice --help"works as expected. However, after switching to JDK 21, the thread executing the command becomes unresponsive, and the forked process causes CPU usage to spike to 100%.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. install soffice
2. run code
3. switch jdk
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
return immediately
ACTUAL -
no result
---------- BEGIN SOURCE ----------
ProcessBuilder processBuilder = new ProcessBuilder(
"/Applications/LibreOffice.app/Contents/MacOS/soffice",
"--help"
);
Process process = processBuilder.start();
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
String line;
while ((line = reader.readLine()) != null) {
System.out.println(line);
}
int exitCode = process.waitFor();
System.out.println("Process exited with code: " + exitCode);
---------- END SOURCE ----------
- relates to
-
JDK-8324577 [REDO] - [IMPROVE] OPEN_MAX is no longer the max limit on macOS >= 10.6 for RLIMIT_NOFILE
- Resolved
- links to
-
Commit(master) openjdk/jdk/c00e20c3
-
Review(master) openjdk/jdk/21992