C2 crashes with error message assert(is_Loop()) failed: invalid node class
Tianxiao Gu
tianxiao.gu at gmail.com
Sun Feb 11 07:29:57 UTC 2018
C2 crashes with error message assert(is_Loop()) failed: invalid node class
The JDK image is built from the following repo.
~~~
$ hg tip
changeset: 48878:c8a33db795b6
tag: tip
parent: 48837:67aa88701d46
parent: 48877:5e2d2067da48
user: jwilhelm
date: Sat Feb 10 09:25:35 2018 +0100
summary: Merge
$ hg paths
default = http://hg.openjdk.java.net/jdk/hs/
~~~
This crash may be a duplicate to the following issues but has a different
stack trace.
Can anyone help me to resolve it?
https://bugs.openjdk.java.net/browse/JDK-8196296
https://bugs.openjdk.java.net/browse/JDK-8196653
https://bugs.openjdk.java.net/browse/JDK-8195668
Stack trace:
~~~
--------------- S U M M A R Y ------------
Command Line: -Xcomp -XX:-TieredCompilation
-XX:CompileCommand=exclude,java*::* C0
Host: wish, Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz, 8 cores, 7G,
Ubuntu 16.04.3 LTS
Time: Sat Feb 10 23:17:29 2018 PST elapsed time: 3 seconds (0d 0h 0m 3s)
--------------- T H R E A D ---------------
Current thread (0x00007f7c3c257800): JavaThread "C2 CompilerThread1"
daemon [_thread_in_native, id=5769,
stack(0x00007f7bdb023000,0x00007f7bdb124000)]
Current CompileTask:
C2: 3321 365 b C0::_main (126 bytes)
Stack: [0x00007f7bdb023000,0x00007f7bdb124000], sp=0x00007f7bdb11e1a0,
free space=1004k
Native frames: (J=compiled Java code, A=aot compiled Java code,
j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x16c4d9e] VMError::report_and_die(int, char const*, char
const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*,
int, unsigned long)+0x4ce
V [libjvm.so+0x16c590f] VMError::report_and_die(Thread*, char const*,
int, char const*, char const*, __va_list_tag*)+0x2f
V [libjvm.so+0xab51f2] report_vm_error(char const*, int, char const*,
char const*, ...)+0x112
V [libjvm.so+0x112f07e] Node::as_Loop() const [clone .part.74]+0x2e
V [libjvm.so+0x1133c22] PhaseIdealLoop::try_move_store_before_loop(Node*,
Node*)+0x652
V [libjvm.so+0x11340de]
PhaseIdealLoop::split_if_with_blocks_pre(Node*)+0xbe
V [libjvm.so+0x11359f3] PhaseIdealLoop::split_if_with_blocks(VectorSet&,
Node_Stack&)+0x133
V [libjvm.so+0x112dff2] PhaseIdealLoop::build_and_optimize(bool,
bool)+0x10c2
V [libjvm.so+0xa142c1] Compile::Optimize()+0x321
V [libjvm.so+0xa16052] Compile::Compile(ciEnv*, C2Compiler*, ciMethod*,
int, bool, bool, bool, DirectiveSet*)+0x1172
V [libjvm.so+0x81f03b] C2Compiler::compile_method(ciEnv*, ciMethod*, int,
DirectiveSet*)+0x2db
V [libjvm.so+0xa22f5e]
CompileBroker::invoke_compiler_on_method(CompileTask*)+0x55e
V [libjvm.so+0xa244c8] CompileBroker::compiler_thread_loop()+0x408
V [libjvm.so+0x1610ce2] JavaThread::thread_main_inner()+0x1e2
V [libjvm.so+0x1349462] thread_native_entry(Thread*)+0x112
~~~
Output:
~~~
$
../../openjdk/hs/build/linux-x86_64-normal-server-fastdebug/images/jdk/bin/java
-Xcomp -XX:-TieredCompilation -XX:CompileCommand=exclude,java*::* C0
CompileCommand: exclude java*.*
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/node.hpp:821
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error
(/home/wish/Projects/JVMTesting/openjdk/hs/src/hotspot/share/opto/node.hpp:821),
pid=5741, tid=5769
# assert(is_Loop()) failed: invalid node class
#
# JRE version: OpenJDK Runtime Environment (11.0) (fastdebug build
11-internal+0-adhoc.wish.hs)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 11-internal+0-adhoc.wish.hs,
compiled mode, compressed oops, g1 gc, linux-amd64)
# Core dump will be written. Default location: Core dumps may be processed
with "/usr/share/apport/apport %p %s %c %d %P" (or dumping to
/home/wish/Projects/JVMTesting/bugs/error-20180210020349/core.5741)
#
# An error report file with more information is saved as:
#
/home/wish/Projects/JVMTesting/bugs/error-20180210020349/hs_err_pid5741.log
#
# Compiler replay data is saved as:
#
/home/wish/Projects/JVMTesting/bugs/error-20180210020349/replay_pid5741.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Current thread is 5769
Dumping core ...
Aborted (core dumped)
~~~
Reproduce:
Operating System:
~~~
$ uname -a
Linux wish 4.10.0-40-generic #44~16.04.1-Ubuntu SMP Thu Nov 9 15:37:44 UTC
2017 x86_64 x86_64 x86_64 GNU/Linux
~~~
The class file can be obtained by Jasmin.
java -jar jasmin-2.4/jasmin.jar C0-full.j
The content of C0-full.j is listed below.
~~~
.class public C0
.super java/lang/Object
.field public static F3 [Ljava/lang/Object;
.field public static F6 I
.field public static F10 [C
.field protected static F15 [C
.method public <init>()V
aload 0
invokenonvirtual java/lang/Object/<init>()V
return
.limit stack 1
.limit locals 1
.end method
.method public static main([Ljava/lang/String;)V
aload 0
invokestatic C0/_main([Ljava/lang/String;)I
invokestatic java/lang/System/exit(I)V
return
.limit stack 1
.limit locals 1
.end method
.method public static _main([Ljava/lang/String;)I
L0:
aload 0
getstatic C0/F6 I
ifgt L1
bipush -109
ireturn
L1:
iconst_4
putstatic C0/F6 I
bipush 65
ifge L1
ifnull L0
aconst_null
iconst_m1
iflt L2
new java/lang/Object
dup
invokenonvirtual java/lang/Object/<init>()V
astore 0
L2:
getstatic C0/F15 [C
dconst_0
aload 0
aload 0
iconst_3
putstatic C0/F6 I
lconst_1
l2i
newarray int
astore 1
L5:
aload 1
ifnonnull L5
fconst_0
f2i
putstatic C0/F6 I
dup
astore 1
lconst_0
l2i
putstatic C0/F6 I
astore 0
lconst_0
l2f
f2i
putstatic C0/F6 I
astore 0
L7:
iconst_2
ifle L7
ldc2_w -1281607442625018332
lstore 0
getstatic C0/F10 [C
astore 0
d2i
dconst_0
d2i
isub
i2f
getstatic C0/F3 [Ljava/lang/Object;
astore 1
fconst_2
frem
fstore 0
invokevirtual java/lang/Object/equals(Ljava/lang/Object;)Z
aconst_null
astore 1
dconst_0
dstore 0
getstatic C0/F10 [C
astore 1
ireturn
.limit stack 26
.limit locals 2
.end method
~~~
Options
-Xcomp -XX:-TieredCompilation -XX:CompileCommand=exclude,java*::* C0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20180210/0b2777d0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: C0-full.j
Type: application/octet-stream
Size: 1544 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20180210/0b2777d0/C0-full-0001.j>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hs_err_pid5741.log
Type: application/octet-stream
Size: 55218 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20180210/0b2777d0/hs_err_pid5741-0001.log>
More information about the hotspot-compiler-dev
mailing list