JDK-8323692 : [premain] assert(false) failed: type flow analysis failed for OSR compilation
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: repo-leyden
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2024-01-13
  • Updated: 2024-08-13
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-leydenUnresolved
Related Reports
Relates :  
Relates :  
Description
Intermittent assertion failure:

#  Internal Error (src/hotspot/share/opto/parse1.cpp:513), pid=17160, tid=25347
#  assert(false) failed: type flow analysis failed for OSR compilation

Current thread (0x000000013580d010):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=25347, stack(0x000000016d20c000,0x000000016d40f000) (2060K)]

Command Line: -Xlog:init -DautoQuit=true -Dspring.output.ansi.enabled=NEVER -Dserver.port=0 -Xlog:scc*=warning,cds:file=SpringPetClinic.old-production.log::filesize=0 -XX:SharedArchiveFile=SpringPetClinic.dynamic.jsa -XX:+ReplayTraining -XX:+LoadCachedCode -XX:CachedCodeFile=SpringPetClinic.code.jsa -Xlog:scc=error org.springframework.samples.petclinic.PetClinicApplication

Time ... elapsed time: 9.598078 seconds (0d 0h 0m 9s)

Current CompileTask:
C2:  F9598 C11 Q38 S1 4178 % !     4       java.util.concurrent.ConcurrentHashMap::transfer @ 96 (849 bytes)

Stack: [0x000000016d20c000,0x000000016d40f000],  sp=0x000000016d40c910,  free space=2050k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.dylib+0x119c6a4]  VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x564  (parse1.cpp:513)
V  [libjvm.dylib+0x119cec4]  VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*)+0x0
V  [libjvm.dylib+0x5905b0]  print_error_for_unit_test(char const*, char const*, char*)+0x0
V  [libjvm.dylib+0xebfb00]  Parse::Parse(JVMState*, ciMethod*, float)+0xae8
V  [libjvm.dylib+0x3a09e4]  ParseGenerator::generate(JVMState*)+0x11c
V  [libjvm.dylib+0x4ef44c]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0xd30
V  [libjvm.dylib+0x39e770]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x2f8
V  [libjvm.dylib+0x50d8d8]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x47c
V  [libjvm.dylib+0x50d05c]  CompileBroker::compiler_thread_loop()+0x330
V  [libjvm.dylib+0x8fbb94]  JavaThread::thread_main_inner()+0x1dc

Comments
Observed timeouts were in tier4 testing in jdk/incubator/vector/ tests. Particularly jdk/incubator/vector/AddTest.java
13-08-2024

Before I forgot. We tracked the issue down to the `is_unresolved_klass()` check in ciTypeFlow::StateVector::do_new() which marks block as having trap and stopping type analysis for following blocks including OSR block. Unfortunately removing `is_unresolved_klass()` check causes loop generation issue. I see timeouts in some vectorization tests. I did not investigate what happened in test yet. But it could be related because the check was added for JDK-6384206 to remove dead code early.
09-08-2024

Similar failures observed before: JDK-8309353, JDK-8312096
13-01-2024