JDK-8321734 : [lworld] C2: flat_in_array type is not handled correctly leading to crashes
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: repo-valhalla
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-12-11
  • Updated: 2024-06-06
  • Resolved: 2024-04-24
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.
Other
repo-valhallaFixed
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
Description
Starts to fail after JDK-8320437 which most likely just revealed an existing issue.

Failing test: applications/ctw/modules/jdk_jshell.java
Additional flags: -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:+TieredCompilation 

Can be reproduced with attached replay file r.log

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/mach5/mesos/work_dir/slaves/0db9c48f-6638-40d0-9a4b-bd9cc7533eb8-S18605/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c00b451b-1873-407e-a6cf-606763dd6d66/runs/19b076e5-af56-472f-9b77-287a7e8cd673/workspace/open/src/hotspot/share/opto/multnode.cpp:77), pid=2017392, tid=2017406
#  assert((Opcode() != Op_If && Opcode() != Op_RangeCheck) || outcnt() == 2) failed: bad if #1
#
# JRE version: Java(TM) SE Runtime Environment (22.0+1) (fastdebug build 22-valhalla+1-34)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 22-valhalla+1-34, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x144870c]  MultiNode::proj_out(unsigned int) const+0x8c
.........
Command Line: -XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/20/36/bundles/linux-x64/jdk-20_linux-x64_bin.tar.gz/jdk-20 -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/0db9c48f-6638-40d0-9a4b-bd9cc7533eb8-S27293/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/ff7fe090-e9c4-4b32-a746-5c693b64895a/runs/1ec942ef-24d4-4e2b-9528-fcc0dc6cc205/testoutput/test-support/jtreg_open_test_hotspot_jtreg_ctw_1/tmp -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -XX:+TieredCompilation -Djava.awt.headless=true -Xbatch -XX:-UseCounterDecay -XX:-ShowMessageBoxOnError -XX:+UnlockDiagnosticVMOptions -XX:+DisplayVMOutputToStderr -DCompileTheWorldStartAt=0 -DCompileTheWorldStopAt=299 -XX:+WhiteBoxAPI -Xbootclasspath/a:. --add-exports=java.base/jdk.internal.jimage=ALL-UNNAMED --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED --add-exports=java.base/jdk.internal.reflect=ALL-UNNAMED --add-exports=java.base/jdk.internal.access=ALL-UNNAMED -XX:+LogCompilation -XX:LogFile=hotspot_modules_jdk_jshell_0_%p.log -XX:ErrorFile=hs_err_modules_jdk_jshell_0_%p.log -XX:ReplayDataFile=replay_modules_jdk_jshell_0_%p.log -XX:CompileCommand=exclude,java/lang/invoke/MethodHandle.* -XX:+IgnoreUnrecognizedVMOptions -XX:+StressLCM -XX:+StressGCM -XX:+StressIGVN -XX:+StressCCP -XX:StressSeed=408484069 sun.hotspot.tools.ctw.CompileTheWorld modules:jdk.jshell
........
Current CompileTask:
C2:  36616 8503    b  4       jdk.jshell.Wrap$CompoundWrap::snippetIndexToWrapIndex (167 bytes)

Stack: [0x00007fe254d3f000,0x00007fe254e3f000],  sp=0x00007fe254e3a2f0,  free space=1004k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x144870c]  MultiNode::proj_out(unsigned int) const+0x8c  (multnode.cpp:77)
V  [libjvm.so+0x130e31a]  PhaseMacroExpand::expand_subtypecheck_node(SubTypeCheckNode*)+0x1fa  (macro.cpp:2716)
V  [libjvm.so+0x1317689]  PhaseMacroExpand::expand_macro_nodes()+0xb09  (macro.cpp:3093)
V  [libjvm.so+0xa259b9]  Compile::Optimize()+0xfd9  (compile.cpp:2920)
V  [libjvm.so+0xa28e11]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1b61  (compile.cpp:867)
V  [libjvm.so+0x87276b]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x13b  (c2compiler.cpp:119)
V  [libjvm.so+0xa347e0]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x980  (compileBroker.cpp:2285)
V  [libjvm.so+0xa354c8]  CompileBroker::compiler_thread_loop()+0x4a8  (compileBroker.cpp:1946)
V  [libjvm.so+0xefa49c]  JavaThread::thread_main_inner()+0xcc  (javaThread.cpp:721)
V  [libjvm.so+0x1809dfa]  Thread::call_run()+0xba  (thread.cpp:220)
V  [libjvm.so+0x14efeda]  thread_native_entry(Thread*)+0x12a  (os_linux.cpp:785)
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/valhalla/pull/1079 Date: 2024-04-19 11:13:50 +0000
19-04-2024