JDK-8269088 : C2 fails with assert(!n->is_Store() && !n->is_LoadStore()) failed: no node with a side effect
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2021-06-21
  • Updated: 2024-07-19
  • Resolved: 2021-07-01
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 17 JDK 18
17 b30Fixed 18Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Unpack the Fuzzer testcase from here:
  https://cr.openjdk.java.net/~shade/8269088/09634.tar.gz

Run:

$ linux-x86_64-server-fastdebug/images/jdk/bin/java -Xcomp -XX:CompileOnly=Test -XX:CompileCommand=quiet -XX:+UseSerialGC -Xmx256m Test
...

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/shade/trunks/jdk/src/hotspot/share/opto/loopopts.cpp:1443), pid=792969, tid=792991
#  assert(!n->is_Store() && !n->is_LoadStore()) failed: no node with a side effect
#
# JRE version: OpenJDK Runtime Environment (18.0) (fastdebug build 18-internal+0-adhoc.shade.jdk)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 18-internal+0-adhoc.shade.jdk, compiled mode, sharing, tiered, compressed oops, compressed class ptrs, serial gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x12fd8a9]  PhaseIdealLoop::try_sink_out_of_loop(Node*)+0xa69
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /home/shade/trunks/jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_applications_fuzzer/scratch/22/core.792969)
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#

---------------  S U M M A R Y ------------

Command Line: -XX:MaxRAMPercentage=0.78125 -Djava.io.tmpdir=/home/shade/trunks/jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_applications_fuzzer/tmp -Xcomp -XX:CompileOnly=Test -XX:CompileCommand=quiet -XX:+UseSerialGC -Xmx256m Test

Host: shade-desktop, AMD Ryzen Threadripper 3970X 32-Core Processor, 64 cores, 125G, Ubuntu 20.04.2 LTS
Time: Mon Jun 21 15:27:08 2021 CEST elapsed time: 0.559349 seconds (0d 0h 0m 0s)

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

Current thread (0x00007f3b181248e0):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=792991, stack(0x00007f3b1c133000,0x00007f3b1c234000)]


Current CompileTask:
C2:    559   20   !b  4       Test::mainTest (911 bytes)

Stack: [0x00007f3b1c133000,0x00007f3b1c234000],  sp=0x00007f3b1c22e150,  free space=1004k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x12fd8a9]  PhaseIdealLoop::try_sink_out_of_loop(Node*)+0xa69
V  [libjvm.so+0x12fda5b]  PhaseIdealLoop::split_if_with_blocks_post(Node*)+0x6b
V  [libjvm.so+0x12fe891]  PhaseIdealLoop::split_if_with_blocks(VectorSet&, Node_Stack&)+0x201
V  [libjvm.so+0x12f0d4a]  PhaseIdealLoop::build_and_optimize(LoopOptsMode)+0x12ca
V  [libjvm.so+0xa40b95]  PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x2d5
V  [libjvm.so+0xa3de9f]  Compile::Optimize()+0x101f
V  [libjvm.so+0xa3f760]  Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, bool, DirectiveSet*)+0x12f0
V  [libjvm.so+0x872a56]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x646
V  [libjvm.so+0xa511c9]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0xf19
V  [libjvm.so+0xa51f58]  CompileBroker::compiler_thread_loop()+0x658
V  [libjvm.so+0x19e7e51]  JavaThread::thread_main_inner()+0x281
V  [libjvm.so+0x19ef5c4]  Thread::call_run()+0x104
V  [libjvm.so+0x15698fc]  thread_native_entry(Thread*)+0x10c

The assert seems to be added by JDK-8252372.
Comments
Changeset: ad27d9b3 Author: Roland Westrelin <roland@openjdk.org> Date: 2021-07-01 08:11:59 +0000 URL: https://git.openjdk.java.net/jdk17/commit/ad27d9b3eca0ebaa5d920af0d3d4c43b3fa6c5f8
01-07-2021

ILW = new assert fails, observed only with fuzzer test, no workaround = HLH = P2
22-06-2021