JDK-8315029 : [BACKOUT] Generational ZGC: Tests crash with assert(index == 0 || is_power_of_2(index))
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 22
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86_64,aarch64
  • Submitted: 2023-08-25
  • Updated: 2023-08-28
  • Resolved: 2023-08-28
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 masterFixed
Related Reports
Relates :  
Relates :  
Description
The following test failed in the JDK22 CI:

java/lang/template/StringTemplateTest.java

Here's a snippet from the log file:

#section:main
----------messages:(6/261)----------
command: main StringTemplateTest
reason: Assumed action based on file name: run main StringTemplateTest 
started: Fri Aug 25 12:57:01 UTC 2023
Mode: othervm [test requires --enable-preview]
finished: Fri Aug 25 12:59:30 UTC 2023
elapsed time (seconds): 148.189
----------configuration:(0/0)----------
----------System.out:(19/1829)----------
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/mach5/mesos/work_dir/slaves/cd627e65-f015-4fb1-a1d2-b6c9b8127f98-S140300/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/21307581-dc30-4aac-89c4-4bfbb5641d9a/runs/73c33e79-93ed-483f-ad32-d91e0813fc35/workspace/open/src/hotspot/share/opto/arraycopynode.cpp:140), pid=2882412, tid=2882708
#  assert((get_length_if_constant(phase) == -1) != ary_src->size()->is_con() || phase->is_IterGVN() || phase->C->inlining_incrementally() || StressReflectiveCode) failed: inconsistent
#
# JRE version: Java(TM) SE Runtime Environment (22.0+13) (fastdebug build 22-ea+13-893)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 22-ea+13-893, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# V  [libjvm.so+0x5cb858][thread 2882454 also had an error]
  ArrayCopyNode::get_count(PhaseGVN*) const+0x318
#
# Core dump will be written. Default location: Core dumps may be processed with "/opt/core.sh %p" (or dumping to /opt/mach5/mesos/work_dir/slaves/cd627e65-f015-4fb1-a1d2-b6c9b8127f98-S140206/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/e6c933b5-0f70-447c-b126-cecc796d8682/runs/691795a7-a726-4d41-acc4-49f2e7e22c06/testoutput/test-support/jtreg_open_test_jdk_tier1/scratch/3_1/core.2882412)
#
# An error report file with more information is saved as:
# /opt/mach5/mesos/work_dir/slaves/cd627e65-f015-4fb1-a1d2-b6c9b8127f98-S140206/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/e6c933b5-0f70-447c-b126-cecc796d8682/runs/691795a7-a726-4d41-acc4-49f2e7e22c06/testoutput/test-support/jtreg_open_test_jdk_tier1/scratch/3_1/hs_err_pid2882412.log

------ Timeout during error reporting after 120 s. ------
# [ timer expired, abort... ]
----------System.err:(2/117)----------
Note: StringTemplateTest$.java uses preview features of Java SE 22.
Note: Recompile with -Xlint:preview for details.
----------rerun:(39/5906)*----------


Here's the crashing thread's stack:

---------------  T H R E A D  ---------------

Current thread (0x0000ffff326d21d0):  JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=2882708, stack(0x0000ffff5c27f000,0x0000ffff5c47d000) (2040K)]


Current CompileTask:
C2:  17957 4785       4       java.lang.invoke.StringConcatFactory::makeConcatWithTemplate (645 bytes)

Stack: [0x0000ffff5c27f000,0x0000ffff5c47d000],  sp=0x0000ffff5c478310,  free space=2020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x5cb858]  ArrayCopyNode::get_count(PhaseGVN*) const+0x318  (arraycopynode.cpp:140)
V  [libjvm.so+0x5d0d54]  ArrayCopyNode::Ideal(PhaseGVN*, bool)+0x100  (arraycopynode.cpp:560)
V  [libjvm.so+0x13eb318]  PhaseGVN::transform_no_reclaim(Node*)+0x88  (phaseX.cpp:667)
V  [libjvm.so+0x5f39c8]  BarrierSetC2::clone(GraphKit*, Node*, Node*, Node*, bool) const+0x1f4  (barrierSetC2.cpp:692)
V  [libjvm.so+0x787910]  CardTableBarrierSetC2::clone(GraphKit*, Node*, Node*, Node*, bool) const+0x2c  (cardTableBarrierSetC2.cpp:129)
V  [libjvm.so+0x10e7ee0]  LibraryCallKit::copy_to_clone(Node*, Node*, Node*, bool)+0x180  (library_call.cpp:4935)
V  [libjvm.so+0x10f7ec0]  LibraryCallKit::inline_native_clone(bool)+0x840  (library_call.cpp:5058)
V  [libjvm.so+0x1106b90]  LibraryIntrinsic::generate(JVMState*)+0x17c  (library_call.cpp:118)
V  [libjvm.so+0xa7f96c]  Parse::do_call()+0x58c  (doCall.cpp:675)
V  [libjvm.so+0x13c3ea8]  Parse::do_one_bytecode()+0x4d8  (parse2.cpp:2728)
V  [libjvm.so+0x13b389c]  Parse::do_one_block()+0x59c  (parse1.cpp:1577)
V  [libjvm.so+0x13b47f0]  Parse::do_all_blocks()+0x150  (parse1.cpp:713)
V  [libjvm.so+0x13b8958]  Parse::Parse(JVMState*, ciMethod*, float)+0xa38  (parse1.cpp:617)
V  [libjvm.so+0x75e768]  ParseGenerator::generate(JVMState*)+0x168  (callGenerator.cpp:99)
V  [libjvm.so+0xa7f96c]  Parse::do_call()+0x58c  (doCall.cpp:675)
V  [libjvm.so+0x13c3ea8]  Parse::do_one_bytecode()+0x4d8  (parse2.cpp:2728)
V  [libjvm.so+0x13b389c]  Parse::do_one_block()+0x59c  (parse1.cpp:1577)
V  [libjvm.so+0x13b47f0]  Parse::do_all_blocks()+0x150  (parse1.cpp:713)
V  [libjvm.so+0x13b8958]  Parse::Parse(JVMState*, ciMethod*, float)+0xa38  (parse1.cpp:617)
V  [libjvm.so+0x75e768]  ParseGenerator::generate(JVMState*)+0x168  (callGenerator.cpp:99)
V  [libjvm.so+0x904b9c]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0xfdc  (compile.cpp:779)
V  [libjvm.so+0x75c3b0]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x110  (c2compiler.cpp:119)
V  [libjvm.so+0x911044]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x8e4  (compileBroker.cpp:2276)
V  [libjvm.so+0x911a74]  CompileBroker::compiler_thread_loop()+0x594  (compileBroker.cpp:1944)
V  [libjvm.so+0xdaaa7c]  JavaThread::thread_main_inner()+0xec  (javaThread.cpp:720)
V  [libjvm.so+0x160c084]  Thread::call_run()+0xb0  (thread.cpp:220)
V  [libjvm.so+0x1365978]  thread_native_entry(Thread*)+0x138  (os_linux.cpp:784)
C  [libpthread.so.0+0x7908]  start_thread+0x188
Comments
Changeset: 1c3177ee Author: Roberto CastaƱeda Lozano <rcastanedalo@openjdk.org> Date: 2023-08-28 11:08:44 +0000 URL: https://git.openjdk.org/jdk/commit/1c3177eea74263d8edd7e90ecb962180ea587a9b
28-08-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/15442 Date: 2023-08-28 08:19:08 +0000
28-08-2023

ILW = Assert in C2 parsing, multiple tests in tier 4, use different GC = HMM = P2
28-08-2023

Thanks for the report, [~mdoerr] and [~mbaesken]. I will back out JDK-8312749 and work on a redo that addresses these failures.
28-08-2023

those 2 tests : javax/imageio/plugins/shared/RepeatingWriteTest.java sun/java2d/cmm/ColorConvertOp/UnexpectedSourceImageSize.java started to crash pretty often (always?) on x86_64 / aaarch64 platforms. At least this is what we see in our central internal tests.
28-08-2023

Are these tests also failing intermittently? If there is too much noise, we might need to think about backing JDK-8312749 out if there is not a quick fix available.
28-08-2023

The problem can also be observed in the following tier 4 tests: javax/imageio/plugins/shared/RepeatingWriteTest.java sun/java2d/cmm/ColorConvertOp/UnexpectedSourceImageSize.java
27-08-2023

Bumping from P4 -> P2 since this appears to be a regression.
25-08-2023

I can confirm that this failure is caused by JDK-8312749. Before the integration of JDK-8312749, I do not see a single failure in 20 runs of StringTemplateTest.java. After the integration, I see the failure in 13 out of 20 runs, for both linux-x64 and linux-aarch64.
25-08-2023

Could be a regression from JDK-8312749. Roberto, could you please have a look? Thanks.
25-08-2023