JDK-8331894 : [jdk22] compiler/print/CompileCommandMemLimit.java fails after backporting JDK-8325095
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 22.0.2
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-05-08
  • Updated: 2024-05-16
  • Resolved: 2024-05-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22.0.2 masterFixed
Related Reports
Relates :  
Sub Tasks
JDK-8332188 :  
Description
Test: compiler/print/CompileCommandMemLimit.java
Testsuite: Hotspot Compiler
JDK Build: jdk-22.0.3+1-4 
OS: Windows x64, Linux x64, Linux aarch64, Mac x64
Is it a Regression: Yes
Regression Introduced in : jdk-22.0.3+1-4 (Failure is not seen in CI before this )

Partial Error log:
java.lang.RuntimeException: '.*oom.*compiler/print/CompileCommandMemLimit\\$TestMain::method1.*' missing from stdout/stderr
	at jdk.test.lib.process.OutputAnalyzer.shouldMatch(OutputAnalyzer.java:363)
	at compiler.print.CompileCommandMemLimit.test(CompileCommandMemLimit.java:136)
	at compiler.print.CompileCommandMemLimit.main(CompileCommandMemLimit.java:79)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
	at java.base/java.lang.Thread.run(Thread.java:1570)

JavaTest Message: Test threw exception: java.lang.RuntimeException
JavaTest Message: shutting down test

result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: '.*oom.*compiler/print/CompileCommandMemLimit\$TestMain::method1.*' missing from stdout/stderr


test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: '.*oom.*compiler/print/CompileCommandMemLimit\$TestMain::method1.*' missing from stdout/stderr
Comments
Changeset: f1eba2c8 Author: Thomas Stuefe <stuefe@openjdk.org> Date: 2024-05-16 15:17:35 +0000 URL: https://git.openjdk.org/jdk22u/commit/f1eba2c8f97165fc6cdd2df9fffa198f8e296cd3
16-05-2024

[~stuefe] - the 22u patch is pending integration for a few days now. Can you go ahead and integrate ?
16-05-2024

[jdk22u-fix-request] Approval Request from Thomas Stuefe This patch fixes a simple oversight in the downport of https://bugs.openjdk.org/browse/JDK-8325095. It must be fixed since the oversight introduced an incorrectness in the compilation memory statistic that the failing test picked up on. It is low risk, has been manually tested as well as ran through GHAs. Note that the problem only affects JDK 22. No other release is affected.
09-05-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk22u/pull/190 Date: 2024-05-08 14:21:21 +0000
08-05-2024

[~thartmann] Already posted the patch.
08-05-2024

Thanks for investigating, Thomas! Do you want to take care of the issue or should we re-assign?
08-05-2024

ILW = Test fails due to incorrect compilation bailout message (same as JDK-8325095 but backport is incorrect), single test in JDK 22u, no workaround = MLH = P4
08-05-2024

This is an error in functionality, since the compilation memory statistics does not correctly show "OOM" for errors stemming from the compiler hitting the memlimit. However, it is not urgent and can wait until the next cpu.
08-05-2024

The reason is that the backport for JDK-8325095 was incomplete. It seems to miss this line from the original patch: https://github.com/openjdk/jdk/blob/c589555845e61cdde5340aaa76fcc36b2753240d/src/hotspot/share/compiler/compilationMemoryStatistic.cpp#L408 I compared the rest of the patch, this seems to be the only omission. [~shade] wrote in https://github.com/openjdk/jdk21u-dev/pull/522 that the patch needed manual resolving, I guess some merge error happened. In jdk 21, this is not an issue, since the compilation mem statistic had been introduced with JDK 22.
08-05-2024

Thanks [~stuefe]. For some reason we only see it in our JDK 22u pipeline but there it happens on all platforms.
08-05-2024

[~thartmann] No clue, have to look. Does it only happen in jdk22, not in mainline? Intermittent or reliable? Only on certain platforms?
08-05-2024

I attached the log file. [~stuefe] any idea what happened here?
08-05-2024