I am getting an error in Weblogic. I am running Weblogic 14.1.1 with OpenJDK 11.0.2. I am running on Red Hat Linux Enterprise version 8.4. This is a required platform stack, so I can't update any of these.
The error I am receiving is "Could not check file size to determine chunk rotation". It shows up in the Weblogic log after about 7-10 days of running. And it just keeps printing out, filling up the log.
I found the error message in the following Java class in OpenJDK: https://github.com/AdoptOpenJDK/openjdk-jdk11/blob/master/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java
The class name is PlatformRecorder.java. And the error is on line 442 in method periodicTask().
try {
if (SecuritySupport.getFileSize(currentChunk.getUnfishedFile()) > Options.getMaxChunkSize()) {
rotateDisk();
}
} catch (IOException e) {
Logger.log(JFR_SYSTEM, WARN, "Could not check file size to determine chunk rotation");
}
As you can see, it is in a catch block for an IOException. Unfortunately, they do not print out the detail of the Exception in the log.
This seems to be part of Java Flight Recorder (JFR). I am not familiar with this, but my understanding is that it is not supposed to be enabled by default. But Weblogic/OpenJDK does appear to be running it (since I am getting that error).
Since this error doesn't show up until Weblogic has been running for about a week, it almost sounds like there is some resource that is unavailable or is being "used up" after a certain amount of time. I did check the disk space, and I saw nothing out of the ordinary. I also found some ".jfr" files under the Weblogic directory structure, but they were all empty.
I thought maybe I could replace the default implementation of this class with one of mine where I print out the exception detail to maybe give me a clue. But these seem to be in Java modules. And I'm uncertain how to replace a native Java class in a module with one of mine.
The other thought is maybe there is some profiling going on in Weblogic that is causing this to be started. But I'm not sure how to turn all profiling off (or if that would even be a good thing to do). But I obviously can't recycle Weblogic once a week in production because this error keeps showing up.
Does anybody have any ideas on what could be causing this error? Or maybe how to determine some more detail, like how to override a built-in class in a Java module, or some other idea? Has anybody else even seen this error? I could not find it mentioned anywhere else.
Thanks for any help in troubleshooting this issue.