JDK-8210387 : C2 compilation fails with "assert(node->_last_del == _last) failed: must have deleted the edge just produced"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8u172,9,10,11,12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-09-04
  • Updated: 2023-10-03
  • Resolved: 2018-09-12
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 12
11.0.6-oracleFixed 12 b11Fixed
Related Reports
Duplicate :  
Description
The example of test is in attachment. Run
java -Xcomp -XX:-TieredCompilation Test
to reproduce issue. head of hs_err is:
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/node.cpp:118
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/scratch/opt/mach5/mesos/work_dir/slaves/c4ee7e63-1ded-4e8c-9581-ce26f27e3af4-S72/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/3e8f11e1-a6d3-472f-9301-2c71c1d9e6b4/runs/25f26cb8-1ed1-4dce-8b18-41fa9ae0169e/workspace/open/src/hotspot/share/opto/node.cpp:118), pid=10789, tid=10800
#  assert(node->_last_del == _last) failed: must have deleted the edge just produced
#
# JRE version: Java(TM) SE Runtime Environment (12.0+9) (fastdebug build 12-ea+9)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 12-ea+9, compiled mode, compressed oops, g1 gc, linux-amd64)
# Core dump will be written. Default location: Core dumps may be processed with "/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t e %P %I %h" (or dumping to /scratch/lmesnik/ws/JavaFuzzer/results/12_05/crashes/r2-388/core.10789)
#
Comments
Fix Request (11u) This fixes the C2 compilation bug and keeps codebases in sync (I see 11.0.6-oracle). Patch applies cleanly to 11u, passes tier1 and tier2 tests. New test fails without the patch and passes with it.
04-09-2019

URL: http://hg.openjdk.java.net/jdk/jdk/rev/be8fe2a352be User: thartmann Date: 2018-09-12 07:24:16 +0000
12-09-2018

http://cr.openjdk.java.net/~thartmann/8210387/webrev.00/
11-09-2018

This is a very old issue, I can reproduce it even with JDK 8u172: -Xmx1G -Xcomp -Xbatch -XX:-TieredCompilation -XX:CompileOnly=Test Test ILW = Assert during C2 compilation, easy to reproduce but very old issue that only showed up with a generated test, disable compilation of method = HLM = P3
10-09-2018

The problem is that the code in PhaseCCP::transform_once() replaces all Phi users of a Region with TOP but that can trigger other Phis to be removed as well. Before the call to 'replace_node': 675 Region === _ 547 621 [[ 679 684 683 713 704 ]] !orig=[477] !jvms: Test::vMeth1 @ bci:134 679 Phi === 675 545 636 [[ 481 ]] #memory Memory: @int[int:>=0]:exact+any *, idx=4; !orig=481 !jvms: Test::vMeth1 @ bci:134 684 Loop === 684 476 675 [[ 684 485 484 483 482 481 701 710 486 493 ]] inner !orig=[477] !jvms: Test::vMeth1 @ bci:134 683 Phi === 675 539 660 [[ 485 ]] #memory Memory: @java/lang/Class:exact+172 *, name=iFld, idx=11; !orig=485 !jvms: Test::vMeth1 @ bci:134 713 Phi === 675 714 653 [[ 710 ]] #long !orig=[712],[601] !jvms: Test::vMeth1 @ bci:90 704 Phi === 675 537 658 [[ 701 ]] #int !orig=[703],[536] !jvms: Test::vMeth1 @ bci:174 And after: 675 Region === _ 547 621 [[ 704 684 683 ]] !orig=[477] !jvms: Test::vMeth1 @ bci:134 704 Phi === 675 537 658 [[ 701 ]] #int !orig=[703],[536] !jvms: Test::vMeth1 @ bci:174 684 Loop === 684 476 675 [[ 684 485 484 483 482 481 701 493 486 ]] inner !orig=[477] !jvms: Test::vMeth1 @ bci:134 683 Phi === 675 539 660 [[ 485 ]] #memory Memory: @java/lang/Class:exact+172 *, name=iFld, idx=11; !orig=485 !jvms: Test::vMeth1 @ bci:134
10-09-2018