JDK-8331344 : No compiler replay file with CompilerCommand MemLimit
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 22,23
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-04-29
  • Updated: 2024-05-13
  • Resolved: 2024-05-02
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 23
23 b22Fixed
Related Reports
Blocks :  
Description
When using the compiler memory limit with the crash suboption (e.g. `-XX:CompileCommand=MemLimit,*.*,1g~crash`), the JVM may fail to produce a replay file. We also may see partly corrupted hs-err files.

This happens if the memlimit was caused by growing ResourceAreas, not the node arena (c2). During handling of the limit, as well as when producing the replay file, we also use ResourceArea (mainly to copy strings around). If those RA usages cause another Arena chunk to be allocated, we are in recursion and will abort replay generation or abort error handling altogether if a stack overflow happens.


Comments
[jdk22u-fix-request] Approval Request from Thomas Stuefe This backport fixes a regression that causes the CompilerCommand 'memlimit' - when the limit is triggered and we assert - to not correctly generate a compiler replay file. The fix is simple and low-risk.
11-05-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk22u/pull/191 Date: 2024-05-09 10:15:37 +0000
10-05-2024

Changeset: 389f6fe9 Author: Thomas Stuefe <stuefe@openjdk.org> Date: 2024-05-02 13:41:29 +0000 URL: https://git.openjdk.org/jdk/commit/389f6fe97c348e28d8573fe4754138d2a0bd6c0d
02-05-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/19005 Date: 2024-04-29 18:39:33 +0000
30-04-2024

ILW = Missing replay file when running out of compiler memory, only with MemLimit, use higher MemLimit = MLM = P4
30-04-2024