JDK-8248467 : C2: compiler/intrinsics/object/TestClone fails with -XX:+VerifyGraphEdges
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 15,16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-06-29
  • Updated: 2021-03-09
  • Resolved: 2020-07-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 15 JDK 16
15.0.1Fixed 16 b07Fixed
Related Reports
Relates :  
Relates :  
Description
Run this:

$ CONF=linux-x86_64-server-fastdebug make images run-test TEST=compiler/intrinsics/object/TestClone.java TEST_VM_OPTS="-XX:+VerifyGraphEdges"

#  Internal Error (/home/shade/trunks/jdk-jdk/src/hotspot/share/opto/node.cpp:2140), pid=645700, tid=645714
#  assert(i >= req() || i == 0 || is_Region() || is_Phi() || is_ArrayCopy() || (is_Unlock() && i == req()-1)) failed: only region, phi, arraycopy or unlock nodes have null data edges
#
# JRE version: OpenJDK Runtime Environment (16.0) (fastdebug build 16-internal+0-adhoc.shade.jdk-jdk)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 16-internal+0-adhoc.shade.jdk-jdk, mixed mode, sharing, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x13b1eb8]  Node::verify_edges(Unique_Node_List&)+0x2c8
#

Current CompileTask:
C2:    438   18   !b        compiler.intrinsics.object.TestClone::test2 (17 bytes)

Stack: [0x00007f567195c000,0x00007f5671a5d000],  sp=0x00007f5671a58390,  free space=1008k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x13b1eb8]  Node::verify_edges(Unique_Node_List&)+0x2c8
V  [libjvm.so+0x13b20c5]  Node::verify_edges(Unique_Node_List&)+0x4d5
V  [libjvm.so+0x13b20c5]  Node::verify_edges(Unique_Node_List&)+0x4d5
V  [libjvm.so+0x13b20c5]  Node::verify_edges(Unique_Node_List&)+0x4d5
V  [libjvm.so+0x13b20c5]  Node::verify_edges(Unique_Node_List&)+0x4d5
V  [libjvm.so+0x13b20c5]  Node::verify_edges(Unique_Node_List&)+0x4d5
V  [libjvm.so+0x13b20c5]  Node::verify_edges(Unique_Node_List&)+0x4d5
V  [libjvm.so+0x13b20c5]  Node::verify_edges(Unique_Node_List&)+0x4d5
V  [libjvm.so+0x13b20c5]  Node::verify_edges(Unique_Node_List&)+0x4d5
V  [libjvm.so+0x13b20c5]  Node::verify_edges(Unique_Node_List&)+0x4d5
V  [libjvm.so+0x91fc51]  Compile::verify_graph_edges(bool) [clone .part.0]+0x181
V  [libjvm.so+0x14b20ef]  PhaseIterGVN::verify_PhaseIterGVN()+0x19f
V  [libjvm.so+0x12096ae]  PhaseMacroExpand::expand_macro_nodes()+0x123e
V  [libjvm.so+0x93af59]  Compile::Optimize()+0xf99
V  [libjvm.so+0x93c7b6]  Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, DirectiveSet*)+0x1506
V  [libjvm.so+0x789310]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0x170
V  [libjvm.so+0x94a020]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0xc10
V  [libjvm.so+0x94acf8]  CompileBroker::compiler_thread_loop()+0x6c8
V  [libjvm.so+0x1844ddc]  JavaThread::thread_main_inner()+0x21c
V  [libjvm.so+0x184a9c4]  Thread::call_run()+0x104
V  [libjvm.so+0x142ffbe]  thread_native_entry(Thread*)+0x11e

(I put a few affected-versions provisionally)
Comments
This does not reproduce with 11u for me. Dropping the affected versions until it does (probably never, if we never backport features that expose this).
09-03-2021

Fix Request (15u) This improves testability by amending the faulty assert that might mask other issues. Patch applies cleanly to 15u, new test fails without the product patch, passes with it. Additionally, tier1 passes.
17-08-2020

The assertion is hit due to a MemBarNode whose precedence edge was set to NULL at [1] (result_phi_rawoop is NULL and _resproj is the precedence edge to a MemBarStoreStore). This is possible since JDK-8237581 which can remove some allocations. The fix just adds this additional case in the assert. [1] http://hg.openjdk.java.net/jdk/jdk/file/4a8fd81d64ba/src/hotspot/share/opto/macro.cpp#l1566
27-07-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/f1ac61e010ef User: chagedorn Date: 2020-07-22 10:06:27 +0000
22-07-2020

Hi [~shade], with which build from 11 could you reproduce it?
09-07-2020

Similar to JDK-8238811.
29-06-2020

ILW = Assert during C2's verify graph edges (probably false-positive), single test with -XX:+VerifyGraphEdges debug flag, disable flag or compilation of affected method = MLM = P4
29-06-2020