JDK-8283451 : C2: assert(_base == Long) failed: Not a Long
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,16,17,18,19
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-03-21
  • Updated: 2022-04-04
  • Resolved: 2022-03-22
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 11 JDK 17 JDK 18 JDK 19
11.0.16-oracleFixed 17.0.4-oracleFixed 18.0.2Fixed 19 b15Fixed
Related Reports
Relates :  
Relates :  
Description
(synopsis is provisional, change as you see fit)

Attached Fuzzer test fails:

$ build/linux-x86_64-server-fastdebug/images/jdk/bin/java -cp 0006/ -Xmx512m -XX:+UnlockDiagnosticVMOptions -XX:+StressLCM -XX:+StressGCM -XX:+StressCCP -XX:+StressIGVN -Xcomp -XX:CompileOnly=Test -XX:-TieredCompilation -XX:StressSeed=85215050 Test

#  Internal Error (/home/shade/trunks/jdk/src/hotspot/share/opto/type.hpp:1743), pid=3117013, tid=3117054
#  assert(_base == Long) failed: Not a Long
#
# JRE version: OpenJDK Runtime Environment (19.0) (fastdebug build 19-internal-adhoc.shade.jdk)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 19-internal-adhoc.shade.jdk, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x16a6dcf]  PhaseIterGVN::no_dependent_zero_check(Node*) const+0x14f

Stack: [0x00007fa05d747000,0x00007fa05d848000],  sp=0x00007fa05d842f30,  free space=1007k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x16a6dcf]  PhaseIterGVN::no_dependent_zero_check(Node*) const+0x14f
V  [libjvm.so+0xeca7a9]  IfNode::dominated_by(Node*, PhaseIterGVN*)+0x389
V  [libjvm.so+0x16aae58]  PhaseIterGVN::transform_old(Node*)+0xb8
V  [libjvm.so+0x16a3f2e]  PhaseIterGVN::optimize()+0x7e
V  [libjvm.so+0xac2ba4]  Compile::Optimize()+0x884
V  [libjvm.so+0xac4b34]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1244
V  [libjvm.so+0x8dcb8b]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x69b
V  [libjvm.so+0xad5cb8]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0xe48
V  [libjvm.so+0xad6a48]  CompileBroker::compiler_thread_loop()+0x668
V  [libjvm.so+0x1a4563c]  JavaThread::thread_main_inner()+0x28c
V  [libjvm.so+0x1a4bc94]  Thread::call_run()+0x104
V  [libjvm.so+0x162450c]  thread_native_entry(Thread*)+0x10c

Seems to only fail with that particular StressSeed, and bisection points to JDK-8282045 as the first bad commit (that might be accidental).
Comments
A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk17u-dev/pull/313 Date: 2022-03-30 11:05:06 +0000
30-03-2022

Fix Request (17u): Should get backported for parity with 17.0.4-oracle. Applies cleanly. Test has passed.
30-03-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk18u/pull/60 Date: 2022-03-29 15:07:39 +0000
29-03-2022

Fix Request (JDK 18u) Fixes an assert in C2. The fix is low risk and applies cleanly. Already tested and backported to Oracle JDK 17u. Tier 1-3 testing is running for JDK 18u.
29-03-2022

Fixed code was introduced in JDK 16 with JDK-8260284 which was backported to 11. Adding affected versions accordingly.
22-03-2022

Changeset: fabde3b7 Author: Roland Westrelin <roland@openjdk.org> Date: 2022-03-22 14:06:49 +0000 URL: https://git.openjdk.java.net/jdk/commit/fabde3b7b8ed5e576febe8138c14696ccdf636d5
22-03-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7902 Date: 2022-03-22 11:27:56 +0000
22-03-2022

ILW = assert failure with fuzzer; intermittent; no workaround = MMH = P3
21-03-2022