JDK-8340454 : C2 EA asserts with "previous reducible Phi is no longer reducible before SUT"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 23,24
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-09-19
  • Updated: 2024-11-11
  • Resolved: 2024-11-05
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 b23Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
4096  157    b  4       org.springframework.core.convert.support.CollectionToCollectionConverter::convert (197 bytes)
    0  Root  === 0 39 62 76 115 133 152 211 236 254 308 358 457 559 750 766 787 820 922 957 1012 1023 1034 1290 1289 1279 1147 1162 1176 1229 1262  [[ 0 1 3 25 34 1189 43 44 48 57 71 78 81 97 117 128 1363 197 221 241 360 392 1200 1057 1029 1018 578 596 621 1007 698 713 738 952 839 865 871 1370 1371 ]] 
  406  Proj  === 394  [[ 407 411 ]] #5 !jvms: TypeDescriptor::getElementTypeDescriptor @ bci:10 (line 335) CollectionToCollectionConverter::convert @ bci:48 (line 75)
  408  Proj  === 407  [[ 450 411 ]] #0 !jvms: TypeDescriptor::getElementTypeDescriptor @ bci:10 (line 335) CollectionToCollectionConverter::convert @ bci:48 (line 75)
 1263  IfFalse  === 1254  [[ 318 ]] #0 !jvms: TypeDescriptor::getRelatedIfResolvable @ bci:4 (line 724) TypeDescriptor::getElementTypeDescriptor @ bci:84 (line 340) CollectionToCollectionConverter::convert @ bci:48 (line 75)
  704  Proj  === 703  [[ 318 ]] #0 !jvms: TypeDescriptor::<init> @ bci:-1 (line 125) TypeDescriptor::getElementTypeDescriptor @ bci:26 (line 335) CollectionToCollectionConverter::convert @ bci:48 (line 75)
   25  ConP  === 0  [[ 26 64 72 104 111 120 225 232 347 354 446 453 1269 322 489 1252 1225 1351 1143 1136 809 816 548 555 600 918 911 739 746 754 ]]  #null
  411  CheckCastPP  === 408 406  [[ 703 699 653 699 623 623 623 618 466 466 618 537 537 322 489 489 ]]  #org/springframework/core/convert/TypeDescriptor (java/io/Serializable):NotNull:exact *  Oop:org/springframework/core/convert/TypeDescriptor (java/io/Serializable):NotNull:exact * !jvms: TypeDescriptor::getElementTypeDescriptor @ bci:10 (line 335) CollectionToCollectionConverter::convert @ bci:48 (line 75)
  318  Region  === 318 704 1263  [[ 318 322 319 320 1271 ]]  !jvms: CollectionToCollectionConverter::convert @ bci:48 (line 75)
  322  Phi  === 318 411 25  [[ 1275 1275 1269 ]]  #org/springframework/core/convert/TypeDescriptor (java/io/Serializable):exact *  Oop:org/springframework/core/convert/TypeDescriptor (java/io/Serializable):exact * !jvms: CollectionToCollectionConverter::convert @ bci:48 (line 75)
  322  Phi  === 318 411 25  [[ 1275 1275 1269 ]]  #org/springframework/core/convert/TypeDescriptor (java/io/Serializable):exact *  Oop:org/springframework/core/convert/TypeDescriptor (java/io/Serializable):exact * !jvms: CollectionToCollectionConverter::convert @ bci:48 (line 75)
 1275  CallStaticJava  === 1274 319 320 8 9 (34 10 54 12 77 54 44 322 1 1 1 1 322 ) [[ 1276 ]] # Static uncommon_trap(reason='unstable_if' action='reinterpret' debug_id='0')  void ( int ) C=0.000100 CollectionToCollectionConverter::convert @ bci:55 (line 76) reexecute !jvms: CollectionToCollectionConverter::convert @ bci:55 (line 76)
 1269  CmpP  === _ 322 25  [[ 1270 ]]  !jvms: CollectionToCollectionConverter::convert @ bci:55 (line 76)
 1276  Proj  === 1275  [[ 1279 ]] #0 !jvms: CollectionToCollectionConverter::convert @ bci:55 (line 76)
 1270  Bool  === _ 1269  [[ 1271 ]] [ne] !jvms: CollectionToCollectionConverter::convert @ bci:55 (line 76)
Can NOT reduce Phi 322 on invocation 0. No SR Allocate as input.
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/opt/mach5/mesos/work_dir/slaves/7a20d425-e769-4142-b5c1-e3cc2d88e03e-S17105/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/0bf0bce7-7ba3-45ac-a25b-a3d9ebb91b4e/runs/af53efcd-4323-42dd-bb8a-98a4496bca96/workspace/open/src/hotspot/share/opto/escape.cpp:385), pid=3744273, tid=3744288
#  assert(can_reduce_phi(n->as_Phi())) failed: Sanity: previous reducible Phi is no longer reducible before SUT.
#
# JRE version: Java(TM) SE Runtime Environment (24.0+18) (fastdebug build 24-ea+18-2073)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 24-ea+18-2073, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0xc06a44]  ConnectionGraph::compute_escape()+0x2324

Current CompileTask:
C2:4104  157    b  4       org.springframework.core.convert.support.CollectionToCollectionConverter::convert (197 bytes)

Stack: [0x0000778db1000000,0x0000778db1100000],  sp=0x0000778db10facb0,  free space=1003k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xc06a44]  ConnectionGraph::compute_escape()+0x2324  (escape.cpp:385)
V  [libjvm.so+0xc07061]  ConnectionGraph::do_analysis(Compile*, PhaseIterGVN*)+0xf1
V  [libjvm.so+0xa2c02a]  Compile::Optimize()+0x63a
V  [libjvm.so+0xa2ffd0]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1b80
V  [libjvm.so+0x878bc5]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1d5
V  [libjvm.so+0xa3bcd8]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x928
V  [libjvm.so+0xa3c968]  CompileBroker::compiler_thread_loop()+0x478
V  [libjvm.so+0xeedc7c]  JavaThread::thread_main_inner()+0xcc
V  [libjvm.so+0x1813a86]  Thread::call_run()+0xb6
V  [libjvm.so+0x14f8ee7]  thread_native_entry(Thread*)+0x127
C  [libc.so.6+0x9ca94]
Comments
Changeset: d4d9831c Branch: master Author: Cesar Soares Lucas <cslucas@openjdk.org> Date: 2024-11-05 21:19:31 +0000 URL: https://git.openjdk.org/jdk/commit/d4d9831c9075c1a157d8375e6902bfc6c731389a
05-11-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/21778 Date: 2024-10-30 00:40:22 +0000
30-10-2024

Sorry, only now I saw this failure. Thanks for assigning. I'm on it.
14-10-2024

Cesar, could you please have a look?
14-10-2024

I can now reliably reproduce this with attached jars from the DaCapo 23.11-chopin benchmark and the replay file with JDK 24 b18: java -XX:+ReplayCompiles -XX:+ReplayIgnoreInitErrors -XX:ReplayDataFile=replay_pid1300147.log -cp "jars/*" 4106 157 b 4 org.springframework.core.convert.support.CollectionToCollectionConverter::convert (197 bytes) 0 Root === 0 39 62 76 115 133 152 211 236 254 308 358 457 559 750 766 787 820 922 957 1012 1023 1034 1290 1289 1279 1147 1162 1176 1229 1262 [[ 0 1 3 25 34 1189 43 44 48 57 71 78 81 97 117 128 1363 197 221 241 360 392 1200 1057 1029 1018 578 596 621 1007 698 713 738 952 839 865 871 1370 1371 ]] 406 Proj === 394 [[ 407 411 ]] #5 !jvms: TypeDescriptor::getElementTypeDescriptor @ bci:10 (line 335) CollectionToCollectionConverter::convert @ bci:48 (line 75) 408 Proj === 407 [[ 450 411 ]] #0 !jvms: TypeDescriptor::getElementTypeDescriptor @ bci:10 (line 335) CollectionToCollectionConverter::convert @ bci:48 (line 75) 1263 IfFalse === 1254 [[ 318 ]] #0 !jvms: TypeDescriptor::getRelatedIfResolvable @ bci:4 (line 724) TypeDescriptor::getElementTypeDescriptor @ bci:84 (line 340) CollectionToCollectionConverter::convert @ bci:48 (line 75) 704 Proj === 703 [[ 318 ]] #0 !jvms: TypeDescriptor::<init> @ bci:-1 (line 125) TypeDescriptor::getElementTypeDescriptor @ bci:26 (line 335) CollectionToCollectionConverter::convert @ bci:48 (line 75) 25 ConP === 0 [[ 26 64 72 104 111 120 225 232 347 354 446 453 1269 322 489 1252 1225 1351 1143 1136 809 816 548 555 600 918 911 739 746 754 ]] #null 411 CheckCastPP === 408 406 [[ 703 699 653 699 623 623 623 618 466 466 618 537 537 322 489 489 ]] #org/springframework/core/convert/TypeDescriptor (java/io/Serializable):NotNull:exact * Oop:org/springframework/core/convert/TypeDescriptor (java/io/Serializable):NotNull:exact * !jvms: TypeDescriptor::getElementTypeDescriptor @ bci:10 (line 335) CollectionToCollectionConverter::convert @ bci:48 (line 75) 318 Region === 318 704 1263 [[ 318 322 319 320 1271 ]] !jvms: CollectionToCollectionConverter::convert @ bci:48 (line 75) 322 Phi === 318 411 25 [[ 1275 1275 1269 ]] #org/springframework/core/convert/TypeDescriptor (java/io/Serializable):exact * Oop:org/springframework/core/convert/TypeDescriptor (java/io/Serializable):exact * !jvms: CollectionToCollectionConverter::convert @ bci:48 (line 75) 322 Phi === 318 411 25 [[ 1275 1275 1269 ]] #org/springframework/core/convert/TypeDescriptor (java/io/Serializable):exact * Oop:org/springframework/core/convert/TypeDescriptor (java/io/Serializable):exact * !jvms: CollectionToCollectionConverter::convert @ bci:48 (line 75) 1275 CallStaticJava === 1274 319 320 8 9 (34 10 54 12 77 54 44 322 1 1 1 1 322 ) [[ 1276 ]] # Static uncommon_trap(reason='unstable_if' action='reinterpret' debug_id='0') void ( int ) C=0.000100 CollectionToCollectionConverter::convert @ bci:55 (line 76) reexecute !jvms: CollectionToCollectionConverter::convert @ bci:55 (line 76) 1269 CmpP === _ 322 25 [[ 1270 ]] !jvms: CollectionToCollectionConverter::convert @ bci:55 (line 76) 1276 Proj === 1275 [[ 1279 ]] #0 !jvms: CollectionToCollectionConverter::convert @ bci:55 (line 76) 1270 Bool === _ 1269 [[ 1271 ]] [ne] !jvms: CollectionToCollectionConverter::convert @ bci:55 (line 76) Can NOT reduce Phi 322 on invocation 0. No SR Allocate as input. # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (workspace/open/src/hotspot/share/opto/escape.cpp:385), pid=3737793, tid=3737807 # assert(can_reduce_phi(n->as_Phi())) failed: Sanity: previous reducible Phi is no longer reducible before SUT. # # JRE version: Java(TM) SE Runtime Environment (24.0+18) (fastdebug build 24-ea+18-2073) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 24-ea+18-2073, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64) # Problematic frame: # V [libjvm.so+0xc06a44] ConnectionGraph::compute_escape()+0x2324 With G1, this only reproduces after JDK-8334060 in JDK 24 but with -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC I can also reproduce this with JDK 23. I narrowed it down to JDK-8316991 in JDK 23 b18.
08-10-2024

ILW = Assert during C2 compilation, intermittent with Graal build, -XX:-ReduceAllocationMerges = HLM = P3
23-09-2024

Most likely a regression of JDK-8287061 or one of the follow-up improvements / fixes.
23-09-2024