JDK-8286625 : 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,19,repo-loom
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-05-12
  • Updated: 2022-10-07
  • Resolved: 2022-06-08
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 19
17.0.5-oracleFixed 19 b26Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
applications/ctw/modules/java_base_2.java failed when testing a sync up of the loom repo to jdk-19+22:

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (src/hotspot/share/opto/loopopts.cpp:1598), pid=28136, tid=28855
#  assert(!n->is_Store() && !n->is_LoadStore()) failed: no node with a side effect
#
# JRE version: Java(TM) SE Runtime Environment (19.0) (fastdebug build 19-internal-2022-05-12-0621265.alan.bateman.loom-merge)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 19-internal-2022-05-12-0621265.alan.bateman.loom-merge, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x149471c]  PhaseIdealLoop::try_sink_out_of_loop(Node*)+0xa1c

Note that the test fails with randomization on (-XX:+StressLCM -XX:+StressGCM -XX:+StressIGVN -XX:+StressCCP).

If it fails in the loom repo then it is likely that it fails in the main line too, when run with --enable-preview.

Executed CTW for all 3254 classes in modules:java.base(at /opt/mach5/mesos/work_dir/jib-master/install/2022-05-12-0621265.alan.bateman.loom-merge/linux-x64-debug.jdk/jdk-19/fastdebug/lib/modules)
----------System.err:(21/1342)----------
There were 1 errors:[
java.lang.Error: modules_java_base_3254: failed during compilation of class #4520 : sun/net/util/IPAddressUtil
	at sun.hotspot.tools.ctw.CtwRunner.startCtwforAllClasses(CtwRunner.java:215)
	at sun.hotspot.tools.ctw.CtwRunner.run(CtwRunner.java:119)
	at sun.hotspot.tools.ctw.CtwRunner.main(CtwRunner.java:65)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
	at java.base/java.lang.Thread.run(Thread.java:1585)

java.lang.AssertionError: There were 1 errors:[{modules_java_base_3254: failed during compilation of class #4520 : sun/net/util/IPAddressUtil}]
	at sun.hotspot.tools.ctw.CtwRunner.run(CtwRunner.java:134)
	at sun.hotspot.tools.ctw.CtwRunner.main(CtwRunner.java:65)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
	at java.base/java.lang.Thread.run(Thread.java:1585)

JavaTest Message: Test threw exception: java.lang.AssertionError
JavaTest Message: shutting down test
Comments
Fix request [17u] I backport this for parity with 17.0.5-oracle. Harmless change, but typical C2 fix risk, we should fix it anyways. Clean backport. Test passes and fails without the fix. SAP nightly testing passed.
30-06-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/514 Date: 2022-06-28 19:52:29 +0000
28-06-2022

Changeset: 590337e2 Author: Roland Westrelin <roland@openjdk.org> Date: 2022-06-08 06:35:28 +0000 URL: https://git.openjdk.java.net/jdk/commit/590337e2f229445e353e7c32e0dcff8d93e412d2
08-06-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/8996 Date: 2022-06-02 15:43:09 +0000
02-06-2022

Could actually be a duplicate of JDK-8278420.
16-05-2022

I slightly adjusted the replay compilation file by removing Loom specific references to jdk/internal/vm/Continuation (see attached replay_adjusted.log) and this now reproduces with latest JDK 19-ea+23-1651: -XX:+ReplayIgnoreInitErrors -XX:+ReplayCompiles -XX:+PrintCompilation -XX:ReplayDataFile=replay_adjusted.log -XX:RepeatCompilation=10000 -XX:+StressIGVN Raising priority.
16-05-2022

Roland, could you please have a look?
16-05-2022

This is most likely another regression of JDK-8252372.
16-05-2022

ILW = assertion failure in debug build; seen once in loom repo with stress flags on (likely to occur in mainline with --enable-preview); disable compilation of affected method = MLH = P4
12-05-2022

Adding 19 as an affected version speculatively, even if the failure has only been seen so far in the loom repo.
12-05-2022