JDK-8291781 : assert(!is_visited) failed: visit only once with -XX:+SuperWordRTDepCheck
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 20
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2022-07-28
  • Updated: 2022-11-14
  • Resolved: 2022-10-28
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 20
20 b22Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
This configuration fails:

$ CONF=linux-x86_64-server-fastdebug make test TEST=compiler/c2/irTests/TestVectorizeTypeConversion.java TEST_VM_OPTS="-XX:+SuperWordRTDepCheck"

# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/loopnode.cpp:5284
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/root/jdk_source/jdk/src/hotspot/share/opto/loopnode.cpp:5284), pid=33529, tid=33798
#  assert(!is_visited) failed: visit only once
#
# JRE version: OpenJDK Runtime Environment (20.0) (fastdebug build 20-internal-adhoc.root.jdk)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 20-internal-adhoc.root.jdk, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x12b349c]  PhaseIdealLoop::build_loop_early(VectorSet&, Node_List&, Node_Stack&)+0x5ac
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/root/jdk_source/jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_hotspot_compiler/scratch/31/core.33529)
#


FREQUENCY : always



Comments
Changeset: 4b89fce0 Author: Fei Gao <fgao@openjdk.org> Committer: Pengfei Li <pli@openjdk.org> Date: 2022-10-28 07:27:02 +0000 URL: https://git.openjdk.org/jdk/commit/4b89fce0831f990d4b6af5e6e208342f68aed614
28-10-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/10868 Date: 2022-10-26 08:17:00 +0000
26-10-2022

Okay, sounds good. Thanks!
25-10-2022

Hi [~thartmann] and [~kvn], thanks for your advice! I'd like to convert it to pure debug code as [~kvn] suggested in case we need it in the future. I'll propose a small fix to resolve the issue. Thanks.
25-10-2022

We can convert this flag to pure debug to avoid effect on code generation by next change: if (SuperWordRTDepCheck && p1.base() != p2.base() && p1.valid() && p2.valid()) { - // Create a runtime check to disambiguate + // Trace disjoint pointers OrderedPair pp(p1.base(), p2.base()); _disjoint_ptrs.append_if_missing(pp); - } else if (!SWPointer::not_equal(cmp)) { + } + if (!SWPointer::not_equal(cmp)) { // Possibly same address _dg.make_edge(s1, s2);
24-10-2022

[~fgao], should we simply remove the flag?
24-10-2022

It seems that -XX:+SuperWordRTDepCheck is a develop flag and misses proper implementation (only involved here https://github.com/openjdk/jdk/blob/0bc804d6ef66426f93f4bef4641a377a4400827d/src/hotspot/share/opto/superword.cpp#L1114). But when enabled, sometimes it can influence dependency graph in SuperWord.
04-08-2022

I found another, unrelated issue with -XX:+SuperWordRTDepCheck: JDK-8291881
04-08-2022

Thanks for your verification, [~thartmann]. I reproduced the error locally. I'll investigate the root cause ASAP.
04-08-2022

ILW = Assert during C2 compilation (regression in JDK 20), with single test and non-default debug flag, no workaround but disable superword or compilation of affected method = HLM = P3
03-08-2022

Seems to be a regression in JDK 20 b03, most likely JDK-8283091, running tests to verify.
03-08-2022

Issue is reproduced. TestVectorizeTypeConversion.java is resulting in crash with Problematic frame: # V [libjvm.so+0x14aea7c] PhaseIdealLoop::build_loop_early(VectorSet&, Node_List&, Node_Stack&)+0x68c when "-XX:+SuperWordRTDepCheck" is used. (hs_err_pid8010.log and replay_pid8010.log are attached) OS : Ubuntu 18.04 JDK 20 fastdebug internal build :Fail ILW: crash,single test method,disable compilation of affected method=HLM = P3 Moving it to dev team for further analysis
03-08-2022

I verified that this was introduced by JDK-8283091 in JDK 20 b03. [~fgao], could you please take a look?
03-08-2022