RFR: 8358756: [s390x] Test StartupOutput.java crash due to CodeCache size [v2]
Amit Kumar
amitkumar at openjdk.org
Tue Jun 17 05:40:14 UTC 2025
On Thu, 12 Jun 2025 06:29:26 GMT, Amit Kumar <amitkumar at openjdk.org> wrote:
> Thanks @offamitkumar. The idea behind the [PR](https://github.com/openjdk/jdk/pull/23630) that changed this is that it would check randomly around the amount of code cache that would be just enough for the compilers to start (or not). So, before that PR it would sometimes crash instead of terminating gently. Does adding `800k` to the initial code cache for s390 do that? Did you try before that [PR](https://github.com/openjdk/jdk/pull/23630) (or temporarily reverting it) to see if it crashes?
I tried to see the output from all thread, and modified the test a bit to verify that:
java.lang.RuntimeException: 'CodeCache is full' found in stdout
at jdk.test.lib.process.OutputAnalyzer.stdoutShouldNotContain(OutputAnalyzer.java:337)
at compiler.startup.StartupOutput.main(StartupOutput.java:76)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:335)
at java.base/java.lang.Thread.run(Thread.java:1474)
Above crash I got, once i modified the test case and then ran it:
diff --git a/test/hotspot/jtreg/compiler/startup/StartupOutput.java b/test/hotspot/jtreg/compiler/startup/StartupOutput.java
index 68cfaece2a5..02f3437c27b 100644
--- a/test/hotspot/jtreg/compiler/startup/StartupOutput.java
+++ b/test/hotspot/jtreg/compiler/startup/StartupOutput.java
@@ -73,7 +73,7 @@ public static void main(String[] args) throws Exception {
for (int i = 0; i < 200; i++) {
out = new OutputAnalyzer(pr[i]);
// The VM should not crash but will probably fail with a "CodeCache is full. Compiler has been disabled." message
- out.stdoutShouldNotContain("# A fatal error");
+ out.stdoutShouldNotContain("CodeCache is full");
exitCode = out.getExitValue();
if (exitCode != 1 && exitCode != 0) {
throw new Exception("VM crashed with exit code " + exitCode);
So I think compiler is bailing out with current changes. Please let me know if this is incorrect or any other question you have.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25741#issuecomment-2978978871
More information about the hotspot-compiler-dev
mailing list