JDK-8332537 : C2: High memory usage reported for compiler/loopopts/superword/TestAlignVectorFuzzer.java
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 23,24
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-05-20
  • Updated: 2024-11-05
  • Resolved: 2024-06-07
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 24
24 b02Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8332538 :  
Description
Fuzzer test compiler/loopopts/superword/TestAlignVectorFuzzer.java\#VerifyAlignVector-NoTieredCompilation-Xbatch failed:

ITERATION 2 of 5. Test testUUBBBH, time allowance: 158604, until timeout: 466604
13981  351    b        compiler.loopopts.superword.TestAlignVectorFuzzer::testUUBBBH (1253 bytes)
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/workspace/open/src/hotspot/share/compiler/compilationMemoryStatistic.cpp:559), pid=3826037, tid=3826053
#  fatal error: c2 compiler/loopopts/superword/TestAlignVectorFuzzer::testUUBBBH(([B[B[B)[Ljava/lang/Object;): Hit MemLimit (limit: 1073741824 now: 1073746392)
#
# JRE version: Java(TM) SE Runtime Environment (23.0) (fastdebug build 23-internal-2024-05-17-1953200)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 23-internal-2024-05-17-1953200, mixed mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)

Current CompileTask:
C2:143789  351    b        compiler.loopopts.superword.TestAlignVectorFuzzer::testUUBBBH (1253 bytes)

Stack: [0x00007f0918873000,0x00007f0918973000],  sp=0x00007f091896d070,  free space=1000k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x1895f02]  VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x482  (compilationMemoryStatistic.cpp:559)
V  [libjvm.so+0xa90fc5]  report_fatal(VMErrorType, char const*, int, char const*, ...)+0x105  (debug.cpp:214)
V  [libjvm.so+0x9c00bd]  CompilationMemoryStatistic::on_arena_change(long, Arena const*)+0x3fd  (compilationMemoryStatistic.cpp:559)
V  [libjvm.so+0x5f256c]  Arena::grow(unsigned long, AllocFailStrategy::AllocFailEnum)+0x10c  (arena.cpp:300)
V  [libjvm.so+0xb54aeb]  Dict::doubhash()+0x21b  (arena.hpp:120)
V  [libjvm.so+0xb54c78]  Dict::Insert(void*, void*, bool)+0x148  (dict.cpp:164)
V  [libjvm.so+0x17d55c5]  Type::hashcons()+0x55  (type.cpp:741)
V  [libjvm.so+0x17f0574]  VerifyMeetResult::meet(Type const*, Type const*)+0xe4  (type.cpp:889)
V  [libjvm.so+0x17e964d]  Type::meet_helper(Type const*, bool) const+0x47d  (type.cpp:935)
V  [libjvm.so+0x870687]  ConstraintCastNode::higher_equal_types(PhaseGVN*, Node const*) const+0xa7  (type.hpp:237)
V  [libjvm.so+0x8709f5]  ConstraintCastNode::dominating_cast(PhaseGVN*, PhaseTransform*) const+0x255  (castnode.cpp:163)
V  [libjvm.so+0x870d41]  CastIINode::Identity(PhaseGVN*)+0x21  (castnode.cpp:43)
V  [libjvm.so+0x1528e04]  PhaseIterGVN::transform_old(Node*)+0x3c4  (phaseX.cpp:1264)
V  [libjvm.so+0x151f474]  PhaseIterGVN::optimize()+0x94  (phaseX.cpp:1046)
V  [libjvm.so+0x9eb576]  PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x636  (loopnode.hpp:1200)
V  [libjvm.so+0x9e4015]  Compile::optimize_loops(PhaseIterGVN&, LoopOptsMode)+0x75  (compile.cpp:2188)
V  [libjvm.so+0x9e6721]  Compile::Optimize()+0xe21  (compile.cpp:2435)
V  [libjvm.so+0x9e9d26]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1af6  (compile.cpp:853)
V  [libjvm.so+0x83e265]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1d5  (c2compiler.cpp:142)

Comments
Changeset: b4beda21 Author: Emanuel Peter <epeter@openjdk.org> Date: 2024-06-07 05:07:03 +0000 URL: https://git.openjdk.org/jdk/commit/b4beda21b487886b022e04766e140e6d1df1038a
07-06-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/19580 Date: 2024-06-06 14:22:48 +0000
06-06-2024

This seems to have crashed in the same code where we have had issues in JDK-8332765, and that was due to bad CastII fix in JDK-8324517. I reverted the corresponding BACKOUT, and then I tried to reproduce it again -> and it FAILED. Confirmed regression of JDK-8324517, just like JDK-8332765.
06-06-2024

ILW = High C2 compiler memory usage, single test, no workaround = MLH = P4
21-05-2024

Additional flag was passed: -XX:UseAVX=3 and test ran on avx512 linux-x64 machine Test's output head: CompileCommand: PrintCompilation compiler/loopopts/superword/TestAlignVectorFuzzer.* bool PrintCompilation = true For random generator using seed: 3249981201344669190 To re-run test with same seed value please add "-Djdk.test.lib.random.seed=3249981201344669190" to command line.
20-05-2024