JDK-8280842 : Access violation in ciTypeFlow::profiled_count
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 19
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-01-28
  • Updated: 2022-02-03
  • Resolved: 2022-02-02
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 19
19 b08Fixed
Related Reports
Relates :  
Relates :  
Description
Test:  javax/xml/crypto/dsig/GenerationTests.java

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ff84b2088a1, pid=4060, tid=18948
#
# JRE version: Java(TM) SE Runtime Environment (19.0+8) (build 19-ea+8-385)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (19-ea+8-385, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# V  [jvm.dll+0x1f88a1]  ciTypeFlow::profiled_count+0x6

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

Current thread (0x000002d74c256350):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=18948, stack(0x000000dbd6300000,0x000000dbd6400000)]


Current CompileTask:
C2:  64718 8602 % !   4       sun.net.httpserver.ServerImpl$Dispatcher::run @ 80 (551 bytes)

Stack: [0x000000dbd6300000,0x000000dbd6400000],  sp=0x000000dbd63fd630,  free space=1013k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0x1f88a1]  ciTypeFlow::profiled_count+0x61  (ciTypeFlow.cpp:2467)
V  [jvm.dll+0x1f551f]  ciTypeFlow::build_loop_tree+0x1bf  (ciTypeFlow.cpp:2644)
V  [jvm.dll+0x1f696b]  ciTypeFlow::df_flow_types+0x32b  (ciTypeFlow.cpp:2786)
V  [jvm.dll+0x1f77d1]  ciTypeFlow::flow_types+0x2c1  (ciTypeFlow.cpp:2822)
V  [jvm.dll+0x1f6ace]  ciTypeFlow::do_flow+0xe  (ciTypeFlow.cpp:2983)
V  [jvm.dll+0x1e6a3a]  ciMethod::get_osr_flow_analysis+0x7a  (ciMethod.cpp:354)
V  [jvm.dll+0x6aa168]  Parse::Parse+0x388  (parse1.cpp:505)
V  [jvm.dll+0x1be75c]  ParseGenerator::generate+0x8c  (callGenerator.cpp:103)
V  [jvm.dll+0x230703]  Compile::Compile+0x9e3  (compile.cpp:739)
V  [jvm.dll+0x1bb5b1]  C2Compiler::compile_method+0xc1  (c2compiler.cpp:115)
V  [jvm.dll+0x24032a]  CompileBroker::invoke_compiler_on_method+0x77a  (compileBroker.cpp:2293)
V  [jvm.dll+0x23e615]  CompileBroker::compiler_thread_loop+0x265  (compileBroker.cpp:1967)
V  [jvm.dll+0x7aa4e1]  JavaThread::run+0x131  (thread.cpp:1278)
V  [jvm.dll+0x7a493a]  Thread::call_run+0x8a  (thread.cpp:366)
V  [jvm.dll+0x69bd60]  thread_native_entry+0x80  (os_windows.cpp:544)
C  [ucrtbase.dll+0x1fb80]
C  [KERNEL32.DLL+0x84d4]
C  [ntdll.dll+0x51791]


siginfo: EXCEPTION_ACCESS_VIOLATION (0xc0000005), reading address 0x0000000000000000
Comments
I'm trying to sync up the loom repo to jdk-19+8 (which has the commit for JDK-8280842) and running into something in this same area. So far only seeing it with the test java/foreign/TestSegmentCopy.java where the compiler broker hits this assert: # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (/workspace/open/src/hotspot/share/utilities/growableArray.hpp:145), pid=28444, tid=29083 # assert(0 <= i && i < _len) failed: illegal index # # JRE version: Java(TM) SE Runtime Environment (19.0) (fastdebug build 19-internal+0-2022-02-03-0748181.alan.bateman.loom-merge) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 19-internal+0-2022-02-03-0748181.alan.bateman.loom-merge, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64) # Problematic frame: # V [libjvm.so+0x97caca] GrowableArrayView<ciTypeFlow::Block*>::at(int)+0x3a # : Current CompileTask: C2: 10015 1829 % ! 4 org.testng.internal.Invoker::invokeTestMethods @ 612 (1101 bytes) Stack: [0x00007ffa316f7000,0x00007ffa317f8000], sp=0x00007ffa317f46c0, free space=1013k Thread 0x00007ffa00e49f90 [29083] Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x97caca] GrowableArrayView<ciTypeFlow::Block*>::at(int)+0x3a V [libjvm.so+0x974fba] ciTypeFlow::profiled_count(ciTypeFlow::Loop*)+0x1aa V [libjvm.so+0x97577b] ciTypeFlow::Loop::sorted_merge(ciTypeFlow::Loop*)+0x26b V [libjvm.so+0x978dac] ciTypeFlow::build_loop_tree(ciTypeFlow::Block*)+0x1bc V [libjvm.so+0x97a702] ciTypeFlow::df_flow_types(ciTypeFlow::Block*, bool, ciTypeFlow::StateVector*, ciTypeFlow::JsrSet*)+0x612 V [libjvm.so+0x97ac4e] ciTypeFlow::flow_types()+0x41e V [libjvm.so+0x97b556] ciTypeFlow::do_flow()+0x26 V [libjvm.so+0x929251] ciMethod::get_osr_flow_analysis(int)+0x51 V [libjvm.so+0x14d65d0] Parse::Parse(JVMState*, ciMethod*, float)+0x820 V [libjvm.so+0x8a1845] ParseGenerator::generate(JVMState*)+0xd5 V [libjvm.so+0xa13fc2] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0xd82 V [libjvm.so+0x89ef68] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x178 V [libjvm.so+0xa21cd8] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xbc8 V [libjvm.so+0xa22818] CompileBroker::compiler_thread_loop()+0x408 V [libjvm.so+0x1745e3a] JavaThread::thread_main_inner()+0x1ea V [libjvm.so+0x174d1a0] Thread::call_run()+0x100 V [libjvm.so+0x148c9d4] thread_native_entry(Thread*)+0x104 I may have to create a follow-on issue to track this.
03-02-2022

Changeset: 97af3230 Author: Roland Westrelin <roland@openjdk.org> Date: 2022-02-02 07:35:34 +0000 URL: https://git.openjdk.java.net/jdk/commit/97af32304101397bb33cbbd1e35fd9124f9e2311
02-02-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7298 Date: 2022-02-01 09:47:28 +0000
01-02-2022

ILW = Crash during C2 compilation, intermittent with single test, no known workaround but disable compilation of affected method = HLM = P3
28-01-2022

Roland, could you please have a look?
28-01-2022

Code was just introduced by JDK-8278518.
28-01-2022