-
Bug
-
Resolution: Fixed
-
P3
-
11, 17, 18
-
b29
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8279100 | 19 | Igor Veresov | P3 | Resolved | Fixed | b04 |
JDK-8279735 | 18.0.1 | Igor Veresov | P3 | Resolved | Fixed | b02 |
JDK-8279559 | 17.0.3-oracle | Tobias Hartmann | P3 | Resolved | Fixed | b01 |
JDK-8279960 | 17.0.3 | Goetz Lindenmaier | P3 | Resolved | Fixed | b01 |
JDK-8279446 | 11.0.15-oracle | Tobias Hartmann | P3 | Resolved | Fixed | b01 |
JDK-8280501 | 11.0.15 | Goetz Lindenmaier | P3 | Resolved | Fixed | b01 |
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/c1_Instruction.cpp:849
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/opt/buildAgent/work/bc84ff8f5e63b59d/src/hotspot/share/c1/c1_Instruction.cpp:849), pid=426790, tid=426803
# assert(existing_value == new_state->local_at(index) || (existing_value->as_Phi() != __null && existing_value->as_Phi()->as_Phi()->block() == this)) failed: phi function required
...
The original crash occurs when running IntelliJ IDEA, but a heavily reduced sample is presented here. To reproduce:
1. Compile this Kotlin code
$ cat Main.kt
suspend fun yield(s: String) {
println("Success");
System.exit(0)
}
suspend fun test(s: String) {
while (true) {
yield(s)
}
}
suspend fun main() {
test("")
}
like so
$ kotlinc Main.kt -include-runtime -d test.jar
Alternatively, download the attached test.jar.
2. Run a [fast]debug build of java with these options
$ java -Xcomp -XX:CompileCommand=compileonly,MainKt::test -cp ./test.jar MainKt
3. Observe the crash
--------------- T H R E A D ---------------
Current thread (0x00007f679c3a6800): JavaThread "C1 CompilerThread0" daemon [_thread_in_native, id=1253817, stack(0x00007f676d489000,0x00007f676d58a000)]
Current CompileTask:
C1: 11798 29 b 3 MainKt::test (136 bytes)
Stack: [0x00007f676d489000,0x00007f676d58a000], sp=0x00007f676d5878f0, free space=1018k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x1a7be8a] VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x38a
V [libjvm.so+0x1a7cdc5] VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, __va_list_tag*)+0x35
V [libjvm.so+0xc25eaa] report_vm_error(char const*, int, char const*, char const*, ...)+0x10a
V [libjvm.so+0x80d773] BlockBegin::try_merge(ValueStack*)+0x2b23
V [libjvm.so+0x7ee722] GraphBuilder::iterate_bytecodes_for_block(int)+0x732
V [libjvm.so+0x7f05b0] GraphBuilder::iterate_all_blocks(bool)+0x80
V [libjvm.so+0x7f18a7] GraphBuilder::GraphBuilder(Compilation*, IRScope*)+0x467
V [libjvm.so+0x804654] IR::IR(Compilation*, ciMethod*, int)+0x684
V [libjvm.so+0x7bcaf6] Compilation::build_hir() [clone .part.0]+0x276
V [libjvm.so+0x7c21b0] Compilation::compile_java_method()+0x1c0
V [libjvm.so+0x7c3308] Compilation::compile_method()+0x1d8
V [libjvm.so+0x7c3eae] Compilation::Compilation(AbstractCompiler*, ciEnv*, ciMethod*, int, BufferBlob*, DirectiveSet*)+0x32e
V [libjvm.so+0x7c4d53] Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0x143
V [libjvm.so+0xb4acb5] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x785
V [libjvm.so+0xb4cb28] CompileBroker::compiler_thread_loop()+0x678
V [libjvm.so+0x19b105e] JavaThread::thread_main_inner()+0x2ee
V [libjvm.so+0x19b13f8] JavaThread::run()+0x218
V [libjvm.so+0x19a8e2b] Thread::call_run()+0xbb
V [libjvm.so+0x1699886] thread_native_entry(Thread*)+0x116
- backported by
-
JDK-8279100 Hotspot C1 compiler crashes on Kotlin suspend fun with loop
- Resolved
-
JDK-8279446 Hotspot C1 compiler crashes on Kotlin suspend fun with loop
- Resolved
-
JDK-8279559 Hotspot C1 compiler crashes on Kotlin suspend fun with loop
- Resolved
-
JDK-8279735 Hotspot C1 compiler crashes on Kotlin suspend fun with loop
- Resolved
-
JDK-8279960 Hotspot C1 compiler crashes on Kotlin suspend fun with loop
- Resolved
-
JDK-8280501 Hotspot C1 compiler crashes on Kotlin suspend fun with loop
- Resolved
- relates to
-
JDK-8279886 C1: Turn off SelectivePhiFunctions in presence of irreducible loops
- Resolved
- links to
-
Commit openjdk/jdk11u-dev/809b0157
-
Commit openjdk/jdk17u-dev/2886a4dc
-
Commit openjdk/jdk18/b46f0b0b
-
Review openjdk/jdk11u-dev/770
-
Review openjdk/jdk17u-dev/75
-
Review openjdk/jdk18/40