-
Bug
-
Resolution: Incomplete
-
P3
-
None
-
21.0.1
-
x86_64
-
linux_ubuntu
ADDITIONAL SYSTEM INFORMATION :
openjdk 21 2023-09-19 LTS
OpenJDK Runtime Environment Corretto-21.0.0.35.1 (build 21+35-LTS)
OpenJDK 64-Bit Server VM Corretto-21.0.0.35.1 (build 21+35-LTS, mixed mode, sharing)
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
A DESCRIPTION OF THE PROBLEM :
The changes introduced byJDK-8290025, https://bugs.openjdk.org/browse/JDK-8290025 , "Remove the Sweeper" have resulted in the code cache not being garbage collected when the code cache starts to get full. Resulting in "OpenJDK 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled."
I expect the code cache to be garbage collected when it gets full, not only when other events invoke the GC.
I have tried to use various configurations for this. Combining the following without any luck. Some examples:
- -XX:+UseCodeCacheFlushing
- -XX:NmethodSweepActivity=10
- -XX:SweeperThreshold=10
REGRESSION : Last worked in version 17
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Running an application with a heap with a lot of free space where the interval for garbage collection on the heap is low in combination with a code cache that is small, but not too small will reproduce this.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I would expect the code cache to be garbage-collected and not result in "OpenJDK 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled."
ACTUAL -
The following is logged "OpenJDK 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled." The code cache will be cleared on next GC, whenever that will be.
CUSTOMER SUBMITTED WORKAROUND :
Increasing the code cache
FREQUENCY : often
openjdk 21 2023-09-19 LTS
OpenJDK Runtime Environment Corretto-21.0.0.35.1 (build 21+35-LTS)
OpenJDK 64-Bit Server VM Corretto-21.0.0.35.1 (build 21+35-LTS, mixed mode, sharing)
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
A DESCRIPTION OF THE PROBLEM :
The changes introduced by
I expect the code cache to be garbage collected when it gets full, not only when other events invoke the GC.
I have tried to use various configurations for this. Combining the following without any luck. Some examples:
- -XX:+UseCodeCacheFlushing
- -XX:NmethodSweepActivity=10
- -XX:SweeperThreshold=10
REGRESSION : Last worked in version 17
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Running an application with a heap with a lot of free space where the interval for garbage collection on the heap is low in combination with a code cache that is small, but not too small will reproduce this.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I would expect the code cache to be garbage-collected and not result in "OpenJDK 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled."
ACTUAL -
The following is logged "OpenJDK 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled." The code cache will be cleared on next GC, whenever that will be.
CUSTOMER SUBMITTED WORKAROUND :
Increasing the code cache
FREQUENCY : often