JDK-8210389 : C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-09-04
  • Updated: 2022-06-20
  • Resolved: 2018-10-11
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.5Fixed 12 b16Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
Description
Run attached example  with:
~/ws/jdk-12/fastdebug/bin/java -Xcomp  Test

fails with :
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/chaitin.cpp:1661
#
# 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/chaitin.cpp:1661), pid=11585, tid=11596
#  assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
#
# 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, tiered, 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-2126/core.11585)
#
Comments
Fix Request (11u) This resolves the C2 failure during compilation. Patch applies to 11u cleanly after JDK-8209420 backport. New test fails without product patch, passes with it. Patched build passes tier1.
19-08-2019

Seeing this fuzzer failure in 11u (see attached 0009.jdk11u.tar.gz): orig_old: 851 loadL === _ 300 1519 [[]] #128/0x0000000000000080 Volatile! !jvms: Test::vMeth1 @ bci:57 old: 851 loadL === _ 300 1519 [[]] #128/0x0000000000000080 Volatile! !jvms: Test::vMeth1 @ bci:57 # To suppress the following error report, specify this argument # after -XX: or in .hotspotrc: SuppressErrorAt=/postaloc.cpp:140 # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (/home/shade/trunks/jdk-updates-jdk11u-dev/src/hotspot/share/opto/postaloc.cpp:140), pid=23805, tid=23816 # assert(false) failed: unexpected yanked node It seems to be resolved by this fix. This requires JDK-8209420 to be in first.
19-08-2019

URL: http://hg.openjdk.java.net/jdk/jdk/rev/4cffba2df537 User: roland Date: 2018-10-11 09:55:27 +0000
11-10-2018

Roland, could you please have a look? The crash is easy to reproduce with: java -Xmx1G -Xcomp -XX:CompileOnly=Test -XX:-UseSubwordForMaxVector Test It does not reproduce with -XX:+UnlockExperimentalVMOptions -XX:-UseSwitchProfiling.
11-09-2018

This problem was triggered by JDK-8194740 in JDK 11 b22 but can be reproduced with earlier versions by adding -XX:-UseSubwordForMaxVector. I was able to trace it back to JDK 11 b11 and the offending change seems to be JDK-8200303. The crash does not reproduce with -XX:+UnlockExperimentalVMOptions -XX:-UseSwitchProfiling.
11-09-2018

I can reproduce this with JDK 11 as well (but not with earlier versions): java -Xmx1G -Xcomp -XX:CompileOnly=Test Test ILW = Assert during C2 compilation, easy to reproduce but only ever showed up with generated test, disable compilation of method = HLM = P3
10-09-2018

Although hs_err points to jdk12b05 bug is reproduced with JDK12b09.
04-09-2018