JDK-8320175 : [BACKOUT] 8316533: C2 compilation fails with assert(verify(phase)) failed: missing Value() optimization
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 22,23
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: x86_64
  • Submitted: 2023-11-15
  • Updated: 2024-01-23
  • Resolved: 2024-01-16
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 JDK 23
22Fixed 23 b06Fixed
Related Reports
Relates :  
Description
The following test failed in the JDK22 CI:

java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerTest.java

Here's a snippet from the log file:

#section:main
----------messages:(7/508)----------
command: main -Djava.security.manager=allow BootstrapLoggerTest SECURE
reason: User specified action: run main/othervm -Djava.security.manager=allow BootstrapLoggerTest SECURE 
started: Wed Nov 15 08:54:11 UTC 2023
Mode: othervm [/othervm specified]
Additional options from @modules: --add-modules java.base,java.logging --add-exports java.base/jdk.internal.logger=ALL-UNNAMED --add-opens java.base/jdk.internal.logger=ALL-UNNAMED
finished: Wed Nov 15 08:54:40 UTC 2023
elapsed time (seconds): 29.835
----------configuration:(5/177)----------
Boot Layer
  add modules: java.base java.logging        
  add exports: java.base/jdk.internal.logger ALL-UNNAMED
  add opens:   java.base/jdk.internal.logger ALL-UNNAMED

----------System.out:(19/1142)*----------
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (c:\\sb\\prod\\1699897959\\workspace\\open\\src\\hotspot\\share\\opto/graphKit.hpp:369), pid=49992, tid=16712
#  assert(argument(0)->bottom_type()->isa_ptr()) failed: must be
#
# JRE version: Java(TM) SE Runtime Environment (22.0+24) (fastdebug build 22-ea+24-1880)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 22-ea+24-1880, compiled mode, sharing, compressed oops, compressed class ptrs, parallel gc, windows-amd64)
# Core dump will be written. Default location: C:\\sb\\prod\\1700032149\\testoutput\\test-support\\jtreg_open_test_jdk_jdk_lang\\scratch\\5\\hs_err_pid49992.mdmp
#
# An error report file with more information is saved as:
# C:\\sb\\prod\\1700032149\\testoutput\\test-support\\jtreg_open_test_jdk_jdk_lang\\scratch\\5\\hs_err_pid49992.log
#
# Compiler replay data is saved as:
# C:\\sb\\prod\\1700032149\\testoutput\\test-support\\jtreg_open_test_jdk_jdk_lang\\scratch\\5\\replay_pid49992.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
----------System.err:(10/620)----------
Testing: SECURE
Setting security manager
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by BootstrapLoggerTest (file:/C:/sb/prod/1700032149/testoutput/test-support/jtreg_open_test_jdk_jdk_lang/classes/1/java/lang/System/LoggerFinder/internal/BootstrapLogger/BootstrapLoggerTest.d/)
WARNING: Please consider reporting this to the maintainers of BootstrapLoggerTest
WARNING: System::setSecurityManager will be removed in a future release
VM Booted: false
LogManager initialized: false
VM Booted: true
LogManager initialized: false
----------rerun:(51/7027)*----------

<snip>

result: Failed. Unexpected exit from test [exit code: 1]


Here's the crashing thread's stack:

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

Current thread (0x000001f38f0c0160):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=16712, stack(0x0000001a47b00000,0x0000001a47c00000) (1024K)]


Current CompileTask:
C2:26231 4624  s b        jdk.internal.logger.SimpleConsoleLogger::format (58 bytes)

Stack: [0x0000001a47b00000,0x0000001a47c00000]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0xc8e531]  os::win32::platform_print_native_stack+0x101  (os_windows_x86.cpp:236)
V  [jvm.dll+0xf2eb0d]  VMError::report+0x147d  (vmError.cpp:1004)
V  [jvm.dll+0xf3115e]  VMError::report_and_die+0x80e  (vmError.cpp:1833)
V  [jvm.dll+0xf31884]  VMError::report_and_die+0x64  (vmError.cpp:1598)
V  [jvm.dll+0x55a8db]  report_vm_error+0x5b  (debug.cpp:191)
V  [jvm.dll+0x3f1745]  GraphKit::null_check_receiver_before_call+0x205  (graphKit.hpp:699)
V  [jvm.dll+0xcb207c]  Parse::create_entry_map+0x10c  (parse1.cpp:1148)
V  [jvm.dll+0xcaf658]  Parse::Parse+0x5d8  (parse1.cpp:563)
V  [jvm.dll+0x3ee451]  ParseGenerator::generate+0x91  (callGenerator.cpp:100)
V  [jvm.dll+0x3f0070]  PredictedCallGenerator::generate+0x300  (callGenerator.cpp:921)
V  [jvm.dll+0x607f02]  Parse::do_call+0x7e2  (doCall.cpp:675)
V  [jvm.dll+0xcc0d8d]  Parse::do_one_bytecode+0x270d  (parse2.cpp:2729)
V  [jvm.dll+0xcb3f0f]  Parse::do_one_block+0x38f  (parse1.cpp:1578)
V  [jvm.dll+0xcb2a2b]  Parse::do_all_blocks+0x39b  (parse1.cpp:716)
V  [jvm.dll+0xcaf96e]  Parse::Parse+0x8ee  (parse1.cpp:620)
V  [jvm.dll+0x3ee451]  ParseGenerator::generate+0x91  (callGenerator.cpp:100)
V  [jvm.dll+0x607f02]  Parse::do_call+0x7e2  (doCall.cpp:675)
V  [jvm.dll+0xcc0d8d]  Parse::do_one_bytecode+0x270d  (parse2.cpp:2729)
V  [jvm.dll+0xcb3f0f]  Parse::do_one_block+0x38f  (parse1.cpp:1578)
V  [jvm.dll+0xcb2a2b]  Parse::do_all_blocks+0x39b  (parse1.cpp:716)
V  [jvm.dll+0xcaf96e]  Parse::Parse+0x8ee  (parse1.cpp:620)
V  [jvm.dll+0x3ee451]  ParseGenerator::generate+0x91  (callGenerator.cpp:100)
V  [jvm.dll+0x607f02]  Parse::do_call+0x7e2  (doCall.cpp:675)
V  [jvm.dll+0xcc0d8d]  Parse::do_one_bytecode+0x270d  (parse2.cpp:2729)
V  [jvm.dll+0xcb3f0f]  Parse::do_one_block+0x38f  (parse1.cpp:1578)
V  [jvm.dll+0xcb2a2b]  Parse::do_all_blocks+0x39b  (parse1.cpp:716)
V  [jvm.dll+0xcaf96e]  Parse::Parse+0x8ee  (parse1.cpp:620)
V  [jvm.dll+0x3ee451]  ParseGenerator::generate+0x91  (callGenerator.cpp:100)
V  [jvm.dll+0x607f02]  Parse::do_call+0x7e2  (doCall.cpp:675)
V  [jvm.dll+0xcc0d8d]  Parse::do_one_bytecode+0x270d  (parse2.cpp:2729)
V  [jvm.dll+0xcb3f0f]  Parse::do_one_block+0x38f  (parse1.cpp:1578)
V  [jvm.dll+0xcb2a2b]  Parse::do_all_blocks+0x39b  (parse1.cpp:716)
V  [jvm.dll+0xcaf96e]  Parse::Parse+0x8ee  (parse1.cpp:620)
V  [jvm.dll+0x3ee451]  ParseGenerator::generate+0x91  (callGenerator.cpp:100)
V  [jvm.dll+0x4e0ad0]  Compile::Compile+0xea0  (compile.cpp:785)
V  [jvm.dll+0x3e9c39]  C2Compiler::compile_method+0x179  (c2compiler.cpp:137)
V  [jvm.dll+0x4fd1fd]  CompileBroker::invoke_compiler_on_method+0x72d  (compileBroker.cpp:2295)
V  [jvm.dll+0x4fa79b]  CompileBroker::compiler_thread_loop+0x33b  (compileBroker.cpp:1952)
V  [jvm.dll+0x805ea6]  JavaThread::thread_main_inner+0x266  (javaThread.cpp:721)
V  [jvm.dll+0xe953d7]  Thread::call_run+0x1b7  (thread.cpp:225)
V  [jvm.dll+0xc8cb86]  thread_native_entry+0xd6  (os_windows.cpp:553)
C  [ucrtbase.dll+0x26b4c]  (no source info available)
C  [KERNEL32.DLL+0x14de0]  (no source info available)
C  [ntdll.dll+0x7ed9b]  (no source info available)
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk22/pull/78 Date: 2024-01-16 10:20:13 +0000
16-01-2024

Changeset: e01f6da1 Author: Emanuel Peter <epeter@openjdk.org> Date: 2024-01-16 10:15:00 +0000 URL: https://git.openjdk.org/jdk/commit/e01f6da1b8e7de19f90c7cb21b3cd1ff2ab29cb7
16-01-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/17425 Date: 2024-01-15 13:39:29 +0000
15-01-2024

Backout Commit 1: sh jib.sh mach5 -- remote-build-and-test --email emanuel.peter@oracle.com --slack-channel @empeter --job tier1,tier2,tier3,tier4,hs-precheckin-comp,hs-comp-stress --jvm-args "" --comment "8320175: backout, commit 1" --patch-based https://mach5.us.oracle.com/mdash/jobs/emanuel-jdk-fork6-20240115-1339-4838586
15-01-2024

Emanuel, please have a look.
16-11-2023

I narrowed it down to jdk-22+23-1794, this is a regression from JDK-8316533. ILW = Assert during C2 compilation (regression), intermittent with single test, no workaround but disable compilation of affected method = HLM = P3
16-11-2023

Unfortunately, replay compilation fails with "assert(is_loaded()) failed: must be loaded" in ciInstanceKlass::compute_nonstatic_fields().
15-11-2023