-
Bug
-
Resolution: Fixed
-
P3
-
13.0.1
-
b33
-
x86_64
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8237297 | 15 | Jonathan Gibbons | P3 | Resolved | Fixed | b07 |
JDK-8237705 | 14.0.2 | Jonathan Gibbons | P3 | Resolved | Fixed | master |
JDK-8238144 | 14.0.1 | Unassigned | P3 | Resolved | Fixed | b02 |
A DESCRIPTION OF THE PROBLEM :
https://bugs.openjdk.java.net/browse/JDK-8220792 introduced two closely related regressions. The root cause is pathsAndContainersByLocationAndRelativeDirectory and nonIndexingContainersByLocation are not cleared in JavacFileManager.close().
1. Holding on to JavacFileManager$ArchiveContainer that are already closed: a java.nio.file.ClosedFileSystemException is thrown when any of of these closed ArchiveContainer.list() is called again.
2. Increased memory usage for compilation/documentation tasks: https://github.com/gradle/gradle/issues/11097. https://docs.google.com/spreadsheets/d/121U52kf4NUdhrMD9NMOxPHsQUzHx0SyMfFqDaoZnG5Y measured the time before and after the cache instance variables were added. We should measure the memory usage before and after as well.
A patch is provided at https://github.com/GreenRecycleBin/JDK-8220792-Regression/blob/master/JDK-8220792-Regression.patch. The patch doesn't loop through all the values of the two cache instance variables and call close() on them because they are the same as those in the "containers" instance variable and the containers for-loop closing already do that.
REGRESSION : Last worked in version 11.0.5
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
First regression:
- $ git clone https://github.com/GreenRecycleBin/JDK-8220792-Regression
- $ cdJDK-8220792-Regression
- $ ./run-reproducible-code.sh <JDK 11 javac> <JRE 11 java> <JRE 13 java>
Second regression: see https://github.com/gradle/gradle/issues/11097
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
First regression:
- "Expected behavior: exits normally." in the output
Second regression: increased memory usage for compilation/documentation tasks is not sustained after they have finished
ACTUAL -
First regression:
- "Actual behavior: throws an exception." followed by a java.nio.file.ClosedFileSystemException stack trace in the output
Second regression: increased memory usage for compilation/documentation tasks is sustained after they have finished
---------- BEGIN SOURCE ----------
First regression: https://github.com/GreenRecycleBin/JDK-8220792-Regression
Second regression: https://github.com/gradle/gradle/issues/11097
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Both regression:
- $ git clone https://github.com/GreenRecycleBin/JDK-8220792-Regression
- $ cdJDK-8220792-Regression
- $ ./run-workaround-code.sh <JDK 11 javac> <JRE 11 java> <JRE 13 java>
FREQUENCY : always
https://bugs.openjdk.java.net/browse/JDK-8220792 introduced two closely related regressions. The root cause is pathsAndContainersByLocationAndRelativeDirectory and nonIndexingContainersByLocation are not cleared in JavacFileManager.close().
1. Holding on to JavacFileManager$ArchiveContainer that are already closed: a java.nio.file.ClosedFileSystemException is thrown when any of of these closed ArchiveContainer.list() is called again.
2. Increased memory usage for compilation/documentation tasks: https://github.com/gradle/gradle/issues/11097. https://docs.google.com/spreadsheets/d/121U52kf4NUdhrMD9NMOxPHsQUzHx0SyMfFqDaoZnG5Y measured the time before and after the cache instance variables were added. We should measure the memory usage before and after as well.
A patch is provided at https://github.com/GreenRecycleBin/JDK-8220792-Regression/blob/master/JDK-8220792-Regression.patch. The patch doesn't loop through all the values of the two cache instance variables and call close() on them because they are the same as those in the "containers" instance variable and the containers for-loop closing already do that.
REGRESSION : Last worked in version 11.0.5
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
First regression:
- $ git clone https://github.com/GreenRecycleBin/JDK-8220792-Regression
- $ cd
- $ ./run-reproducible-code.sh <JDK 11 javac> <JRE 11 java> <JRE 13 java>
Second regression: see https://github.com/gradle/gradle/issues/11097
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
First regression:
- "Expected behavior: exits normally." in the output
Second regression: increased memory usage for compilation/documentation tasks is not sustained after they have finished
ACTUAL -
First regression:
- "Actual behavior: throws an exception." followed by a java.nio.file.ClosedFileSystemException stack trace in the output
Second regression: increased memory usage for compilation/documentation tasks is sustained after they have finished
---------- BEGIN SOURCE ----------
First regression: https://github.com/GreenRecycleBin/JDK-8220792-Regression
Second regression: https://github.com/gradle/gradle/issues/11097
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Both regression:
- $ git clone https://github.com/GreenRecycleBin/JDK-8220792-Regression
- $ cd
- $ ./run-workaround-code.sh <JDK 11 javac> <JRE 11 java> <JRE 13 java>
FREQUENCY : always
- backported by
-
JDK-8237297 JavacFileManager.close() doesn't clear some cache instance variables
- Resolved
-
JDK-8237705 JavacFileManager.close() doesn't clear some cache instance variables
- Resolved
-
JDK-8238144 JavacFileManager.close() doesn't clear some cache instance variables
- Resolved