Details
-
Bug
-
Resolution: Fixed
-
P3
-
10, 11, 12, 13
-
b10
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8221574 | 12.0.2 | Roland Westrelin | P3 | Resolved | Fixed | b02 |
JDK-8226497 | 11.0.5-oracle | Roland Westrelin | P3 | Resolved | Fixed | b02 |
JDK-8221337 | 11.0.4 | Roland Westrelin | P3 | Resolved | Fixed | b01 |
Description
# Internal Error (/home/roland/hs/src/hotspot/share/opto/escape.cpp:3118), pid=17688, tid=17701
# assert(tn_type == TypePtr::NULL_PTR || tn_t != __null && !tinst->klass()->is_subtype_of(tn_t->klass())) failed: unexpected type
#
# JRE version: OpenJDK Runtime Environment (13.0) (fastdebug build 13-internal+0-adhoc.roland.hs)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 13-internal+0-adhoc.roland.hs, compiled mode, sharing, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0xb8ee95] ConnectionGraph::split_unique_types(GrowableArray<Node*>&, GrowableArray<ArrayCopyNode*>&)+0x405
Test case:
import java.lang.reflect.Field;
import jdk.internal.misc.Unsafe;
public class MaybeOffHeapUnsafeAccessToNewObject {
public volatile int f_int = -1;
public static Unsafe unsafe = Unsafe.getUnsafe();
public static final long f_int_off;
static {
Field f_int_field = null;
try {
f_int_field = MaybeOffHeapUnsafeAccessToNewObject.class.getField("f_int");
} catch (Exception e) {
System.out.println("reflection failed " + e);
e.printStackTrace();
}
f_int_off = unsafe.objectFieldOffset(f_int_field);
}
static public void main(String[] args) {
MaybeOffHeapUnsafeAccessToNewObject o = new MaybeOffHeapUnsafeAccessToNewObject();
test1();
}
static Object test1_helper1(Object t) {
return t;
}
static long test1_helper2(long off) {
return off;
}
static int test1() {
MaybeOffHeapUnsafeAccessToNewObject t = new MaybeOffHeapUnsafeAccessToNewObject();
Object o = test1_helper1(t);
long off = test1_helper2(f_int_off);
return unsafe.getInt(o, off);
}
}
ran with:
-XX:-UseOnStackReplacement -XX:-BackgroundCompilation -XX:-TieredCompilation -Xcomp -XX:CompileOnly=MaybeOffHeapUnsafeAccessToNewObject::test1 -XX:+IgnoreUnrecognizedVMOptions -XX:+AlwaysIncrementalInline MaybeOffHeapUnsafeAccessToNewObject
# assert(tn_type == TypePtr::NULL_PTR || tn_t != __null && !tinst->klass()->is_subtype_of(tn_t->klass())) failed: unexpected type
#
# JRE version: OpenJDK Runtime Environment (13.0) (fastdebug build 13-internal+0-adhoc.roland.hs)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 13-internal+0-adhoc.roland.hs, compiled mode, sharing, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0xb8ee95] ConnectionGraph::split_unique_types(GrowableArray<Node*>&, GrowableArray<ArrayCopyNode*>&)+0x405
Test case:
import java.lang.reflect.Field;
import jdk.internal.misc.Unsafe;
public class MaybeOffHeapUnsafeAccessToNewObject {
public volatile int f_int = -1;
public static Unsafe unsafe = Unsafe.getUnsafe();
public static final long f_int_off;
static {
Field f_int_field = null;
try {
f_int_field = MaybeOffHeapUnsafeAccessToNewObject.class.getField("f_int");
} catch (Exception e) {
System.out.println("reflection failed " + e);
e.printStackTrace();
}
f_int_off = unsafe.objectFieldOffset(f_int_field);
}
static public void main(String[] args) {
MaybeOffHeapUnsafeAccessToNewObject o = new MaybeOffHeapUnsafeAccessToNewObject();
test1();
}
static Object test1_helper1(Object t) {
return t;
}
static long test1_helper2(long off) {
return off;
}
static int test1() {
MaybeOffHeapUnsafeAccessToNewObject t = new MaybeOffHeapUnsafeAccessToNewObject();
Object o = test1_helper1(t);
long off = test1_helper2(f_int_off);
return unsafe.getInt(o, off);
}
}
ran with:
-XX:-UseOnStackReplacement -XX:-BackgroundCompilation -XX:-TieredCompilation -Xcomp -XX:CompileOnly=MaybeOffHeapUnsafeAccessToNewObject::test1 -XX:+IgnoreUnrecognizedVMOptions -XX:+AlwaysIncrementalInline MaybeOffHeapUnsafeAccessToNewObject
Attachments
Issue Links
- backported by
-
JDK-8221337 "failed: unexpected type" assert failure in ConnectionGraph::split_unique_types() with unsafe accesses
- Resolved
-
JDK-8221574 "failed: unexpected type" assert failure in ConnectionGraph::split_unique_types() with unsafe accesses
- Resolved
-
JDK-8226497 "failed: unexpected type" assert failure in ConnectionGraph::split_unique_types() with unsafe accesses
- Resolved
- duplicates
-
JDK-8218621 [lworld] TestNewAcmp fails with -Xcomp
- Closed
- relates to
-
JDK-8176506 C2: loop unswitching and unsafe accesses cause crash
- Resolved